|
I would like to request MBasic code examples inplementing some LCD commands that are not well described in the 'manual'. My hardware: BAP 28 and a BasicATOM Lab Board with a 2x16 LCD.
Examples desired: Auto increment/decrement display, move cursor to a location and delete or replace the character at that location and how to scroll the displayed text.
I am trying to understand the LCD commands so I can display various information from a Pocket Watch B module.
I have been able to 'puzzle out' most of the commands, but not others. I am just an old guy 'playing' with electronics.
If anyone is interested, I have written a program that uses a Pocket Watch B module astable-alarm to start a 'cylon eye' using a 10-LED bar module. Will post upon request.
Below is 'code' that I have been able to implement and understand. Thanks in advance for any help you provide! ================================================================================== ;DEMO PROGRAM - LCDINIT.BAS ' wait for LCD to power up Pause 500 ' initialize LCD lcdinit p0\p1\p7\p6\p5\p4,p2 ' turn LCD Backlight ON high p3 ' write some text to 2x16 LCD, fills both lines lcdwrite p0\p1\p7\p6\p5\p4,[$101,$102,$10C,$128,"Hello World! PLF",scrram+64,"I Love You Dixie"] ' temp var byte ' counter variable for memory locations character var byte(16) ' array variable to hold results of LCD_Read command ' for temp = 0 to 15 ' read line 1 loop lcdread p0\p1\p7\p6\p5\p4,p2,temp,[character(temp)] ' read LCD line 1 memory locations serout s_out, i9600,[character(temp)] ' output memory locations to terminal window to verify reads next ' serout s_out, i9600,[13,"================",13] ' line to separate LCD_Read results ' for temp = 64 to 79 ' read line 2 loop lcdread p0\p1\p7\p6\p5\p4,p2,temp,[character(temp)] ' read LCD line 2 memory locations serout s_out, i9600,[character(temp)] ' output memory locations to terminal window to verify reads next ' end ==================================================================================
|