Hey guys
It's been a whole since I have worked on this idea, but here is the project: The hardware is a circuit consisting mainly of a relay switch driven by a 18f4525 pic microcontroller. This microcontroller should be running a program constantly, that checks if buttons connected and displayed in a keypad are being pressed. This acts as a lock/unlock method with a 'password'. When the user types in the code, it sends 1 logic to the output pin that runs a transistor which turns on the relay, which activates the locking device. There are also output pins running a 7seg led, so that when the user presses any key, it displays what number the user presses. For this to work, I have the understanding that I need to be running an interrupter in the program. The hardware is nearly finished, just a little wiring left, but I have been struggling with the software.
If anyone could help me out with ideas/code samples on how I can check all input pins statuses, and if the pin being held high is the correct input pin at the correct time please post here. Keep in mind, if any other buttons are pressed, it needs to reset, so that the user cant just press random keys until it opens..
Thanks in advanced.
Assembly PIC Microcontrollers: Need help with project
Started by manbearpig001, Nov 20 2010 09:54 PM
3 replies to this topic
#1
Posted 20 November 2010 - 09:54 PM
|
|
|
#2
Posted 05 January 2011 - 09:06 PM
Can you post what you have already? That way, it's easier for someone to help you.
Check out our update Guidelines/FAQ. When posting code, remember to use code tags -
.
.
#3
Posted 05 January 2011 - 09:16 PM
I actually finished this project. If you want, I can post my source code. My solution was to periodically check each input port, and if an incorrect button is held high, I add one to a constant. If the constant is more than one, then I know that an incorrect button is pressed. I continue this until each correct button is entered.
#4
Posted 05 January 2011 - 09:46 PM
Nice!
It'd be nice to post the code here. If anything, it can be helpful for someone else that has a similar question.
It'd be nice to post the code here. If anything, it can be helpful for someone else that has a similar question.
Check out our update Guidelines/FAQ. When posting code, remember to use code tags -
.
.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









