Author Topic: Reading/Writing to Microwire EEPROM with arduino  (Read 1579 times)

0 Members and 1 Guest are viewing this topic.

Offline wmj259

  • Contributor
  • Posts: 6
  • Country: us
Reading/Writing to Microwire EEPROM with arduino
« on: July 03, 2018, 01:26:15 pm »
Hi,

I am having an issue with reading from a FairChild 93C56EM8 chip. I have google this case very much, and have probably found a lot of info on non-microwire chips.

I have an arduino and have been changing it up a bit, but am not able to read it successfully.
I found two codes, one being the tim0s Microwire and the other being http://ingenieriaencasa.blogspot.com/2017/03/leer-y-escribir-memoria-93cseries.html.

I did find a third code (http://forum.pvtech-ecu-research.com/viewtopic.php?t=3)  that seemed to give me reasonable results, but am not able to confirm. I did buy a chip programmer from ebay, but it doesnt support Microwire protocol.

My issue is that these codes have the ORG pin, but the chip  I have doesnt show that.
My chip data sheet:
https://www.digchip.com/datasheets/parts/datasheet/161/FM93C56EM8-pdf.php.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #1 on: July 04, 2018, 01:37:15 am »
 

Offline wmj259

  • Contributor
  • Posts: 6
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #2 on: July 04, 2018, 05:40:54 am »
Hi, thanks for the reply.

I am not sure how that helps however. I understand that the microwire has a 3 wire protocol, clock, data in and data out. I did buy some 4.7 resistors and some diodes in the afternoon, so I hope that works.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #3 on: July 04, 2018, 11:25:17 pm »
You might be able to get the SPI interface to do the job.

I did learn the hard way you need to tie your CS pin in the right direction.  Whatever direction keeps it inactive until the microcontroller selects that chip.   Since the CS pin will float when the main micro is being programmed, the other chip might start talking.
 

Offline wmj259

  • Contributor
  • Posts: 6
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #4 on: July 05, 2018, 02:05:05 am »
When you say  tie the CS the right direction, what do you mean?

Looking at the datasheet, if CS is held high then the chip is selected. "All serial communications with the device is enabled only
when this pin is held high."


Looking at the Serial Clock, is confusing me, it seems to be that the timing is most important. Timing impacts the Serial Input and Serial Output.

I have no idea how to read the graphs that are about timing.

I am pretty sure that the datasheet i am looking at belongs to this chip:
« Last Edit: July 05, 2018, 02:27:41 am by wmj259 »
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #5 on: July 05, 2018, 03:34:33 am »
Then the CS pin on the EEPROM should be "tied low"  or "pulled down."  5k to 10k resistor will do the job.

The term "pull up" or "pull down" can be read as "default high" or "default low."  It is important to have these resistors in place. These set the "default" state of the board. 

The ATMEGA chips will "tri-state" their pins during boot and programming.  An un-"tied" CS pin can give the slave chip the wrong signal.  They are "floating."  This means the state can be anything (HIGH or LOW).  Even the direction the wind is blowing can change that.

When you get an oscilloscope and see how fast this stuff happens, this all will be real clear. 
 

Offline wmj259

  • Contributor
  • Posts: 6
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #6 on: July 05, 2018, 01:17:39 pm »
Sorry for dumb questions, but why would CS need to be tied low?
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #7 on: July 05, 2018, 04:55:57 pm »
Pulled down is actually the right term.  If you have a pin that you are monitoring for state changes (for SPI the Chip Select pin does this) then you want that pin either sitting at the high voltage or the low voltage.

If the pin isn't pulled to one voltage or the other, then it is floating.  Floating pins will move past their on/off threshold and trigger unwanted events.

Other devices use the SPI bus.  Programming the ATMega can also use the SPI bus.  You must make sure the slaves on the SPI bus are in their off state unless they are being accessed.  When the ATMega is being programmed it cannot control the pins of the slave.  Those pins will float.  This can cause the EEPROM to think you're reading from it.  It will send on the MISO line thinking it is selected.

 

Offline wmj259

  • Contributor
  • Posts: 6
  • Country: us
Re: Reading/Writing to Microwire EEPROM with arduino
« Reply #8 on: July 05, 2018, 05:31:13 pm »
I may have not clarified, but this eeprom is external from the Arduino.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf