View previous topic :: View next topic |
Author |
Message |
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
Keypad miniBoard |
Posted: Wed Jun 30, 2010 10:20 am |
|
|
hi I am new in CCS forum and with PIC controllers and am making a PIC16F877A Board.
I have connect 2x16 LCD, Temp scn, External EEPROM, 3310 Graphic LCD, 3 Buttons, and 5 LEDs.
Now I want to connect 4x4 Keypad with it, but available Pins are not enough.
So I have decided to connect a separate PIC16F876A and connect keypad with it. This secondary controller will send an ASCII code to PIC16F877A so only one PIN of my primary controller will be utilized. But I don't know how it will receives ASCII and how 16F876A will transmit.
I will be thankful if any one will help me with this. _________________ ... |
|
|
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
... |
Posted: Wed Jun 30, 2010 10:26 am |
|
|
im using CCS_PCWHD_v.4.093 _________________ ... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Jun 30, 2010 2:25 pm |
|
|
Use the hardware UART on the 16F876A to send the ASCII bytes to
the hardware UART on the 16F877A. See the #use rs232() statement
in the CCS compiler manual, and look at examples in this forum. |
|
|
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
... |
Posted: Thu Jul 01, 2010 2:26 am |
|
|
will it be the same how my EEPROM works or it is different protocol??? _________________ ... |
|
|
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
.. |
Posted: Thu Jul 01, 2010 2:30 am |
|
|
My RC6/Tx and RC7/Rx of PIC16f877A are already be used with other devices.
Maybe it will not work. _________________ ... |
|
|
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
... |
Posted: Fri Jul 02, 2010 8:37 am |
|
|
Is there any other solution??
I will be very thankful _________________ ... |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Jul 02, 2010 9:10 am |
|
|
If your PIC16f877A is only handling a keyboard maybe you can use a software UART on it? That can be done on any pins you choose. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Tue Jul 06, 2010 3:52 pm |
|
|
One way to save pins is to use 74HC595 serial to parallel converter chips for outgoing data, and 74HC165 parallel to serial chips for inputs. You can connect them to the SPI port and have as many interface lines as you want, with only 4 processor pins needed. |
|
|
|