Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trying to output to LCD screen

Status
Not open for further replies.

jnilo

New Member
Hello all
I am new to Oshonsoft and to this forum. I am running into a very basic problem with the following simple program:

Dim x As Word
x = 65535
AllDigital
Lcdinit 3
WaitMs 100
loop:
Lcdout "I am counting!"
Lcdcmdout LcdLine2Home
Lcdout #x
x = x - 1
WaitMs 250
Lcdcmdout LcdClear
Goto loop

When I select an 16F88 it runs without any problems. When I select a 16f690 nothing shoes up on the screen. In both cases I am initializing the LCD tool with the default from the code.
What am I doing wrong here ?
PICIDE88.JPG PICIDE690.JPG
Jacques
 
You are right! It worked perfectly well after inserting the following lines at the begining of the code. I initially tought that default ports where consistents with the selected PIC. I should have checked :)
Define LCD_BITS = 4
Define LCD_DREG = PORTC
Define LCD_DBIT = 0
Define LCD_RSREG = PORTC
Define LCD_RSBIT = 5
Define LCD_EREG = PORTC
Define LCD_EBIT = 4
Many thanks !
Jacques
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top