Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

For users of Matrix Multimedia Electronics software to discuss projects, circuits and any other electronics concepts.

Moderators: Benj, Mods

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi I have the following display I would like to connect to a Pic 16 F1939. "NHD‐0216K1Z‐NS(RGB)FBW‐REV1"
It uses the following controller. "ST7066U"
When I add a LCD Display in Flowcode it uses 4 bit option, which is possible for this display.
However it does not have a connection for RW which is pin 5 on the LED display.
Can I still use it with flowcode?
What do I do with the RW connection?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Benj »

Hello,

The Flowcode component cannot read back from the display so we have tied the R/W pin to ground to save on the required I/O.

Also note that the 4 data pins connect to the upper nibble of the display data bus.

See here for a schematic example.
http://www.matrixmultimedia.com/resourc ... 5-30-4.pdf

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
This is almost normal LCD display (easily can be used by FC) just the exception of different back light which can be controlled by voltage according to the following data sheet. http://www.newhavendisplay.com/specs/NH ... W-REV1.pdf
As shown in the link pdf, you need to use 4 bits out of 8-bit data bus and flow code supports only 4-bit bus. If you have any PIC like 16f877a or even PIC12f 675 in that case I can tell you how to use that and whenever you test that fine you can switch to PIC16f1936.

For example in PIC 16f877a,
PORTB<0> LCD DB4
PORTB<1> LCD DB5
PORTB<2> LCD DB6
PORTB<3> LCD DB7
PORTB<4> LCD RS
PORTB<5> LCD E
GND > LCD R/W

So basically LCD R/W need to be connected to GND that's why FC has no connection option for it. Here I am attaching wiring diagram and pin description..
Attachments
PIN.PNG
(56.45 KiB) Downloaded 23029 times
LCD.PNG
(19.77 KiB) Downloaded 23029 times
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Enamul wrote:Hi Uli,
This is almost normal LCD display (easily can be used by FC) just the exception of different back light which can be controlled by voltage according to the following data sheet. http://www.newhavendisplay.com/specs/NH ... W-REV1.pdf
As shown in the link pdf, you need to use 4 bits out of 8-bit data bus and flow code supports only 4-bit bus. If you have any PIC like 16f877a or even PIC12f 675 in that case I can tell you how to use that and whenever you test that fine you can switch to PIC16f1936.

For example in PIC 16f877a,
PORTB<0> LCD DB4
PORTB<1> LCD DB5
PORTB<2> LCD DB6
PORTB<3> LCD DB7
PORTB<4> LCD RS
PORTB<5> LCD E
GND > LCD R/W

So basically LCD R/W need to be connected to GND that's why FC has no connection option for it. Here I am attaching wiring diagram and pin description..
Is it possible to change some of the connections in order to simplify the PC Board?
Something like this.

PORTB<0> LCD DB7
PORTB<1> LCD DB6
PORTB<2> LCD DB5
PORTB<3> LCD DB4
PORTB<4> LCD E
PORTB<5> LCD RS

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
LCD component of flowcode has this flexibility to swap between connections. I mean you can connect any LCD pin to any port pins. no sequence is essential and even different port can be used.
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

That sounds cool
Ho do you connect those Pins directly or should I use some resistors or diodes for protection?
For the Backlight I would like to try software PWM to change intensity.
Can I connect it directly to a free pin of the Pic with the right resistor for the current or should I use a transistor for each colour?
Uli

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Ho do you connect those Pins directly or should I use some resistors or diodes for protection?
Don't connect any resistor between PIC pin and DB,E,RS of LCD. If you connect even 220 ohm it causes problem to LCD, I have seen.
For the Backlight I would like to try software PWM to change intensity.
I don't recommend you to use PWM for that. Because LCD will be unstable in that case.
Can I connect it directly to a free pin of the Pic with the right resistor for the current or should I use a transistor for each colour?
I think you have noticed BLUE/GREEN has same voltage (3.3v) to work but red is 2.2. I rather recommend to use transistor to switch between colours.
I have attached here a circuit for you.
Attachments
connection.PNG
(27.21 KiB) Downloaded 23012 times
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Thanks for the Info.
Will the LCD become unstable even if you use a separate regulator for the supply of the Backlight?
I was hoping to make an animation where the colour will change slowly.

I see you rather use a voltage divider than a series resistor.
I do not understand, is not pin number 16 supposed to get a lower voltage than the others?

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Ooops! :oops: I put opposite values. I have corrected now.
Will the LCD become unstable even if you use a separate regulator for the supply of the Backlight?
I was hoping to make an animation where the colour will change slowly.
I think you can make nice animation if you want using the above circuit as well. Just need to switch transistors by PIC a bit fast and this is easily possible.
If you want I can make a program for you..normal text in LCD but back-light will switch between colours.
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

If you use a 1 K resistor at 3.3 volt you get 3.3 mA
But the backlight can take easily 20mA should one not change the resistors values to a lower one?

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
Yes, I should notice that one. :cry: I was just thinking for voltage not for current. You are going to drive LCD back-light which need a good amount of current..You can just maintain ratio but reducing the value of resistor to have proper current to drive the back-light.
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Why not just use a current limiting resistor?
What is the advantage of a voltage divider?

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Why not just use a current limiting resistor?
Yes, of course the R2 resistor will be the current limiting resistor..That's why I told in my last post to reduce it's and R3's value but to maintain proportion.
What is the advantage of a voltage divider?
If you not use potential divider how you going to maintain required voltage 2.2v and 3.3 v for different colours?
You can try if they run on +5V (of course current limited :!: )but I think there might be a risk as in datasheet it is mentioned clearly 2.2v and 3.3V
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
I think although it is mentioned in datasheet as power supply for color LEDs..But it is mainly current drive and that voltage is cut-in voltage for LEDs. so, you are right I guess. I was thinking about datasheet only not thinking about basic electronics. In normal LCD's I have driven backlight with even 48V no problem just need to limit current..So I think you can use 220 ohm for all three using the attached circuit..
Attachments
connection.PNG
(27.21 KiB) Downloaded 23000 times
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Creative25 wrote:
Enamul wrote:Hi Uli,
This is almost normal LCD display (easily can be used by FC) just the exception of different back light which can be controlled by voltage according to the following data sheet. http://www.newhavendisplay.com/specs/NH ... W-REV1.pdf
As shown in the link pdf, you need to use 4 bits out of 8-bit data bus and flow code supports only 4-bit bus. If you have any PIC like 16f877a or even PIC12f 675 in that case I can tell you how to use that and whenever you test that fine you can switch to PIC16f1936.

For example in PIC 16f877a,
PORTB<0> LCD DB4
PORTB<1> LCD DB5
PORTB<2> LCD DB6
PORTB<3> LCD DB7
PORTB<4> LCD RS
PORTB<5> LCD E
GND > LCD R/W

So basically LCD R/W need to be connected to GND that's why FC has no connection option for it. Here I am attaching wiring diagram and pin description..
Is it possible to change some of the connections in order to simplify the PC Board?
Something like this.

PORTB<0> LCD DB7
PORTB<1> LCD DB6
PORTB<2> LCD DB5
PORTB<3> LCD DB4
PORTB<4> LCD E
PORTB<5> LCD RS
Hi :lol:
Just want to let you know I changed the pins according to my likings and everything is working great.
With one color at 20 mA the display is a bit dim. Is it a bad for the display to apply more power maybe 25 mA
Best Regards:
Uli

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Enamul wrote:Ooops! :oops: I put opposite values. I have corrected now.
Will the LCD become unstable even if you use a separate regulator for the supply of the Backlight?
I was hoping to make an animation where the colour will change slowly.
I think you can make nice animation if you want using the above circuit as well. Just need to switch transistors by PIC a bit fast and this is easily possible.
If you want I can make a program for you..normal text in LCD but back-light will switch between colours.
Hi Enamul
I would appreciate if you could make an example program for changing colour slowly.
For the backlight I use Pin 28-30 which is RD5-RD7.
Best Regards:
Uli

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
It's nice to know that it worked.. :)
According to datasheet you can apply maximum 30mA, so safe is to use max 25mA. so my suggestion is to try to drive with 25mA and see how bright is it..

I will post one program shortly...
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Hi Uli,
Here is the program...RED RD5, GREEN RD6 & BLUE RD7

Delay 500 ms determines the switching frequency between colors of back-light... You can adjust that according to your requirement.
Attachments
RGB_LCD.fcf
(13 KiB) Downloaded 695 times
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi

[quote="Enamul"]Hi Uli,
It's nice to know that it worked.. :)
According to datasheet you can apply maximum 30mA, so safe is to use max 25mA. so my suggestion is to try to drive with 25mA and see how bright is it..

I have found that applying more current, it does not make a big difference on brightness.
However I have checked how good one can see if the device is in brought sunlight.
When i use the read LED the numbers can still be read in sunlight but are a bit dim.
If I use green or blue, then the numbers can still be seen very clearly.
So I can say brightness is not a big issue. In sunlight it even read reads much better than a LED display I used previously. (I could not read the numbers).
So for a transmissive Display I think it is very good. After all the Backlight uses less energy than the 4 digit LED display and can be seen much clearer in sunlight.
It is a great device, it works better than expected.
Best Regards:
Uli

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi
I just wonder how often is a good rate to update the LCD display.
I want it to be fast but still well under the maximum rate.
What is a good rate?
Also my question is this how long does it take to send data to the LCD?
I want to estimate how long my program needs to go through one cycle.
Communication speed is set to 100Khz
Best Regards:
Uli.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Enamul »

Also my question is this how long does it take to send data to the LCD?
I guess raw_send macro takes around 600us so it should be less than 1ms.

Code: Select all

I just wonder how often is a good rate to update the LCD display.
I want it to be fast but still well under the maximum rate.
What is a good rate?
It should not be less than 0.5s per update..it will flicker a bit I feel although it's my personal feeling.
Enamul
University of Nottingham
enamul4mm@gmail.com

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi.
My LCD has been working for quite some time now.
I soldered it onto the board and it was working fine for some time.
But since about a week it sometimes it suddenly it goes blank.
Sometimes it shows strange characters. Numbers that are not supposed to be there.
One thing that happens every thime it goes off is that the bottom line is missing I can see this when I adjust the contrast so I can see the dots that are blank as whell.
I just wonder is there a problem with contacts from PC Board to the display. Or is the display gone bad?
If it is just a communication problem will the bottom line of dots be missing as well?
Sometimes it comes back after disconnecting power for a few seconds, sometimes not.

Best Regards:
Uli

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi
Just a short update on the display.
Suddenly it started to schow numbers on and off on the first Line.
Now it schows just the first line everything correct.
Second line displays nothing, just the dots you see if you adjust the contrast too much a few lines of the dots are missing.
Would that mean that the display is faulty?

Best Regards:
Uli

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Benj »

Hi Uli,

Sounds like one of the liquid crystal controllers IC's may have become a bit unhinged, maybe due to a voltage spike or some sort of static shock. Might be worth adding a couple of 100nF or 1uF smoothing caps between the power rails right next to the LCD to see if this prevents the damage from happening again.

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Connecting NHD‐0216K1Z‐NS(RGB)FBW‐REV1 Display.

Post by Creative25 »

Hi.
Just an update on the Display.
I scratched away all the flux between the soldering contacts, and since it is working all.
Question can flux develov into a capacitor of even cause a short after some time of usage?
I still have to wait for some time to see if the Problem is solved permanently.

Best Regards:

Uli

Post Reply