Page 1 of 1

LCD On PortA ?

Posted: Fri May 13, 2011 8:02 pm
by JohnCrow
Hi
Ive just written a program based on splitting/combining 2 8bit bytes posted by medelec a few days ago.
This allows the decimal numbers to be entered on the keypad, and then shown in binary on 2 x LED e-blocks and in decimal on LCD e-block.
The program works fine, but I dont know why, as I made the mistake of connecting the LCD eblock to Port A.
I was sure that not all required bits are available on this port.

This is using a 16F877A PIC

The attached programs both work on hardware.
Integer Combine V1.fcf
(15.5 KiB) Downloaded 427 times
Integer Split V1.fcf
(15 KiB) Downloaded 382 times
Thanks

Re: LCD On PortA ?

Posted: Fri May 13, 2011 9:55 pm
by medelec35
It depends on the target device you are using. E.g LCD will not work connected to portA with 16F88. This is because RA5 is input only.
Whereas with 16F877A RA0 - RA5 are bidirectional.
Although RA4 is open drain, all lines of LCD except Enable (RA5) have pull-ups.
That's why LCD works on port A

Nice way of demonstrating Conversions.
Thanks.

Martin

Re: LCD On PortA ?

Posted: Sat Aug 06, 2011 9:43 am
by greentech
ive tried with 16f877a but not working on port A

Re: LCD On PortA ?

Posted: Sat Aug 06, 2011 10:14 am
by JohnCrow
That device should work
You dont have LVP , incircuit debug or anything like that enabled that could effect it have you?

Have a look at my programs posted on the last link I sent
Although these are using a 4x20 lcd they are running on on port a
See what happens if you change the lcd to a 2x16 and load in a pic. You will lose some of the info but it should stil work

Is it the standard e-block LCD you are using and not a home made one?

Re: LCD On PortA ?

Posted: Sat Aug 06, 2011 10:29 am
by greentech
nothing like that john, i have added pullups on all 5 lines and seems to be working now...