LCD On PortA ?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

LCD On PortA ?

Post 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 357 times
Integer Split V1.fcf
(15 KiB) Downloaded 320 times
Thanks
1 in 10 people understand binary, the other one doesn't !

medelec35
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 ?

Post 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
Martin

User avatar
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 ?

Post by greentech »

ive tried with 16f877a but not working on port A

User avatar
JohnCrow
Valued Contributor
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 ?

Post 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?
1 in 10 people understand binary, the other one doesn't !

User avatar
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 ?

Post by greentech »

nothing like that john, i have added pullups on all 5 lines and seems to be working now...

Post Reply