Hi
Following on from a previous post regarding internal oscillator I'm now trying to use the 16f1825 running on Int Osc (500Khz) with a 16x2 RG1602A LCD module but without much success.
Connections are:-
A0 = Data 0
A1 = Data 1
A2 = Data 2
C0 = Data 3
C1 = R/S
C2 = E
Backlight connected and contrast adjustable with R/W connected to Ground and all continuity checked.
I have tried both Generic and EB005 components but neither seem to be doing anything. The LCD module itself does work as I tested it by connecting it to a breakout on Port B of the programmer using a 877A running the same test program (connections obviously changed to suit). All the program does is display the word "Test ", flash an LED for a few seconds then display "Stop" further along the line. The LED does flash at correct rate so code is running.
Any pointers? I'm leaning towards timing but could be way off.
Regards
16f1825 and LCD issues
Moderator: Benj
-
- Valued Contributor
- Posts: 618
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 195 times
- Contact:
- 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: 16f1825 and LCD issues
Hello,
The four data pins go to the upper nibble of the LCD data port as shown on the schematic here. Is this how you have wired up the display?
https://www.matrixtsl.com/wikiv7/index. ... hanumeric)
If this is how you have it already then maybe try running the chip at a faster speed by configuring the INTOSC. 500KHz is pretty slow.
The four data pins go to the upper nibble of the LCD data port as shown on the schematic here. Is this how you have wired up the display?
https://www.matrixtsl.com/wikiv7/index. ... hanumeric)
If this is how you have it already then maybe try running the chip at a faster speed by configuring the INTOSC. 500KHz is pretty slow.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 618
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 195 times
- Contact:
Re: 16f1825 and LCD issues
Hi Benj
Connections as per your diagram. Just tried it at 1Mhz and 4Mhz. Display is illuminated and I've swept contrast but nothing is there. I'm using the same breakout arrangement used when I connected the 877A to test the display (it worked). Just the chip / port connections differ.
It is obviously something very stupid and probably very simple.
Regards
Connections as per your diagram. Just tried it at 1Mhz and 4Mhz. Display is illuminated and I've swept contrast but nothing is there. I'm using the same breakout arrangement used when I connected the 877A to test the display (it worked). Just the chip / port connections differ.
It is obviously something very stupid and probably very simple.
Regards
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: 16f1825 and LCD issues
Can you post your flowchart and circuit diagram, so I can see if I can spot something?
Martin
Martin
Martin
-
- Valued Contributor
- Posts: 618
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 195 times
- Contact:
Re: 16f1825 and LCD issues
Hi
Code attached
C-block for 4Mhz operation
Start LCD
wait 100ms
Print "test"
loop x 10
Led on
wait 1s
Led off
wait 1s
Loop
Print "stopped"
Connections as per diagram by Benj
Regards
Code attached
C-block for 4Mhz operation
Start LCD
wait 100ms
Print "test"
loop x 10
Led on
wait 1s
Led off
wait 1s
Loop
Print "stopped"
Connections as per diagram by Benj
Regards
- Attachments
-
- Flash.fcfx
- (5.72 KiB) Downloaded 186 times
-
- Valued Contributor
- Posts: 618
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 195 times
- Contact:
Re: 16f1825 and LCD issues
Hi
Just did a flash test on all ports to verify chip was actually working.
All good except RA2/AN2/Int pin didn't do anything. It is dead. mV at pin measured to either rail. This is one of my data pins.
Now I may be thicker than a porridge milk shake, but I could be on to something.......
Regards
Just did a flash test on all ports to verify chip was actually working.
All good except RA2/AN2/Int pin didn't do anything. It is dead. mV at pin measured to either rail. This is one of my data pins.
Now I may be thicker than a porridge milk shake, but I could be on to something.......
Regards
-
- Valued Contributor
- Posts: 618
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 184 times
- Been thanked: 195 times
- Contact:
Re: 16f1825 and LCD issues
Hi
New chip and all is good (now you know why I chose this alias, I don't actually cook fish).
Thanks again to all that helped and Merry Christmas to everyone.
Regards
New chip and all is good (now you know why I chose this alias, I don't actually cook fish).
Thanks again to all that helped and Merry Christmas to everyone.
Regards