Can't get Newhaven NHD-216CW-AY3 OLED display up and running using I2C. Finally got it with SPI so I know my initialization sequence is OK. I think the problem is getting the right I2COUT command format! I've tried several, including hi2cout $00,(Out_Byte1) and hi2cout [$7A],$00,(Out_Byte1) and what is shown below, but nothing seems to work!
what next
I'm using a 20X2
the manual for the 2066 controller (inside this OLED module) is http://www.newhavendisplay.com/app_notes/US2066.pdf page 10 addresses I2C. The "c0" bit is a little confusing, but I think it is used if multiple bytes of data/commands are being sent and tells the controller that the flow is going to change from data to commands or visa versa. but anyway, I am not sending data strings, and decided on my control bytes (which hold c0) as
"$00" for commnads and $40 for data - these come from an example I found here: http://www.newhavendisplay.com/NHD_forum/index.php/topic,914.msg1904.html#msg1904
here's the i2c part of my code:
setfreq M8
hi2csetup i2cmaster, $7A, i2cslow_8, i2cbyte
Send_Command:
hi2cout ($00,Out_byte1) '
pause 20
return
Send_Data:
hi2cout $40,(Out_Byte1) '
pause 20
return
THANKS for any help!!!
what next
I'm using a 20X2
the manual for the 2066 controller (inside this OLED module) is http://www.newhavendisplay.com/app_notes/US2066.pdf page 10 addresses I2C. The "c0" bit is a little confusing, but I think it is used if multiple bytes of data/commands are being sent and tells the controller that the flow is going to change from data to commands or visa versa. but anyway, I am not sending data strings, and decided on my control bytes (which hold c0) as
"$00" for commnads and $40 for data - these come from an example I found here: http://www.newhavendisplay.com/NHD_forum/index.php/topic,914.msg1904.html#msg1904
here's the i2c part of my code:
setfreq M8
hi2csetup i2cmaster, $7A, i2cslow_8, i2cbyte
Send_Command:
hi2cout ($00,Out_byte1) '
pause 20
return
Send_Data:
hi2cout $40,(Out_Byte1) '
pause 20
return
THANKS for any help!!!