RobG 1,892 Posted July 7, 2012 Share Posted July 7, 2012 Here is the set of functions needed to read and write serial SPI memory, SRAM & EEPROM. EEPROM: Microchip 25AAxxx series SRAM: Microchip 23Kxxx series Included are byte and sequence read and write functions (page boundaries must be handled by user.) Test functions are also included. Additional functions will be added later on. Those functions can be used with some of my booster packs, like CC2500, Universal Color LCD, and few other. Test example // setup SPI pins, which can be shared with other devices // setup memory specific pins P1OUT |= SRAM_CS_PIN + SRAM_HOLD_PIN; P1DIR |= SRAM_CS_PIN + SRAM_HOLD_PIN; P2OUT |= EEPROM_CS_PIN; P2DIR |= EEPROM_CS_PIN; // setup display // run tests drawString(0,0,"Test SRAM:"); drawString(64, 0, (testSRAM() == 'O' ? "Pass" : "Fail")); drawString(0,10,"Test EEPROM:"); drawString(76, 10, (testEEPROM() == 'O' ? "Pass" : "Fail")); memory.h memory.c timotet, krzyk2, DigitalDad and 1 other 4 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.