Skip to main content
Topic: BPv4 onboard eeprom issue (Read 3318 times) previous topic - next topic

BPv4 onboard eeprom issue

From the mailbag:

[quote author="BrentBXR"]
..

Anyways; I have a question what exactly is on the BP4? as in the EEPROM. The hardware description says an 8k 24XX64 eeprom; but all those eeproms seem to be 64k. My BP's eeprom has 7H8J. Is it an 8k eeprom or 64k eeprom?

I would like to upgrade the onboardEEPROM.h file to include max address defines and stuff like that.

I know Ian wants to keep the first few 100 bytes for people to play with, i guess to learn.

Anyways; I would like to see the datasheet but tere seems to be alot of differnt 24XX64 ics from microchip.

...

Edit: I think Ians description is wrong; its not a 24XX64 eeprom. I noticed on Ians partlist wiki he has : 24AA08 listed, and thats an 8k eeprom. I am guessing thats whats on my production BP v4. am i right?
[/quote]

The datasheet is here: http://www.microchip.com/wwwproducts/De ... e=en010793  it was the first datasheet I took of a 24x64 in sot23 casing. Somewhere in the document you see the packages markings and you see yours described.

serial memory is quoted in bits instead of bytes

and

[quote author="BrentBXR"]
I have been trying to write/read from the onboard eeprom all day. I dont think those onboardEEPROM.c functions are working... I am getting 0xFF on all bus reads and 0 on all getacks... Even the selftest is testing if getack = 0...

Any of you guys taken a peek at those functions? have any ideas why its not working for me? (i have interfaced with microchip eeproms many times; so i ensured my tests matched the datasheet but using the onboardeeprom.c functions; no response)

just fyi; I hooked up my 3.5 to that IC with some SMD probes and couldent get it to respond either. Im hoping its perhaps no power or somthing of that nature. perhaps pull-ups. (I would think v4 would have natural pullups) or perhaps signal loss...
[/quote]

can yuo access the onboard using the i2c mode? there is a macro to switch between header and onboard eeprom.

Re: BPv4 onboard eeprom issue

Reply #1
I have also had some EEPROM issues in the demo I tried this week. I plan to work them out when I get the 'production' hardware because Sjaak and I have different EEPROMs on the hand-built versions.
Got a question? Please ask in the forum for the fastest answers.

Re: BPv4 onboard eeprom issue

Reply #2
I tried it with the onboard I2C (didnt notice those macros). Still cant seem to get it to work; if the pullups are on then i get NACK NACK NACK no matter what; if pull ups are off I get ACK ACK ACK no matter what. The address is 0xA0 right? I think thats pretty standard and there is no address pins on this tiny guy.

ill keep playing.

Re: BPv4 onboard eeprom issue

Reply #3
Alright with Arhi;s help [s:]last[/s:] tonight on Skype (everyone send me your skype ids so we can chat :D) and we found its:

24AA64
64K-bit eeprom
but I ran a test before I knew that and wrote to 0 and looped until I found 0 again and came with a max of 8192.


So I went ahead and wrote a eeWrite and eeRead function in onboardEEPROM.c; works alright might need to be made smarter at some point.

I also added defines to the .h file; which includes

Code: [Select]
// Addressing the BP eeprom
#define BP_EEPROM_ID 0xA0
#define BP_EEPROM_ID_W 0xA0
#define BP_EEPROM_ID_R 0xA1

// Eeprom Max and Min values
#define BP_EEPROM_MIN 1
#define BP_EEPROM_MAX 8192

// couple defines to enable and disable WP
#define eeEnableWrite() BP_EE_WP=0
#define eeDisableWrite() BP_EE_WP=1
#define eeGetWP() BP_EE_WP

unsigned char eeReadByte(unsigned long wAddr);
unsigned int eeWriteByte(char wByte, unsigned long wAddr);

went ahead and committed it. So now we can start some EEPROM goodies :D

I was thinking perhaps we can use address 0 for self test. The self test should write address 0 0x12; then read address 0 and if its 0x12 then passes. that will test everything. then set it back to 0xFF for future self tests


Re: BPv4 onboard eeprom issue

Reply #5
Yes, sorry, I ordered the largest EEPROM in SOT-23 for the BPv4. It is 64kbits/8Kbytes big. I'm sorry for the confusion. I will check out the EEPROM read/write today. Notably the address scanner works (for me at least), but never get replys to read/write.
Got a question? Please ask in the forum for the fastest answers.

Re: BPv4 onboard eeprom issue

Reply #6
yeah try the eeprom functions out, they work fine for the EEPROM on the production BP4. Although at some point I would like to add 'getack();' in a few points to ensure we are communicating properly.

I dont know if thats 100% necessary but im just used to commands that send a command byte and wait for an ACK before sending. This guy is just praying we got an ack and continuing anyhow :D