Newhaven Display Forum

Newhaven Products => Character LCDs => Topic started by: atalanta on May 28, 2014, 07:39:23 AM

Title: NHD-0420D3Z-NSW-BBW-V3 how to interface
Post by: atalanta on May 28, 2014, 07:39:23 AM
Hi,

i am new with LCDs. I try to interface NHD-0420D3Z-NSW-BBW-V3 with my LPC1768 with RS232 but the screen display only some nonsensical symbols. I use default baud 9600 and i take care the execution times. I saw your code here http://www.newhavendisplay.com/app_notes/Serial_LCD.txt and i do the same i think except from this
        BAUDCTL = 0x08;
   SPBRG = 207;
   SPBRGH = 0;
because i dont know how. these are the registers of PIC16F690??

edit: when i send prefix 0xFE the screen display a nonsensical symbol.
i use the same communication format. :/
 
thanks
Title: Re: NHD-0420D3Z-NSW-BBW-V3 how to interface
Post by: Michael_L on May 28, 2014, 08:13:21 AM
Those register assignments are for the micro being used to drive the display, not the PIC16F690.  Those lines of code are properly setting up the RS232 on that particular micro.  For your MCU, this will be different.

Please make sure of the following:

1) R1 and R2 are open.
2) Your RS232 signal is TTL (0V, 5V).
3) Communication format is 8-bit data, 1 stop bit, no parity, no hand shaking.
4) You are allowing for the execution times for each command (certain commands such as cursor home and clear screen have longer execution times).
Title: Re: NHD-0420D3Z-NSW-BBW-V3 how to interface
Post by: atalanta on May 28, 2014, 08:32:29 AM
Unfortunately my RS232 signal is 0V- 3.3V!

So i have to use SPI or I2C and place a jumper on R2 or R1??
Title: Re: NHD-0420D3Z-NSW-BBW-V3 how to interface
Post by: Michael_L on May 28, 2014, 11:13:00 AM
Yes, to use the SPI or I2C interface you would short the appropriate jumper as indicated on page 4 of the datasheet.