Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rheib

Pages: [1]
1
OLEDs / Re: NHD-0420CW I2C interface
« on: February 01, 2017, 08:07:57 AM »
 :-\
 Saurabh_B, Could you please be more specific here with your answer? I am also having a terrible time interpreting these bits in the data sheet and I would rather venture into knowing exactly how to exercise the I2C bus, for use of the US2066 controller in the NHD-0216CW display, instead of experimenting.  Specifically can you correct and detail the following "understanding"?:

1) Control Byte: 8 bits. MSB = bit 7, LSB = bit 0, bit 7 = Continuation bit, this bit, when set, instructs the US2066 controller that there are more bytes to follow in "this" transaction. An Example: write "123" to the display (Assume that the display has been set up and cursor is at row 1 column 1). The bytes that would(appear) be written on the I2C bus would be:
Slave Address = 0x78 (SA0 tied to GND), Control Byte = 0xC0 (Continuation Bit Set AND Data Bit Set), Data Byte = 0x31", Control Byte = 0xC0, Data Byte = 0x32, Control Byte = 0x80 (Continuation Bit Cleared and Data Bit Set), Data Byte = 0x33.  I am expecting that this sequence would adhere to the normal I2C transactional protocol whereby each byte transmitted would have a Start bit AND an Ack/Nack bit and after the last data byte, the master would terminate with a stop condition...

2) Example, Set DDRAM Address to 0x33: The bytes that would (appear) be written on the I2C bus would be:
Slave Address = 0x78 (Sa0 tied to GND), Control Byte 0x80 (Continuation Bit Set, Data Bit Cleared), Command Byte = 0x20 (setting N, BE, RE, and REV to 0), Control Byte = 0xB3 (0x80 + 0x33 for AC6-AC0). Again, I am expecting that this sequence would adhere to the normal I2C transactional protocol whereby each byte transmitted would have a Start bit AND an Ack/Nack bit and after the last data byte, the master would terminate with a stop condition...

What is vitally important here is the proper behavior of the Continuation bit when multiple bytes are sent to the display over the I2C. And, the behavior of the Start bit on the front of every byte that gets sent. The Start bit is standard I2C and to diverge from this makes it very difficult to implement in a system with standard I2C cores that do this all automatically.

One suggestion would be to add several examples of actual transactional sequences, similar to that shown in the US2066 data sheet (Figure 5-7 : I2C-bus data format) but add all of the details showing the values of the Control Bytes, command/data bytes, and start/stop bits. Code examples accompanying each graphic would also be tremendously helpful.

Thank you,

RSH

Pages: [1]