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 - neiljhs

Pages: [1]
1
OLEDs / Re: SPI Communication Start Byte
« on: August 04, 2015, 09:13:20 PM »
Sarah,

Thank you for the prompt response! Just looking to confirm I'm interpreting what you wrote correctly: you are saying that it is okay to send start bytes with each/all command/data messages?

2
OLEDs / Re: SPI Communication Start Byte
« on: July 28, 2015, 07:22:18 PM »
For follow-up clarification I've attached an image found in the US2066 driver datasheet (on page 11). My original question revolves around whether I can associate a 'start byte' with every command/data sequence.

A follow up, second question I have is how long the 'wait' drawn on the attached image should last? What is a minimum, safe delay time before transmitting the next command/data sequence?

3
OLEDs / Re: NHD-0216CW module using SPI - Question
« on: July 28, 2015, 06:58:25 PM »
Hello Fred,

I am currently in a situation very similar to the one you were in a couple of weeks back. I likewise am working with a screen that has a US2066 driver and am looking to use SPI for communication. The two differences between our setups is that my screen is 2x20 (instead of your 2x16) and I am running it in 'Low Voltage' mode (instead of your 5v mode).

I've cross compared my setup code with yours and have identified two points of deviation. One pertains to 3v versus 5v mode and thus is to be expected. The other difference I couldn't resolve/figure out what you were setting. I've highlighted the one in question below.

Quote
init_display:
         ldi   temp, $2A ; //function set (extended command set)
         rcall    display_command
         ldi   temp, $71; //function selection A
             rcall    display_command
         ldi   temp, $5c; // (0x5C) = enable regulator (5V I/O)
         rcall    display_data
         ldi   temp, $28; //function set (fundamental command set)
         rcall    display_command
         ldi   temp, $08; //display off, cursor off, blink off
         rcall    display_command
         ldi   temp, $2A; //function set (extended command set)
         rcall    display_command
         ldi   temp, $79; //OLED command set enabled
         rcall    display_command
         ldi   temp, $D5; //set display clock divide ratio/oscillator frequency
         rcall    display_command
         ldi   temp, $70; //set display clock divide ratio/oscillator frequency
         rcall    display_command
         ldi   temp, $78; //OLED command set disabled
         rcall    display_command
         ldi   temp, $08; //extended function set (2-lines)
         rcall    display_command
         ldi   temp, $06; //COM SEG direction
         rcall    display_command
         ldi   temp, $72; //function selection B
         rcall    display_command
         ldi   temp, $00; //ROM CGRAM selection
         rcall    display_data
         ldi   temp, $2A; //function set (extended command set)
         rcall    display_command
         ldi   temp, $79; //OLED command set enabled
         rcall    display_command
         ldi   temp, $DA; //set SEG pins hardware configuration
         rcall    display_command
         ldi   temp, $10; //set SEG pins hardware configuration
         rcall    display_command
         ldi   temp, $DC; //function selection C
         rcall    display_command
         ldi   temp, $10; //function selection C
         rcall    display_command
         ldi   temp, $81; //set contrast control
         rcall    display_command
         ldi   temp, $7F; //set contrast control
         rcall    display_command
         ldi   temp, $D9; //set phase length
         rcall    display_command
         ldi   temp, $F1; //set phase length
         rcall    display_command
         ldi   temp, $DB; //set VCOMH deselect level
         rcall    display_command
         ldi   temp, $40; //set VCOMH deselect level
         rcall    display_command
         ldi   temp, $78; //OLED command set disabled
         rcall    display_command
         ldi   temp, $28; //function set (fundamental command set)
         rcall    display_command
          ldi   temp, $01; //clear display
         rcall    display_command
         ldi   temp, $80; // SET dram ADDRESS TO 0X00
         rcall    display_command
         ldi   temp, $0F; //display ON
         rcall    display_command
         ldi   temp, $01
         rcall    display_command
         ldi   temp, $45
         rcall    display_data
         ret
;

Looking at the driver datasheet I could not resolve what the commands was (it seemed to deviate from the table). For reference I'm looking at the second line in the row dedicated to the 'command' named 'Function Selection C' on page 32 of the driver's datasheet (http://www.newhavendisplay.com/app_notes/US2066.pdf).

I am wondering if you changed this - or any other lines in your initialization - in between your posting it and your getting the OLED screen to work?

Secondly, it sounds as though you ended up placing delays at certain points in your code to help it function. In addition to the delays related to 'reset', did you also decide to place a blanket delay after each command/data byte is sent?

Thank you very much Fred, I greatly appreciate any insight you can provide!

4
OLEDs / SPI Communication Start Byte
« on: July 28, 2015, 04:37:37 PM »
Hello,

I am working with New Haven's NHD-0220CW-AG3 display and looking for clarification with regard to the "start byte". In order to help keep this post generalizable/helpful to as many people as possible, this should be directly applicable to any of New Haven's OLED's that use the US2066 driver. The data sheet says that:

Quote
To transfer several bytes continuously without changing D/C bit and R/W bit, start byte transfer is needed only at first starting time. Namely, after first start byte is transferred, real data can be transferred succeeding.

What I understand from that is that after the initial 3-byte long package establishing command or data mode (one start byte followed by two command/data bytes), that you can just send 2-byte long packages provided that you stick with the same mode of transmission (without the start byte). I am wondering, however, if it would also be valid to keep sending 3-byte long packages even when not switching from command to data (or vice-versa).

For example if I wanted to 'clear the display' and then 'return home' are both of these transmissions valid ways of instructing the screen to do that:

[0xF8][0x80][0x00]  [0xC0][0x00]
[0xF8][0x80][0x00]  [0xF8][0xC0][0x00]

Thank you in advance

Pages: [1]