Problem with LCD driver routines in manual

ferrymanr

Member
I am having a small problem with the parallel drive LCD subroutines in the manual section 3 page 40. These do work with the display OK but contrary to the note at the bottom of the page the "let pins =" commands do seem to screw up outputs 0 and 1 on my 18M and I would like to use them elsewhere. Any idea why?

Also the init subroutine line 2 reads "let b4 = 0 'Reset variable b3". This may be a manual error?

Richard
 

Janne

Senior Member
Hi,

You need to mask these pins out, so your LCD commands won't also change them. Like this:

Code:
rsbit = rsbit | OUTPINS
rsbit = rsbit & %00000111	
pins = temp & %11110000 | rsbit ; Put MSB out first
PULSOUT E,1                     ; Give a 10uS pulse on E
pins = temp * %00010000 | rsbit ; Put LSB out second
PULSOUT E,1                     ; Give a 10uS pulse on E
(That's hippys LCD routines modified with masking operations)

Beware though, If you use interrup to modify ouputs 0 and 1, and the interrupt happens after reading the outpins but before the LCD sequence finishes, you will corrupt your outputs 0 & 1.
 
Top