User Tools

Site Tools


project:weathersonde:eeprom_mgmt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:weathersonde:eeprom_mgmt [2017/01/03 18:15] – refactor pinkyproject:weathersonde:eeprom_mgmt [2018/10/01 13:48] (current) pinky
Line 14: Line 14:
  
 Thanks, and have a nice day, Peter from Budapest, Hungary  Thanks, and have a nice day, Peter from Budapest, Hungary 
 +
 +
 +==== connection note ====
 +
 +This post was send by email, if You have difficulty to read/write eeprom, try this
 +I've managed to solve it. Please let my now if You find any incorrectness.
 +
 +It turned to be some weird voltage translation stuff. When the onboard CPU is in reset, the SCK and MOSI lines are held low (0V) by a relatively low impedance (about 250R, but the I-V curve is nonlinear), and the CS is held high (2.85V) by low impedance (about 300R, I-V curve non-linear). The MISO line is truly floating or connected to very highimpedance. I've used 100R series resistors on the SCK and MOSI lines. This gives me around 3V on the EEPROM pins when the Arduino is driving this lines high to 5V. When the Arduino drives this lines low to 0V, I get 0V on the other side as well.
 + The CS is more problematic, because a low enough series resistor to make the Arduino drive it low effectively will make the voltage too high when the Arduino drives it to 5V. Therefore, I've connected this line to the collector of an NPN transistor. The emitter is grounded and the base is conected through 1k to the CS pin of the Arduino. I drive the CS pin on the Arduino in an inverted fashion. Thus, the NPN transistor pulls the EEPROM CS to ground when CS is active and the rest of the time the EEPROM CS is pulled high by the onboard CPU.  With this setup I'm starting to get data out of the EEPROM.
 +
 + Regards,
 +  Daniel.
 +
 +
 +===== Code =====
  
  
project/weathersonde/eeprom_mgmt.1483467312.txt.gz · Last modified: 2017/01/03 18:15 by pinky