View previous topic :: View next topic |
Author |
Message |
T0ni0
Joined: 21 Jan 2005 Posts: 11
|
read 'all' eeprom data |
Posted: Wed Jul 13, 2005 9:45 am |
|
|
Hi,
how i can read all eeprom data? function read_eeprom(dir); is only for direction < 8 bits
i need acces more that 256 bytes eeprom
How i can do?
Thx for advance |
|
|
Ttelmah Guest
|
|
Posted: Wed Jul 13, 2005 10:06 am |
|
|
Actually the function accepts a long variable, and will allow access beyond 256 entries, on the latter compilers, and latter chips with the larger sizes. If you look at the entry in the manual on 3.226 (for example), it says:
-------
value = read_eeprom(address)
address is an (8 or 16bit depending on the part) int.
-------
This has been true for quite a long time (the fact it has even made it into the manual, which normally takes a year or so, gives an idea of the age of this)...
Best Wishes |
|
|
T0ni0
Joined: 21 Jan 2005 Posts: 11
|
|
Posted: Wed Jul 13, 2005 11:44 pm |
|
|
Thx, i tried direction 0X100 and write/read rigth.
Before i tried acros a label (bad label of corse) and dont run
Thx for all |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Jul 14, 2005 5:35 am |
|
|
Remember that and int is only 8 bits so you would have to use an int16 or a long to get a 16bit value. |
|
|
Guest
|
|
Posted: Thu Jul 14, 2005 5:44 am |
|
|
Mark wrote: | Remember that and int is only 8 bits so you would have to use an int16 or a long to get a 16bit value. |
Just my problem thx, now is solved with int16 |
|
|
|