Hello everyone!
I'm new to this site, and hopefully my questions won't be too dumb. First, I apologize that this post is so long...
I'm trying to control LCD screen from Newhaven Display (part# NHD-C12864WC-FSW-FBW-3V3-M; https://www.newhavendisplay.com/nhdc12864wcfswfbw3v3m-p-4049.html) with PIC16F916 (https://www.electro-tech-online.com/custompdfs/2012/08/41250F.pdf). That LCD has built-in ST7565R (https://www.electro-tech-online.com/custompdfs/2012/08/ST7565R.pdf) controller. I've never used PIC nor LCD like that, so there's definitely something I'm doing wrong.
1. Those are my connections:
---PIC--- ---LCD---
RA0 (pin2) - DB0 (pin6)
RA1 (pin3) - DB1 (pin7) and so on, I want to use parallel interface.
Vss (GND)
RC0 (pin11) - A0 (pin3)
RC1 (pin12) - RW-WR (pin4)
RC2 (pin13) - CS1B (pin1)
RC3 (pin14) - E-RD (pin5)
RC4 (pin15) - /RES (pin2)
Vss (GND)
Vdd (+3.0V)
I'm using internal oscillator. I think everything works fine since I checked each port and made LED blink. C86 (pin29) and PS (pin30) are connected to Vdd for logic HIGH. I want to use 6800 interface which I think means that: CS1B (enables device), E (pin5) will enable operation, and RW-WR (pin4) will specify read or write. Is this correct?
I have connected rest of the pins on LCD as it is specified in the specs sheet (page 4 from Newhaven). I'm using 1uF capacitors. I just don't understand why on page5 cap3 have different polarity. Anyway, ST7565R datasheet also explains how to connect it on page32 and it matches that table on page4 from Newhaven. To sum it up:
Do I understand 6800 interface correct, and is it better to use it than 8080?
Do I understand capacitors polarity, is it a mistake on page5 from Newhaven?
What's the difference if I connect V0-V4 to Vdd or Vss?
On ST7565R datasheet chip select has two pins (CS1B and CS2 - page20). That LCD has only CS1B, does it mean CS2 is internally connected to HIGH logic?
2. I've used that initialization program that they have on page10 from Newhaven. What I understand (it's a pseudo-code?):
P3.7 is RW (my pin4); P3.0 is A0 (my pin3); P3.1 is RESET (my pin2); P3.4 is E (pin5); P3.3 probably C86 (pin29);
SET means set the bit (bsf command), and RESET means clears the bit (bcf command). Questions:
Is this code for 6800 or 8080 interface, does it matter?
Does RESET means clear, shouldn't that be clear and set (re-set)?
After that initialization code, I send 0xff to portA with Writedata subroutine, but nothing happens on the screen? Am I missing something? I thought it would display at least one dot.
3. I promise it's the last one. The dumbest question is here:
How to connect that FFC connector? I've also ordered that board: https://www.newhavendisplay.com/nhdffc30-p-2477.html
I think those gold leads should go to the bottom of that port. That means if you look at the front of the LCD screen (and the cable is not twisted), you see the board from the back (no labels). I've tried both ways - nothing worked.
It's been almost a week, and I still don't get anything on the screen. I've ordered three LCDs, and played with two. I don't know if I burned one or not by connecting it wrong, but I think if you put that FFC wrong side, it's not gonna connect anyway. I don't wanna touch third display yet. I'm using 5V power supply and converted it to 3V with LM317 voltage regulator. The only thing that works is backlight LOL
Is there anyway to check that screen without micro-controller and initialization? When you apply power should something appear on the display? I'm not 100% sure if I connect power supply correctly to the LCD.
If anyone can help me with that, it would be great. THX!!!
P.S. I don't have my code with me now. I can post it on Monday. I'm just using MPASM assembler.
I'm new to this site, and hopefully my questions won't be too dumb. First, I apologize that this post is so long...
I'm trying to control LCD screen from Newhaven Display (part# NHD-C12864WC-FSW-FBW-3V3-M; https://www.newhavendisplay.com/nhdc12864wcfswfbw3v3m-p-4049.html) with PIC16F916 (https://www.electro-tech-online.com/custompdfs/2012/08/41250F.pdf). That LCD has built-in ST7565R (https://www.electro-tech-online.com/custompdfs/2012/08/ST7565R.pdf) controller. I've never used PIC nor LCD like that, so there's definitely something I'm doing wrong.
1. Those are my connections:
---PIC--- ---LCD---
RA0 (pin2) - DB0 (pin6)
RA1 (pin3) - DB1 (pin7) and so on, I want to use parallel interface.
Vss (GND)
RC0 (pin11) - A0 (pin3)
RC1 (pin12) - RW-WR (pin4)
RC2 (pin13) - CS1B (pin1)
RC3 (pin14) - E-RD (pin5)
RC4 (pin15) - /RES (pin2)
Vss (GND)
Vdd (+3.0V)
I'm using internal oscillator. I think everything works fine since I checked each port and made LED blink. C86 (pin29) and PS (pin30) are connected to Vdd for logic HIGH. I want to use 6800 interface which I think means that: CS1B (enables device), E (pin5) will enable operation, and RW-WR (pin4) will specify read or write. Is this correct?
I have connected rest of the pins on LCD as it is specified in the specs sheet (page 4 from Newhaven). I'm using 1uF capacitors. I just don't understand why on page5 cap3 have different polarity. Anyway, ST7565R datasheet also explains how to connect it on page32 and it matches that table on page4 from Newhaven. To sum it up:
Do I understand 6800 interface correct, and is it better to use it than 8080?
Do I understand capacitors polarity, is it a mistake on page5 from Newhaven?
What's the difference if I connect V0-V4 to Vdd or Vss?
On ST7565R datasheet chip select has two pins (CS1B and CS2 - page20). That LCD has only CS1B, does it mean CS2 is internally connected to HIGH logic?
2. I've used that initialization program that they have on page10 from Newhaven. What I understand (it's a pseudo-code?):
P3.7 is RW (my pin4); P3.0 is A0 (my pin3); P3.1 is RESET (my pin2); P3.4 is E (pin5); P3.3 probably C86 (pin29);
SET means set the bit (bsf command), and RESET means clears the bit (bcf command). Questions:
Is this code for 6800 or 8080 interface, does it matter?
Does RESET means clear, shouldn't that be clear and set (re-set)?
After that initialization code, I send 0xff to portA with Writedata subroutine, but nothing happens on the screen? Am I missing something? I thought it would display at least one dot.
3. I promise it's the last one. The dumbest question is here:
How to connect that FFC connector? I've also ordered that board: https://www.newhavendisplay.com/nhdffc30-p-2477.html
I think those gold leads should go to the bottom of that port. That means if you look at the front of the LCD screen (and the cable is not twisted), you see the board from the back (no labels). I've tried both ways - nothing worked.
It's been almost a week, and I still don't get anything on the screen. I've ordered three LCDs, and played with two. I don't know if I burned one or not by connecting it wrong, but I think if you put that FFC wrong side, it's not gonna connect anyway. I don't wanna touch third display yet. I'm using 5V power supply and converted it to 3V with LM317 voltage regulator. The only thing that works is backlight LOL
Is there anyway to check that screen without micro-controller and initialization? When you apply power should something appear on the display? I'm not 100% sure if I connect power supply correctly to the LCD.
If anyone can help me with that, it would be great. THX!!!
P.S. I don't have my code with me now. I can post it on Monday. I'm just using MPASM assembler.