Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC question, how to store a password?

Status
Not open for further replies.

skyassasin16

Junior Member level 2
Joined
Jan 10, 2011
Messages
24
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,453
I am currently working on a simple lcd keypad GUI that needs to store password in C. Most of the code is already done. I don't know how can I create a security based on the system where there is an option to change the password. I guess its a bit complicated code because every boot, It must access the password that is set by the user. Please help, thanks in advance!
 

prmurthy

Full Member level 5
Joined
Feb 13, 2009
Messages
245
Helped
38
Reputation
76
Reaction score
34
Trophy points
1,308
Activity points
2,770
Hi,

There are two options. One fixed password which quite simple to store in any controller. Second variable password where you change the password. Even this little easy. Both the things require about 5 line of code. The code is just like storing any value in EEPROM and reading the value.

Hope this help you
 

yokohama

Member level 3
Joined
Dec 29, 2010
Messages
55
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Algeria
Activity points
1,659
You can use the internal EEPROM, like you can use an external I2C EEPROM (24CXX).
But using internal EEPROM is more simple and cheap.
 

shreyas_patel21

Full Member level 3
Joined
Jan 4, 2011
Messages
181
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,298
Activity points
2,325
i am using pic18f46k22
i want to make same application but i dont know how to store any value in eeprom and how to read it??

thank you.
 

shreyas_patel21

Full Member level 3
Joined
Jan 4, 2011
Messages
181
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,298
Activity points
2,325
i am using pic18f46k22
i want to make same application but i dont know how to store any value in eeprom and how to read it??

thank you.

i found library functions in EEP library and aded eep.h
and used Write_b_eep and Read_b_eep functions for writing and reading flash memory.
 

soinarose

Junior Member level 3
Joined
Oct 7, 2009
Messages
27
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
india
Activity points
1,462
i have the pblm. i want to access internal eeprom of pic.. wer is eep.h available. is it compatible with htpic

dont use sms or short hand typing skills in this forum... type the complete words by spending few more seconds. this is the last warning and further posts and thread of yours will be deleted without informing you if continued
 
Last edited by a moderator:

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,376
What compiler are you using?

HiTech C?

And what model PIC?

If you using HiTech C, the compiler provides the following Library Functions:

unsigned char data eeprom_read(unsigned int address);
void eeprom_write(unsigned int address, unsigned char data);

If you are not using HiTech C, let me know I am familiar with several PIC C compilers.
 

soinarose

Junior Member level 3
Joined
Oct 7, 2009
Messages
27
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
india
Activity points
1,462
Thank u Sir..

i am using PIC 16f877a with HT-PIC compiler.. let me try with that function..

what will be the address of eeprom.
 

vinodstanur

Advanced Member level 3
Joined
Oct 31, 2009
Messages
752
Helped
114
Reputation
234
Reaction score
114
Trophy points
1,333
Location
Kerala (INDIA)
Activity points
7,065
Actually the exact procedure to access the EEPROM is clearly provided in the data sheet.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top