Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Writing to a AT28 EEPROM from a modern environment
  2. In this recipe, we'll build ourselves an ad-hoc EEPROM holder which is designed
  3. to be driven from an Arduino Uno.
  4. ## Gathering parts
  5. * An Arduino Uno
  6. * A AT28C64B
  7. * 2 '164 shift registers
  8. * Sockets, header pins, proto board, etc.
  9. * [avra][avra] (will soon rewrite to Collapse OS' ASM)
  10. * avrdude to send program to Arduino
  11. ## Schema
  12. (there will soon be an image here, but I have yet to scan my schema)
  13. This is a rather simple circuit which uses 2 chained '164 shift register to
  14. drive the AT28 address pins and connects CE, WE, OE and the data pins directly
  15. to the Arduino. Pins have been chosen so that the protoboard can plug directly
  16. on the Arduino's right side (except for VCC, which needs to be wired).
  17. PD0 and PD1 are not used because they're used for the UART.
  18. ## Software
  19. The software in at28wr.asm listens to the UART and writes every byte it receives
  20. to the AT28, starting at address 0. It expects tty-escaped content (see
  21. `/tools/ttysafe`).
  22. After having written the byte, it re-reads it from the EEPROM and spits it back
  23. to the UART, tty-escaped.
  24. ## Usage
  25. After you've build and sent your binary to the Arduino with `make send`, you
  26. can send your (tty-safe!) content to your EEPROM using `/tools/pingpong`.
  27. [avra]: http://avra.sourceforge.net/