Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16f628 keypad interface

Status
Not open for further replies.

scarab

New Member
If anyone can plaese help me with this project i have received, it will be greatly appreciated, i am a complete beginner. :roll:

System Operation
The basic idea of the system is to read the 4x4 keypad with numerical buttons organized as follows:
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15

If a key has been pressed, you must determine which key it was and flash the LED accordingly. For example: If key 10 is pressed, the LED must flash 10 times at a frequency of 0.5Hz. Only after completion of the flashing sequence, must the keypad be readable again.

Specifications:
1. The Microcontroller used is the PIC 16F628.
2. You must use of the PortB weak internal pull-ups. This will replace the external resistors shown in Fig. 11.5
3. You must use the PortB Change Interrupt
4. You must program according to the flow diagram provided.
5. You must program according to the Pseudo Code provided.
6. RB7:RB4 must be set as input pins whilst RB3:RB0 must be set as output pins.
deliverables.
In PIC assembly:
1. MAIN routine
2. KEYPAD_ISR interrupt service routine
3. DETERMINE_KEY subroutine
4. COMPARE_AB subroutine
This short little subroutine must mask and subtract TempA and TempB in DETERMINE_KEY.
5. DELAY250 subroutine
To be used when flashing the LED
6. DELAY20 subroutine
To be used with debouncing.
Other:
7. Calculations for Delay routines.
 
This looks like a homework question you've been given to do (or a classwork project), but in either case it's down to you to do it, not ask someone else to do your work for you - you won't learn anything from that!.

My tutorials show how to read a hex keypad using a 16F628, but it doesn't meet all the requirements of your assignment, but it could make a good start for you.
 
i know

:wink:i have written most of the code, just dont know how to get the led to flash the correct amount of times.
 
16f628 keypad interface

If anyone can plaese help me with this project i have received, it will be greatly appreciated, i am a complete beginner. :roll:

System Operation
The basic idea of the system is to read the 4x4 keypad with numerical buttons organized as follows:
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15

If a key has been pressed, you must determine which key it was and flash the LED accordingly. For example: If key 10 is pressed, the LED must flash 10 times at a frequency of 0.5Hz. Only after completion of the flashing sequence, must the keypad be readable again.

Specifications:
1. The Microcontroller used is the PIC 16F628.
2. You must use of the PortB weak internal pull-ups. This will replace the external resistors shown in Fig. 11.5
3. You must use the PortB Change Interrupt
4. You must program according to the flow diagram provided.
5. You must program according to the Pseudo Code provided.
6. RB7:RB4 must be set as input pins whilst RB3:RB0 must be set as output pins.
deliverables.
In PIC assembly:
1. MAIN routine
2. KEYPAD_ISR interrupt service routine
3. DETERMINE_KEY subroutine
4. COMPARE_AB subroutine
This short little subroutine must mask and subtract TempA and TempB in DETERMINE_KEY.
5. DELAY250 subroutine
To be used when flashing the LED
6. DELAY20 subroutine
To be used with debouncing.
Other:
7. Calculations for Delay routines.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top