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.
Thanks
LCD On PortA ?
Moderator: Benj
-
- 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: LCD On PortA ?
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
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
Martin
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LCD On PortA ?
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?
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?
1 in 10 people understand binary, the other one doesn't !
- greentech
- Flowcode V4 User
- Posts: 158
- Joined: Mon Jan 31, 2011 2:11 pm
- Has thanked: 10 times
- Been thanked: 2 times
- Contact:
Re: LCD On PortA ?
nothing like that john, i have added pullups on all 5 lines and seems to be working now...