|
|
View previous topic :: View next topic |
Author |
Message |
Jose Guest
|
A question for the Experts |
Posted: Thu Jun 30, 2005 8:10 am |
|
|
i m currently preparing labs for a Mechatronics course, and i m using a PIC16f877A .. my question is :
After programming a PIC, can the code be modified through a keypad (does it make sense..?)
here is the project i m working on, it's an alarmed door where u have to enter ur password using a keyped if its wrong an alarm will start. blah blah......,, i want the user to be able to enter a new password and it should be stored there even if the system was shut off.....in other words the code have to be modified through a keypad....
is it possible
i hope my question is clear
thanks
Jose |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Thu Jun 30, 2005 8:40 am |
|
|
The PIC16F877A has EEPROM so you can store non-volatile data there.
The CCS manual covers the READ_EEPROM and WRITE_EEPROM functions and there is example code supplied with the compiler. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
valemike Guest
|
|
Posted: Thu Jun 30, 2005 8:43 am |
|
|
Yes it can be done
I'm working on something along those lines. At first glance, when you said "code", my first reaction was the "hex code". But i see now that you meant it was for a security code.
In my application, it is an automatic door where the PIC controls both the door's motor movement, and a keypad/display where parameters can be programmed into it.
You would have to instruct your students to use PICs that have built-in EEPROM for non-volatile storage of codes. In fact, you might want to store more than one copy of the code, perhaps three, so if one code gets corrupted, e.g. power shuts off while the code is being programmed, then you have the previous two codes to look back on it.
You'd also probably want to use crc.c in the CCS example code directory, so you can checksum the saved codes.
You're saying the project would be an alarmed door. Will they merely be entering a code which would then lock/unlock a door? Or will they also be controlling the door's movement - after all, you do say it's a "mechatronics" lab.
Mike |
|
|
Guest
|
|
Posted: Thu Jun 30, 2005 8:56 am |
|
|
thanks Experts, that was very fast ,,
i ll be looking into the EEPROM sometime this afternoon ,,,,
and by the way in this project i will be going only to control the lock of the door and the alarm.......... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|