Aggravating OLED display

rq3

Senior Member
I've been playing with an Adafruit 128x32 OLED display, and managed to get it to light up and display a test image created from a BMP file in LCDAssistant.

After a lot of struggling and playing with various init parameters, here's the code:

Code:
#PICAXE 20M2
setfreq M32
dirsC=%11111101                ;make C.1 input(C.1 is decay mode)
outpinsC=%00001000        ;disable the stepper driver and stay here

test:
hi2csetup i2cmaster,%01111000,i2cfast_32,i2cword

hi2cout (0xA8,0x07,0x8d,0x14,0xA1,0xDA,0x02,0xAF) ;initialize display
;#rem
;hi2cout (0xAE)                ;turn off display(RESET=OFF)
;hi2cout (0x00)                ;low column nibble(RESET=0)
;hi2cout (0x1F)                ;high column nibble(RESET=0)
;hi2cout (0x40)
;hi2cout (0xB0)                ;start page address(RESET=0)
;hi2cout 0x20,(0x02)    ;memory address mode(RESET=02 [page])
;hi2cout 0xD5,(0x80)    ;oscillator frequency and divider(RESET=80)00
;hi2cout 0xA8,(0x07)    ;mux ratio(RESET=3F [64 lines])
;hi2cout 0xD3,(0x00)    ;display offset,COM vertical shift(RESET=0)
;hi2cout 0x8D,(0x14)    ;enable charge pump(RESET=10 [OFF])
;hi2cout (0xA1)                ;segment remap(RESET=SEG0, COL0) 00 mirror image
;hi2cout (0xC0)                ;COM output scan(RESET=C0, C8 flips display)
;hi2cout 0xDA,(0x02)    ;COM pins hardware config(RESET=1b[alternate])
;hi2cout 0x81,(0xCF)    ;contrast CF(RESET=7F)
;hi2cout 0xD9,(0xF1)    ;pre-charge period F1(RESET=22)
;hi2cout 0xDB,(0x30)    ;Vcom deselect(RESET=20)
;hi2cout (0xA4)                ;turn all on ignore RAM A5/RAM A4(RESET=A4)
;hi2cout (0xA6)                ;normal display A6/inverted A7(RESET=A6)
;hi2cout (0xAF)                ;turn on display

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte ;load two 8 bit lines
hi2cout 0x40,( _
0x00, 0x00, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, _
0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00)
The data sheet for the SSD1306 driver is here:
http://www.adafruit.com/datasheets/SSD1306.pdf

I'm hoping someone can help me with two items:

1) The SSD1306 insists that its initialization be done with i2cword, and it insists that its display RAM be loaded with i2cbyte. Am I configuring the RAM data incorrectly?

2) For the life of me, I can't figure out how to clear the display, short of writing all zeros to the RAM!

I've tried all of the obvious, like running the picaxe clock at the standard (4 MHz) rate with "i2cslow" in the setup. inserting generous pauses, etc.

Any and all comments very welcome!

Thanks, Rip
 

g6ejd

Senior Member
I have a display that has no 'clear' command, what it does is it continuously displays the contents of the GDDRAM, which you can read/write to. So to clear the screen I send it '0' to each ram byte address, so option-2 for you.
 

hippy

Senior Member
1) The SSD1306 insists that its initialization be done with i2cword, and it insists that its display RAM be loaded with i2cbyte.
I'm not sure it insists on that, and looking at the protocol described on page 20 it's a byte orientated protocol and not using any memory location addressing as such. You should be able to do everything using i2cbyte.

I can't match what you are sending for initialisation to the protocol defined in the datasheets. The first byte in every HI2COUT command should be a control byte %xx000000 as I read it.

HI2cOut ( %01000000, dataByte { ... dataByte } )
HI2cOut ( %10000000, commandByte )
HI2cOut ( %10000000, commandByte, %00000000, commandParameterByte )

Or you can send that as a byte location address ...

HI2cOut %01000000, ( dataByte { ... dataByte } )
HI2cOut %10000000, ( commandByte )
HI2cOut %10000000, ( commandByte, %00000000, commandParameterByte )

Your bitmap / data writing conforms to that, your initialisation doesn't.

I'm not familiar with this device so perhaps try and find some code which does initialise the device using I2C and that may shine more light on things. Of course, if you are happy it is being initialised correctly it perhaps doesn't matter.
 

rq3

Senior Member
Hippy, that's the weird part. The initialization line in my code is comprised of those commands (listed in the commented out section), which are NOT set to the required state by a reset. In other words, I can either run that "one line" init routine, OR I can run the sequence of individual init commands. In either case, it will ONLY init if "i2cword" is used in the setup.

Conversely, I can only load data into the display RAM with a new setup using "i2cbyte".

I'm going to try your format explicitly and see what happens!

Many thanks, Rip
 

rq3

Senior Member
Update. Nope.
Ive tried:
hi2cout 0x80,(command byte, command parameter byte)
and I've tried:
hi2cout (0x80, command byte, command parameter byte)
and I've tried:
hi2cout (command byte, command parameter byte)

They all work, but only if the i2c setup includes "i2cword".
Likewise, the graphics RAM only accepts "i2cbyte" in the setup. I've tried this with both 4 pixel/byte and 8 pixel/byte files.

Strange.
 

hippy

Senior Member
They all work, but only if the i2c setup includes "i2cword".
Odd because none of the formats match what the protocol seems to call for and the last is different to the other two, plus that last puts exactly the same on the I2C bus regardless whether i2cbyte or it2cword.

I suspect you are getting lucky; you are not fully initialising the device but doing something which makes it appear to be initialised while avoiding anything which prevents it working.

That you can initialise it with your single line suggests you don't need to set all parameters set by the multi-line initialisation. I would guess most things, maybe all, get initialised to defaults at turn-on or reset. In which case you might get away with just -

hi2csetup i2cmaster, %01111000, i2cfast_32, i2cbyte
hi2cout $80, ( $AF )
 

rq3

Senior Member
Exactly Hippy. The multi-line is a list of all of the parameters that can be changed, along with their status after a reset (in the comments). I turned these on and off one by one to select the critical values in the one line init.

To test your idea I tacked this onto the end of my code:

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cword
blink:
hi2cout (0xAE) ;turn display off
pause 8000
hi2cout (0xAF) ;turn display on
pause 8000
goto blink

and indeed the display blinks on and off at a one second rate (note the 32 MHz Picaxe clock). If I change the setup line to "i2cbyte", it does not work.

I think I need to talk to the manufacturer to see if they really meant to cherry pick which parts of the I2C spec to comply with!
It's a very pretty display, and only lacks some buffer memory to be truly useful.

Many thanks! Rip
 

Technical

Technical Support
Staff member
The whole issue here is that you can never send a command like this

hi2cout (0xAE)

You must always send two bytes, the first byte setting the D/C and Co bits, the second byte the command itself. See page 20 of the datasheet.

hi2cout (%10000000 ,$AE) ; c0 = 1, D/C = 0

or this, which is exactly the same in byte mode

hi2cout %10000000 ,($AE) ; c0 = 1, D/C = 0

That is probably why you have all the byte/word confusion, as the display is expecting extra control bytes you are not sending.
 

hippy

Senior Member
Try ...

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte
blink:
hi2cout ($00, 0xAE) ;turn display off
pause 8000
hi2cout ($00, 0xAF) ;turn display on
pause 8000
goto blink

and

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte
blink:
hi2cout $00, (0xAE) ;turn display off
pause 8000
hi2cout $00, (0xAF) ;turn display on
pause 8000
goto blink

You need to send a control byte before every command byte. I thought that would have been %10000000 ( see earlier post ) but maybe it is %00000000; the datasheet doesn't really explain the bit allocations in the control bytes very well. if $00 doesn't work, then try $80.
 

rq3

Senior Member
Try ...

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte
blink:
hi2cout ($00, 0xAE) ;turn display off
pause 8000
hi2cout ($00, 0xAF) ;turn display on
pause 8000
goto blink

and

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte
blink:
hi2cout $00, (0xAE) ;turn display off
pause 8000
hi2cout $00, (0xAF) ;turn display on
pause 8000
goto blink

You need to send a control byte before every command byte. I thought that would have been %10000000 ( see earlier post ) but maybe it is %00000000; the datasheet doesn't really explain the bit allocations in the control bytes very well. if $00 doesn't work, then try $80.
Well, that tears it. I tried every possible permutation of i2cbyte and i2cword, both with and without explicit 0x80 command bytes. This device emphatically only accepts control commands as i2cword, and only accepts graphics RAM input as i2cbyte.

If a command input is a single byte (like 0xAF to turn the display on), then it WILL accept i2cbyte in the setup, but all multi-byte inputs insist on i2cword.

I think I'll order a serial OLED from you folks. My head hurts.

Thanks, Rip
 

hippy

Senior Member
Well, that tears it. I tried every possible permutation of i2cbyte and i2cword, both with and without explicit 0x80 command bytes.
Did you try 0x00 control codes ?

Added: Also, what exactly did you try ? Did you change for the initialisation or just the display on/off added to the end of the code which initialises using i2cword ?

I'll post a full code example which should work in a few minutes.

This device emphatically only accepts control commands as i2cword, and only accepts graphics RAM input as i2cbyte.
I2C is a byte steaming protocol so, regardless that it works with i2cword, it should also work with i2cbyte.

An example of claimed working C++ code for the Adafruit 128x32 device (oled.cpp) shows the command protocol to be -

<id> 0x00 <cmd>

http://www.raspberrypi.org/phpBB3/download/file.php?id=1943&sid=a64cf6e7cbeee79691f50c3547d76e5d

Those would match with, using i2cbyte -

Hi2cOut $00, ( <cmd> )

If that does not work it is rather inexplicable.
 
Last edited:

hippy

Senior Member
Code:
#Picaxe 20M2
#No_Data

SetFreq M32

dirsC = %11111101              ; make C.1 input(C.1 is decay mode)
outpinsC = %00001000           ; disable the stepper driver and stay here

HI2cSetup I2CMASTER, $A0, I2CFAST_32, I2CBYTE

HI2cOut $00, ( $AE           ) ; Display off
HI2cOut $00, ( $D5, $80      ) ; set display clock division
HI2cOut $00, ( $A8, $1F      ) ; set multiplex
HI2cOut $00, ( $D3, $00      ) ; set display offset
HI2cOut $00, ( $40           ) ; set start line #0
HI2cOut $00, ( $8D, $14      ) ; set charge pump
HI2cOut $00, ( $20, $00      ) ; Memory mode
HI2cOut $00, ( $A1           ) ; Segremap($A0 = reset, $A1 = 127 = SEG0)
HI2cOut $00, ( $C8           ) ; Com scan dec ($C0 = reset normal, $C8 = scan from Com[n-1] - Com 0
HI2cOut $00, ( $DA, $02      ) ; Set com pins
HI2cOut $00, ( $81, $8F      ) ; Set contrast
HI2cOut $00, ( $D9, $F1      ) ; Set precharge
HI2cOut $00, ( $DB, $40      ) ; Set Vcom select
HI2cOut $00, ( $A4           ) ; Resume RAM content display
HI2cOut $00, ( $A6           ) ; Normal display not inverted
HI2cOut $00, ( $21, $00, $7F ) ; Set column address; start 0, end 127
HI2cOut $00, ( $22, $00, $03 ) ; Set row address; start 0, end 3
HI2cOut $00, ( $AF           ) ; Display on


HI2cOut $40, _
( _
  $00, $00, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, _
  $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $00, $00  _
)

Do 
  HI2cOut $00, ( $AF         ) ; Display on
  Pause 8000
  HI2cOut $00, ( $AE         ) ; Display off
  Pause 8000
Loop
 

rq3

Senior Member
Hippy / Technical !!!

0x00 won't work per page 20 of the SSD1306 control chip manual because that sets CO (continuation bit) to 0, telling the chip to expect RAM data IF the DC bit is also low. So, 0x40 says expect graphics RAM data, and 0x80 says expect control bytes.

BUT - you guys have never failed, so in the true spirit of 6 monkeys on 6 typewriters I whaled on parameters until this worked for initialization of the chip:

hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte

hi2cout 0x80,(0xAE,0x00,0x00,0xB0,0x20,0x00,0xD5,0x80,0xA8,0x1F,0xD3,0x00,0x8D, _
0x14,0xA1,0x00,0xC8,0xDA,0x02,0x81,0xCF,0xD9,0xF1,0xDB,0x30,0xA4,0xA6,0xAF)

I can modify the individual control parameters and see them take effect.

The SEQUENCE of the control bytes is critical, above and beyond the obvious (like turning on the "high voltage" multiplier before attempting to turn on the display).

Thank you not only for all of your help, but also for supplying me with the belief that it could be done!

Regards, Rip

PS: this poor 20M2 also runs a stepper motor, touch switches, and an I2C altimeter.
I'll be ordering an AXE133Y tomorrow, though this has certainly been a learning experience.
 

hippy

Senior Member
0x00 won't work per page 20 of the SSD1306 control chip manual because that sets CO (continuation bit) to 0, telling the chip to expect RAM data IF the DC bit is also low. So, 0x40 says expect graphics RAM data, and 0x80 says expect control bytes.
Bit 6 being zero is the 'expect control bytes' ( 0=command, 1=data, which fits what you have ) but Bit 7 "continuation" is confusingly defined, firstly in 'continuation of what?' and secondly in its later definition of, "If the Co bit is set as logic &#8220;0&#8221;, the transmission of the following information will contain data bytes only"; it's not at all clear what that means. The 128x64 datasheet is no help as it uses the same wording. Other examples of code I have found indicate 0x00 precede commands, but $80 works here. Go figure!

But the important thing is it seems to now be working with i2cbyte. It might be worth coming back to find a version with one command per HI2COUT later but we can appreciate this is an aside to wanting to get on and actually use it and do other things. Thanks for putting the effort in to figure things out.
 

rq3

Senior Member
Bit 6 being zero is the 'expect control bytes' ( 0=command, 1=data, which fits what you have ) but Bit 7 "continuation" is confusingly defined, firstly in 'continuation of what?' and secondly in its later definition of, "If the Co bit is set as logic “0”, the transmission of the following information will contain data bytes only"; it's not at all clear what that means. The 128x64 datasheet is no help as it uses the same wording. Other examples of code I have found indicate 0x00 precede commands, but $80 works here. Go figure!

But the important thing is it seems to now be working with i2cbyte. It might be worth coming back to find a version with one command per HI2COUT later but we can appreciate this is an aside to wanting to get on and actually use it and do other things. Thanks for putting the effort in to figure things out.
Here's the code I used to beat this dead horse; both single line init, and one hi2cout per command so that one can play with the effect of each (it's not pretty, screen flips, mirrors, rolls, scrolls, inverts, etc., depending on mux, frequency, address method, etc.)

Code:
#PICAXE 20M2
setfreq M32
dirsC=%11111101                ;make C.1 input(C.1 is decay mode)
outpinsC=%00001000        ;disable the stepper driver and stay here
pause 1000

test:
hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte

hi2cout 0x80,(0xAE,0x00,0x00,0xB0,0x20,0x00,0xD5,0x80,0xA8,0x1F,0xD3,0x00,0x8D, _
0x14,0xA1,0x00,0xC8,0xDA,0x02,0x81,0xCF,0xD9,0xF1,0xDB,0x30,0xA4,0xA6,0xAF)
#rem
hi2cout 0x80,(0xAE)                ;turn off display(RESET=OFF)
hi2cout 0x80,(0x00,0x00)    ;low column nibble(RESET=0),high column nibble(RESET=0)
hi2cout 0x80,(0xB0)                ;start page address(RESET=0)
hi2cout 0x80,(0x20,0x00)    ;memory address mode(RESET=02 [page])
hi2cout 0x80,(0xD5,0x80)    ;oscillator frequency and divider(RESET=80)00
hi2cout 0x80,(0xA8,0x1F)    ;mux ratio(RESET=3F [64 lines])
hi2cout 0x80,(0xD3,0x00)    ;display offset,COM vertical shift(RESET=0)
hi2cout 0x80,(0x8D,0x14)    ;enable charge pump(RESET=10 [OFF])
hi2cout 0x80,(0xA1,0x00)    ;segment remap(RESET=SEG0, COL0) 00 mirror image
hi2cout 0x80,(0xC8)                ;COM output scan(RESET=C0, C8 flips display)
hi2cout 0x80,(0xDA,0x02)    ;COM pins hardware config(RESET=12[alternate])
hi2cout 0x80,(0x81,0xCF)    ;contrast CF(RESET=7F)
hi2cout 0x80,(0xD9,0xF1)    ;pre-charge period F1(RESET=22)
hi2cout 0x80,(0xDB,0x30)    ;Vcom deselect(RESET=20)
hi2cout 0x80,(0xA4)                ;turn all on ignore RAM A5/RAM A4(RESET=A4)
hi2cout 0x80,(0xA6)                ;normal display A6/inverted A7(RESET=A6)
hi2cout 0x80,(0xAF)                ;turn on display
#endrem
 

rq3

Senior Member
Just to REALLY beat this to death, this code will init the display (with either a single line command, or with access to individual commands), and put up a test screen consisting of a two pixel wide box around the 128x32 display area, evenly divided with two pixel wide lines vertically and horizontally. The letters UL and LL are displayed in the Upper Left and Lower Left quadrants for orientation. Trust me, you'll need it.

Code:
#PICAXE 20M2
setfreq M32
dirsC=%11111101                ;make C.1 input(C.1 is decay mode)
outpinsC=%00001000        ;disable the stepper driver and stay here
pause 1000

test:
hi2csetup i2cmaster,%01111000,i2cfast_32,i2cbyte

hi2cout 0x80,(0xAE,0x00,0x00,0xB0,0x20,0x00,0xD5,0x80,0xA8,0x1F,0xD3,0x00,0x8D, _
0x14,0xA1,0x00,0xC8,0xDA,0x02,0x81,0xCF,0xD9,0xF1,0xDB,0x30,0xA4,0xA6,0xAF)
#rem
hi2cout 0x80,(0xAE)                ;turn off display(RESET=OFF)
hi2cout 0x80,(0x00,0x00)    ;low column nibble(RESET=0),high column nibble(RESET=0)
hi2cout 0x80,(0xB0)                ;start page address(RESET=0)
hi2cout 0x80,(0x20,0x00)    ;memory address mode(RESET=02 [page])
hi2cout 0x80,(0xD5,0x80)    ;oscillator frequency and divider(RESET=80)00
hi2cout 0x80,(0xA8,0x1F)    ;mux ratio(RESET=3F [64 lines])
hi2cout 0x80,(0xD3,0x00)    ;display offset,COM vertical shift(RESET=0)
hi2cout 0x80,(0x8D,0x14)    ;enable charge pump(RESET=10 [OFF])
hi2cout 0x80,(0xA1,0x00)    ;segment remap(RESET=SEG0, COL0) 00 mirror image
hi2cout 0x80,(0xC8)                ;COM output scan(RESET=C0, C8 flips display)
hi2cout 0x80,(0xDA,0x02)    ;COM pins hardware config(RESET=12[alternate])
hi2cout 0x80,(0x81,0xCF)    ;contrast CF(RESET=7F)
hi2cout 0x80,(0xD9,0xF1)    ;pre-charge period F1(RESET=22)
hi2cout 0x80,(0xDB,0x30)    ;Vcom deselect(RESET=20)
hi2cout 0x80,(0xA4)                ;turn all on ignore RAM A5/RAM A4(RESET=A4)
hi2cout 0x80,(0xA6)                ;normal display A6/inverted A7(RESET=A6)
hi2cout 0x80,(0xAF)                ;turn on display
#endrem

hi2cout 0x40,( _                                                    
0xFF, 0xFF, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, _
0x03, 0x03, 0xFB, 0xFB, 0x03, 0x03, 0x03, 0x03, 0xFB, 0xFB, 0x03, 0x03, 0x03, 0x03, 0xFB, 0xFB, _
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, _
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, _
0xFF, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, _
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, _
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, _
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, 0xFF, _
0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, _
0x80, 0x80, 0xBF, 0xBF, 0xB0, 0xB0, 0xB0, 0xB0, 0xBF, 0xBF, 0x80, 0x80, 0x80, 0x80, 0xBF, 0xBF, _
0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, _
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF, _
0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, _
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, _
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, _
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF, 0xFF, _
0xFF, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, _
0x01, 0x01, 0xFD, 0xFD, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFD, 0xFD, _
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, _
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, _
0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, _
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, _
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, _
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0xFF, _
0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, _
0xC0, 0xC0, 0xDF, 0xDF, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xC0, 0xC0, 0xC0, 0xC0, 0xDF, 0xDF, _
0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, _
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, _
0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, _
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, _
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, _
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, 0xFF)
 

BESQUEUT

Senior Member
Code:
hi2cout 0x80,(0x00,[COLOR="#FF0000"]0x00[/COLOR])    ;low column nibble(RESET=0),high column nibble(RESET=0)
"higher nibble of the column start address register" command cannot be 0x0*
it must be 0x1*
for example, it can be 0x10
 
Last edited:
Top