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.
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.