Pages: [1]   Go Down
Author Topic: What a library can work with Atmel AT93C46?  (Read 773 times)
0 Members and 1 Guest are viewing this topic.
Chernogolovka, Moscow dst., Russia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, colleagues!

Please tell me, what a library can work with Atmel AT93C46?

She has a three-wire interface, very similar to SPI.
I tried using the SPI library (SPI.h), but did not achieve a positive result. Although, in my opinion, has filed all the necessary commands.

Is there any experience with the three-wire EEPROM-chips of this type?

Ogogon.
Logged

Chernogolovka, Moscow dst., Russia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As I clarified, the bus of this chip is called Microwire (aka 3WI).

The forum is a link to a file http://leyenda2.demon.co.uk/mike/Electronics/datasheets/SPIvsMicrowire.pdf, which explains everything.
But he, of course, is not available.

How to implement support Microwire (3WI) bus for Arduino?

Ogogon.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2614
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm no expert on using SPI but looking at the AT93C46 datasheet have you setup the SPI interface to suit this chip.
The datasheet says 2Mhz clock but SPI defaults to 4Mhz (look here http://arduino.cc/en/Reference/SPI) so put a SPI.setClockDivider(SPI_CLOCK_DIV8) to drop clock to 2Mhz. You need to make sure the SPI mode is correct for reading/writing bits on rising edge of clock pulse (SPI.setDataMode(SPI_MODE0) ) and the bit order is correct MSB to LSB (SPI.setBitOrder(MSBFIRST) )
The final hurdle is the CS signal seems the wrong way round, normally CS is HIGH and pulled LOW when your talking to the device but the datasheet shows the opposite of this. You could maybe overcome this in software by using a different output pin to slaveSelectPin for CS, set it to HIGH just before reading/writing to AT93C46 and then set it LOW after.
Logged


Pages: [1]   Go Up
Jump to: