Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 20th April 2004, 06:47 AM   (permalink)
Default 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.
scarab is offline  
Old 20th April 2004, 09:18 AM   (permalink)
Default

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st April 2004, 06:16 AM   (permalink)
Default 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.
scarab is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 06:44 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker