Author Topic: Axon II EEPROM in webbot lib  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Axon II EEPROM in webbot lib
« 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?

 
« Last Edit: July 04, 2010, 12:16:28 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Axon II EEPROM in webbot lib
« Reply #1 on: July 04, 2010, 05:20:57 PM »
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:
Code: [Select]
// 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

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
Re: Axon II EEPROM in webbot lib
« Reply #2 on: July 04, 2010, 05:24:32 PM »
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.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: Axon II EEPROM in webbot lib
« Reply #3 on: July 04, 2010, 05:29:57 PM »
sorry Webbot, but could you explain more?

'eeprom functions' - please explian
« Last Edit: July 04, 2010, 05:36:49 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
Re: Axon II EEPROM in webbot lib
« Reply #4 on: July 04, 2010, 06:19:27 PM »
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
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Axon II EEPROM in webbot lib
« Reply #5 on: July 04, 2010, 06:29:21 PM »
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

 


Get Your Ad Here