View previous topic :: View next topic |
Author |
Message |
gopi
Joined: 23 May 2015 Posts: 4 Location: chennai
|
PIC 16f877a EEPROM Accessing |
Posted: Sat May 23, 2015 3:10 am |
|
|
Good morning..
I have PIC 16f877a. Now i write the value 300 in this pic EEPROM
I am using following Syntax its only store the value 0 to 255.
so Pls Guid to store the value of 300 in this pic eeprom.
write_eeprom (0x00,300);
i=read_eeprom (0x00); |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sat May 23, 2015 7:11 am |
|
|
you need to write a WORD
in 2 bytes of EEPROM
see the MAKE8() function |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sun May 24, 2015 1:19 am |
|
|
As a further comment, try reading the manual.....
Section:
"How do I write variables to EEPROM that are not a byte?" and the example this links to. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1358
|
|
|
gopi
Joined: 23 May 2015 Posts: 4 Location: chennai
|
|
Posted: Tue May 26, 2015 9:47 am |
|
|
I have use to print above 255 value in PIC 16f877a eeprom.
syntax:
write_program_eeprom(address,data);
value=read_program_eeprom(address);
its work correctly. |
|
|
gopi
Joined: 23 May 2015 Posts: 4 Location: chennai
|
How to store string in PIC 16f877a eeprom |
Posted: Tue May 26, 2015 9:48 am |
|
|
How to store string in PIC 16f877a eeprom.
Pls send the syntax. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue May 26, 2015 10:34 am |
|
|
Simply create a function to compute the length of the string and then store each byte of the string until you get to the 'end of string' character which is a null (0).
I leave it to you to look at the string functions CCS supplies as I assume this is a school project as the 877 is, well, obsolete !
Jay |
|
|
|