Difference between revisions of "PIC32MX: SPI EEPROM"

From Mech
Jump to navigationJump to search
Line 26: Line 26:


Where possible, make it a single piece of well-commented cut-and-pastable code, or at least make each function that way, so others can easily copy it. Most comments should be in the code itself; outside the code (on the wiki) should only be explanatory comments that are too cumbersome to include in the code.
Where possible, make it a single piece of well-commented cut-and-pastable code, or at least make each function that way, so others can easily copy it. Most comments should be in the code itself; outside the code (on the wiki) should only be explanatory comments that are too cumbersome to include in the code.

== Further Reading ==

[[PIC32MX:_SPI_External_RAM]]
[[PIC32MX:_SPI_DAC]]
[[PIC32MX:_SPI_Communication_between_PIC32s]]

Revision as of 19:37, 10 February 2010

Original Assignment

Do not erase this section!

Your assignment is to interface to the SPI 25AA1024 EEPROM chip.

Overview

You can use the PIC32 to communicate with an EEPROM chip using SPI. The EEPROM chip can store data sent from the PIC and be retrieved at a later time (like an external hardrive).

To test that the code data was writing and reading correctly, the attached code sends data to the EEPROM through SPI, then from the EEPROM back to the PIC, and out to a LED display screen.

Circuit

Include a schematic and give any part numbers. A photo of your circuit is OK, but not as a replacement for a schematic.

Connection schematic for 25AA1024 chip

Spichip.jpg

For visual feedback the PIC32 was connected to and LCD screen(1602A1 USB-A/Mini-B5-06):

LCD.jpg

Code

Where possible, make it a single piece of well-commented cut-and-pastable code, or at least make each function that way, so others can easily copy it. Most comments should be in the code itself; outside the code (on the wiki) should only be explanatory comments that are too cumbersome to include in the code.

Further Reading

PIC32MX:_SPI_External_RAM PIC32MX:_SPI_DAC PIC32MX:_SPI_Communication_between_PIC32s