axe033lcd.bas

Just got my 20 x 4 oled display and trying to configure the code file from the default 16 x 2 and not really sure if i have a problem or not. Can you still use the same number of messages as the 16x2 setup as i keep getting a error when it gets to message 12, i have changed the length of the message and the start addresses but will only work up to the message 12 am i missing something here or simply done something incorrectly. This is how i changed the code:-

Code:
[CODE]#ifdef use_OLED		
EEPROM $00, ("   Serial OLED     ") 	; store msg in the EEPROM memory
#else
EEPROM $00, ("     Serial LCD     ") 	; store msg in the EEPROM memory
#endif


EEPROM $14, ("     20 chars       ") 	; store msg in the EEPROM memory

EEPROM $28, ("      version 1     ") 	; store msg in the EEPROM memory
EEPROM $3C, ("              .com  ") 	; store msg in the EEPROM memory
EEPROM $50, ("This is msg 4       ") 	; store msg in the EEPROM memory
EEPROM $64, ("This is msg 5       ") 	; store msg in the EEPROM memory
EEPROM $78, ("This is msg 6       ") 	; store msg in the EEPROM memory
EEPROM $8C, ("This is msg 7       ") 	; store msg in the EEPROM memory
EEPROM $A0, ("This is msg 8       ") 	; store msg in the EEPROM memory
EEPROM $B4, ("This is msg 9       ") 	; store msg in the EEPROM memory
EEPROM $C8, ("This is msg 10      ") 	; store msg in the EEPROM memory
EEPROM $DC, ("This is msg 11      ") 	; store msg in the EEPROM memory
;EEPROM $F0, ("This is msg 12      ") 	; store msg in the EEPROM memory
;EEPROM $104, ("This is msg 13      ") 	; store msg in the EEPROM memory
;EEPROM $118, ("This is msg 14      ") 	; store msg in the EEPROM memory
;EEPROM $12C, ("This is msg 15      ") 	; store msg in the EEPROM memory
[/CODE]
 

srnet

Senior Member
EEPROM $F0, ("This is msg 12 ") ; store msg in the EEPROM memory
Your attempting to write beyond the end of EEPROM, EEPROM is only from locations 0 to 255, $00 to $FF, as per the explanation in the manual of the EEPROM commnad;

- Location is an optional constant (0-255) which specifies where to begin
And so hence the error message "Error: Invalid EEPROM location!"
 
When you increase the length of each message, it requires more space. Your last message is supposed to be stored beginning at location $12C which is 300. There isn't that much room so anything over 256 bytes isn't going to work for you.

Cheers.
 
Top