save password program using pic 18

Discussion in 'Homework Help' started by axy_872000, Apr 10, 2010.

  1. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    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
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    What part do you need help with?

    What chip are you using? And what language and compiler are you using?
     
  3. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    i don't know how to save the password in pic....i'm using pic18f4520 and C language.....the compiler is mcc18
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  5. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    okey...i've done some study regarding data storage in eeprom..is eeprom is better than flash memory?..
     
  6. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    EEPROM often has much higher maximum write cycles than Flash. That said Microchip has dropped EEPROM from some of their microcontrollers.
     
  7. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    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?
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    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.
     
  9. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    erm..the code is define in the program...not by the user....it means that the program has the fixed code...
     
  10. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    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.
     
  11. axy_872000

    Thread Starter New Member

    Jan 7, 2010
    11
    0
    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?......
     
Loading...