I2C Display Address

alhoop

Member
I have been using the following code to identify the address of some OLED
displays - two - that I have.
One, a GLCD-FLEXEL was found to have an address of $8c. I have been using this OLED
for quite a while now.
The other unit - a .96" OLED was found to have an address of $78. Now if I just had some
code to drive it. Thanks Westy - got it working with help from a German program on this forum,
Just needed to toggle reset during initialization.
This might have been covered elsewhere on the forum. Feel free to offer suggestions/improvements.
C.0 turns an activity LED on and off - I think it takes a couple of minutes to go through 16 pages of address.

Code:
#picaxe 20x2
setfreq m8
#terminal 9600
#no_data
start:
For b0 = $10 to $F0 
low c.0
hi2csetup i2cmaster,b0,i2cslow,i2cbyte; set up i2c master for LCD
pause 300
;sertxd("b0 =  ",#b0,10,13)
hi2cin   (b4)
if b4 <> 255 then goto print
 cont:

next b0
high c.0
stop
print:
sertxd ("unit address = ",#b0,"  returned data =   ",#b4,10,13)
pause 200
high c.0
stop
Al Hooper
 
Last edited:

westaust55

Moderator
If you are seeking assistance with some code for your 0.96" OLED display, please provide details such as:
1. Make
2. Model
 
Top