Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] keypad with pic 16f877

Status
Not open for further replies.

MARWEN007

Junior Member level 2
Joined
Apr 16, 2011
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,481
mr.JPG

hi I have a keyboard as I can see below seek to program the buttons with microcontrollers 16f877 the problem that I had two common on the keyboard (pin5 and pin6) I do not know how I will do to make the two buttons (b1 and b2) are a different action (b3 and b4) as progarmme with mikroC I am looking for a simpler method to all the buttons soyont readable by the 16f877 example boutton each lED is light a
 

Attachments

  • mop_n.jpg
    mop_n.jpg
    57.8 KB · Views: 60

Hi,

It seems difficult to handle the 4 switches i.e B1, B2, B3, B4 (assuming the image shows push button switches) through 2 pins of the PIC.

However this problem can be resolved can be attemepted by following 2 ways:

Approach 1:
Either use on off switch instead of push button switch, in that case based upon binary combinations possible for 6 pins i.e 2^6 combinations would be possible using on/off status of each push button switch.

like
Pin 1(B1 on/off)Pin 2(B1 on/off)Pin 3(B1 on/off)Pin 4(B1 on/off)Pin 5(B1 on/off)Pin 6(B1 on/off)Pattern
onoffoffoffoffoff1
offonoffoffoffoff2
offoffonoffoffoff3
Based upon the binary code, the action can be taken in code logic.

Approach 2:
Through ADC channels.
The on off switches can be arranged with a mesh resistors.
Based upon the switch on off conditions new resistirs shall be introduced into the circuit their by reduding/ increasing the effective analog voltage available at ADC channel.
A simple example has been suggested below:

ResistanceCombinationforADC.png

Hope this is helpful..:smile:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top