CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

A question for the Experts

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jose
Guest







A question for the Experts
PostPosted: Thu Jun 30, 2005 8:10 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Thu Jun 30, 2005 8:40 am     Reply with quote

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







PostPosted: Thu Jun 30, 2005 8:43 am     Reply with quote

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








PostPosted: Thu Jun 30, 2005 8:56 am     Reply with quote

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..........
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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