Serial Lcd (4x20)
J^3
Posts: 121
Hi all,
··· I am trying to figure out how to display scrolling text.· I am looking through the download right now, and understand how to move the cursor around, but haven't been able to figure out a routine to do what I want.· Pretty much what I am trying to do is to display the same message on line 0, starting from the right side, scrolling across the screen, and off the left over and over again.
Any help is appreciated, and thanks in advance.
This is where I am so far, thanks again.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
··· I am trying to figure out how to display scrolling text.· I am looking through the download right now, and understand how to move the cursor around, but haven't been able to figure out a routine to do what I want.· Pretty much what I am trying to do is to display the same message on line 0, starting from the right side, scrolling across the screen, and off the left over and over again.
Any help is appreciated, and thanks in advance.
This is where I am so far, thanks again.·
' File: ' Author: ' Date: ' {$STAMP BS2} ' {$PBASIC 2.5} '----Program Description------------------------------------------------------- '----PIN Declaration----------------------------------------------------------- '----Constants----------------------------------------------------------------- TxPin CON 0 Baud19200 CON 32 '----Variables----------------------------------------------------------------- idx VAR Byte txmt VAR Byte '----EEPROM DATA--------------------------------------------------------------- DATA "Hartnell College Robotics Club" '29 characters '----Initialization------------------------------------------------------------ DEBUG CLS HIGH TxPin 'Set pin high to be a serial port PAUSE 100 'Pause for Serial LCD to initialize SEROUT TxPin, Baud19200, [noparse][[/noparse]17] 'Backlight On '----Program Code--------------------------------------------------------------- Main: DO FOR idx = 0 TO 29 SEROUT TxPin, Baud19200, [noparse][[/noparse]147] 'Sets cursor position back to line 0 READ idx, txmt 'Position 19, but I need previous SEROUT TxPin, Baud19200, [noparse][[/noparse]txmt] 'Characters to be shifted left? PAUSE 100 NEXT LOOP '----Subroutines---------------------------------------------------------------
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
Comments
1) Write characters 1-20 and pause briefly
2) Write characters 2-21 and pause briefly
3) Write characters 3-22 and pause briefly
4) And so on up to characters 10-29, then pause briefly and start all over again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.