Hi Benj,
I've tried to connect a LCD display on PORTA of Pic877 and didn't work.
It simulated ok on FC3 but when I loaded into Proteus didn't work.
I tried on other ports and worked ok.
I'm not sure if there's something else that as to be set on PortA.
I looked into the 877 data sheet but I'm nor sure how to set the bits.
Appreciated.
Pinto
Connecting an LCD on PORTA
- 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:
Hello Pinto
Try using this code in a C Code block.
It should disable the analogue function of the PORT A pins.
Have you tested with hardware or just via the proteus simulation tool.
Try using this code in a C Code block.
Code: Select all
adcon1 = 0x07;
adcon0 = 0x80;
Have you tested with hardware or just via the proteus simulation tool.
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
-
- Flowcode v5 User
- Posts: 71
- Joined: Fri Nov 03, 2006 2:28 pm
- Location: RSA
- Been thanked: 1 time
- Contact:
LCD on PortA
Hi Benj,
I tried your code and still didn't work. The problem was that RA4 is an open source and wasn't pulled it up to the Vdd.
I connected an 100k between RA4 and the Vdd and the LCD worked.
I than removed the C code box from FC3 and re-compiled the program loaded on the simulator and worked as well.
It appear that FC3 automactically changes the configuration from analog to digital I/O when it sees an I/O macro connected to it. Am I Right?
Thanks
Pinto
I tried your code and still didn't work. The problem was that RA4 is an open source and wasn't pulled it up to the Vdd.
I connected an 100k between RA4 and the Vdd and the LCD worked.
I than removed the C code box from FC3 and re-compiled the program loaded on the simulator and worked as well.
It appear that FC3 automactically changes the configuration from analog to digital I/O when it sees an I/O macro connected to it. Am I Right?
Thanks
Pinto