I need to do a password-lock with PIC16F84A in C language ??

Status
Not open for further replies.

Pat-21

New Member
I'm using the four bits RA0-to RA3 that comes from my mt8870(dtmf receiver)

I wanna a have a five digit password.

If somebody knows how to do that, I'll apreciate to learn it.
 
ehh.. I suppose that is fairly simple
just get the input, and compare with the password
if it is equal, then unlock (through some external circuit), otherwise, dont bother it, and remain lock
This can be done easily even using assembly
 
The best choice is probably to design a state machine for your pushbuttons and states. You would usually have a state for button pressed and then button released and with four inputs, it becomes fairly easy to design an arbitrary length password. Each correct button press just moves you to the next state, the last state being "unlock" or whatever. Each incorrect press moves you to either an error indicator state or back to the start state. You debounce the switches in software and it becomes fairly simple.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…