Society of Robots - Robot Forum
Software => Software => Topic started by: dellagd on July 04, 2010, 11:43:36 AM
-
I was in need for a EEPROM on the Axon II and I hear it has one built in.
I was looking through WebbotLib and I only see documentation on how to create an external EEPROM (one that you hook up to the Axon)
How would I use the one that is built in?
-
On my Lynxmotion Brat with an Axon2, I save away things like servo offsets into the built-in EEPROM.
I simply use the functions: EEPROM_READ_BLOCK and EEPROM_WRITE_BLOCK. code like:
// Will write the block out starting at 0... may later change to use some of the other stuff.
eeprom_write_block(&bsd, 0, sizeof(bsd));
Where the variable bsd is to a structure (BratSaveData)
Kurt
-
The eeprom functions are for reading/writing to 'on chip' eeprom space. But WebbotLib also supports external I2C and SPI EEPROM chips if you need more space.
-
sorry Webbot, but could you explain more?
'eeprom functions' - please explian
-
sorry Webbot, but could you explain more?
'eeprom functions' - please explian
In Version 1.22 then see the eeprom section on page 32 of the manual for 'on chip' usage.
For other 'off chip' storage then see the 'Storage' section of the manual on page 255
-
sorry Webbot, but could you explain more?
'eeprom functions' - please explian
If you look at the EEPROM section in webbotlib's pdf file, it shows that these functions are not provided by webbotlib, but are part of the underlying system. On my system eepromexplain.h is located in:
c:\winavr\avr\include\avr
What the webbotlib system files define, is the actual size of the EEPROM for each of the different processors.
As I mentioned in my previous post, I use the eeprom_read_block and eeprom_write_block functions. There are other functions like eeprom_read_word as well.
Kurt