LCD/OLED Memory Mapping

hippy

Senior Member
The attached program may be useful for people trying to determine where the start addresses are for lines of their LCD / OLED displays. It's for 20M2 but easily adjusted for any PICAXE; just change the LCD symbol and / or LCD_BAUD.

When the program has run and stopped updating the display the first two digits at the start of each line are the addresses in hex to use to put a character at that line. For example, if the display shows ...

8082848688....
C0C2C4C6C8....

The key numbers are "80" and "C0", and the following should address the appropriate lines ...

SerOut LCD, LCD_BAUD, ( 254, $80, "Line 1" )
SerOut LCD, LCD_BAUD, ( 254, $C0, "Line 2" )

It's not been exhaustively tested but seems to work and showed up all sorts of odd memory mapping for the displays I tested.
 

Attachments

Last edited:

hippy

Senior Member
The display looks good, is it what you expected?
Yes, exactly as expected, with the results which match my example in post 1; start of the top line at "80" ( $80 / 128), start of the bottom line at "C0" ( $C0 / 192 ).
 
Top