CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Flex_LCD420 and Flex_KBD_4X3 SHARE SAME PORT

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
freedom



Joined: 10 Jul 2011
Posts: 54

View user's profile Send private message Send e-mail

Flex_LCD420 and Flex_KBD_4X3 SHARE SAME PORT
PostPosted: Thu Aug 22, 2013 9:44 am     Reply with quote

For reference of PCM Programmer
http://www.ccsinfo.com/forum/viewtopic.php?t=26229

Ok, Fantastic solution.

Thanks to PCM programmer.

I want to use port B of PIC16F877a for both LCD (4 x 20) & keypad (4x3). But If I want to use ICSP with those then what or how to do?

is this solution support driver Flex_LCD420.c and Flex_KBD_4X3.c ?

NOTE THAT I AM USING COMPILER VER. 4.124
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu Aug 22, 2013 10:49 am     Reply with quote

Each of those drivers can be set to use any port you want. Just change the definitions.
temtronic



Joined: 01 Jul 2010
Posts: 9225
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Aug 22, 2013 11:51 am     Reply with quote

Please read the PIC datasheet chapter on 'programming' or 'using ICSP'.
In there Microchip clearly details how to use both ICSP as well as 'user' interfaces.

hth
jay
freedom



Joined: 10 Jul 2011
Posts: 54

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 23, 2013 5:13 am     Reply with quote

Quote:
Each of those drivers can be set to use any port you want. Just change the definitions.


Thanks Ttelmah to reply.
already I'm using those drivers.
My query is for using LCD and Keypad on same port at a time

http://www.ccsinfo.com/forum/viewtopic.php?t=26229

As i post above link where showing a guide line to use LCD and Keypad on the same port at a time. That means same port shares both LCD and Keypad.

Now I want to use port B of PIC16F877a for both LCD (4 x 20) & keypad (4x3) at a time.

does this solution support driver Flex_LCD420.c and Flex_KBD_4X3.c ?

NOTE THAT I AM USING COMPILER VER. 4.124
freedom



Joined: 10 Jul 2011
Posts: 54

View user's profile Send private message Send e-mail

PostPosted: Sat Aug 24, 2013 12:50 am     Reply with quote

Quote:
Each of those drivers can be set to use any port you want. Just change the definitions.



Thanks Ttelmah to reply.
already I'm using those drivers.
My query is for using LCD and Keypad on same port at a time

http://www.ccsinfo.com/forum/viewtopic.php?t=26229

As i post above link where showing a guide line to use LCD and Keypad on the same port at a time. That means same port shares both LCD and Keypad.

Now I want to use port B of PIC16F877a for both LCD (4 x 20) & keypad (4x3) at a time.

does this solution support driver Flex_LCD420.c and Flex_KBD_4X3.c ?

NOTE THAT I AM USING COMPILER VER. 4.124
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Sat Aug 24, 2013 1:18 am     Reply with quote

You are going the way to getting a bad reputation, running two threads on the same question.....

Yes, you can combine the two drivers onto one port.
PCM programmer gives 'how'.

However _caveat_. When a key is pressed, you cannot write to the LCD. Also, certain patterns of three keys, will cause problems, unless there are diodes on the key drive lines.

However you'll not blow up the PIC, unless you do something silly like connecting 5v directly to an output (even then it'll often survive), or having long lengths of unshielded wire to the keypad.

Basically, once the LCD 'enable' line is off, the remaining signals can be used to control a keypad. To do the job 'better', ideally the four input lines should feed to the PIC via 'AND' gates, with the other input of each gate connected to the signal that feeds the LCD enable. This then means that when the LCD is 'on', the keypad is disconnected. You'd then need separate pull up resistors where these lines connect to the gates, and diodes on the drive lines.
Done like this, the LCD will still work, when keys are pressed. Otherwise if keys are held, the LCD can't work.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group