save password program using pic 18

Thread Starter

axy_872000

Joined Jan 7, 2010
11
hai...
i want to create a program that can save password using pic18..
can anyone help me?....
there will be a keypad as an input and lcd as a display..a led will become an output and turn on when password is correct
 

t06afre

Joined May 11, 2009
5,934
You have to store the pass word in the Data EEPROM. Your chip has 256 bytes of data EEPROM. I do not know the mcc18 compiler. But then used Google and "mcc18 eeprom" I got many hits.
 

Thread Starter

axy_872000

Joined Jan 7, 2010
11
erm...now i've choose to not use eeprom or flash. i think define the code is easier. hehe....but the problem is, i dunno how to capture the string from keypad to compare with the code...can u help me?
 

retched

Joined Dec 5, 2009
5,207
you will not be able to store the inputed passwords during power-outs without using the eeprom or flash. If you simply use an input statement to a variable, It will only reside in ram and will be reset to the codes default with each power on.

You may want to us a keyboard IC to connect to an over-the-counter keyboard. Else you will have to create a multiplexed keyboard and decode the input as whatever character you assigned to thar key.
 

retched

Joined Dec 5, 2009
5,207
Ok.. So you just want to compare the input to the security code you have in memory, correct? If so, you have to get or make a keypad then figure on the code.

The comparason can be done easily in code and then make a pin HIGH when correct.
 

Thread Starter

axy_872000

Joined Jan 7, 2010
11
oke.....erm...let say the code i set in the program is CODE[]={'2','2','0','8'};...then how to capture the inputted code from the keypad and compare with the i set in CODE?......
 
Top