· I have the
LCD Terminal AppMod, and I'm not sure how to program it. Im using the Basic Stamp 2, I downloaded the smiple code for it off parallax's website and I was really confussed in how to program it. If anyone has any suggestions I would appreciate it!
·Joshua Peters
·'If it doesnt do something automatic, then its not a Stamp.
Comments
LCD_Command: ' write command to LCD #IF _LcdReady #THEN LCDCMD E, char RETURN #ELSE LOW RS GOTO LCD_Write_Char #ENDIF LCD_Write_Char: ' write character to LCD #IF _LcdReady #THEN LCDOUT E, 0, [noparse][[/noparse]char] #ELSE LcdBusOut = char.HIGHNIB ' output high nibble PULSOUT E, 3 ' strobe the Enable line LcdBusOut = char.LOWNIB ' output low nibble PULSOUT E, 3 HIGH RS ' return to character mode #ENDIF RETURN
Since you have a BS2, what you need is
LCD_Command: ' write command to LCD LOW RS LcdBusOut = char.HIGHNIB ' output high nibble PULSOUT E, 3 ' strobe the Enable line LcdBusOut = char.LOWNIB ' output low nibble PULSOUT E, 3 HIGH RS ' return to character mode RETURN
Everything else in there is simply there to show how a BS2p or BS2pe would handle things. On those processors, the subroutine would look like this
LCD_Command: ' write command to LCD LCDCMD E, char RETURN
Try going through the code and removing everything that is for the "LcdReady" processors, and see if what's left makes more sense to you. I had to look at it all quite a few times before I understood it.
·· It makes sense now, theres onl;y one problem.........I cant find my LCD screen now
I apperciate you writing that code.....Ill try and fing my LCD screen, it couldnt have gone to far