Hello Freescale lovers and users,
I am glad that I have the opportunity to learn and work with a Freescale microcontroller!
But I need your help! I am a beginner in embedded world and some things are fuzzy to me!
I have a MC9S12C32 microcontroller and want to write/read, erase data on/in a EEPROM memory trough SPI.
The first step was to write the functions that I need:
- void SPISetup(void)
- void SPI_selectCS(int state)
- void SPI_writeData(double Data)
- void SPI_readData(double Data)
- void SPI_eraseData(void)
(These are good functions? Could I add/change some other functions?)
The second step is to write effectively the functions! I was able to write the SPISetup() and SPI_selectCS()...after this is more complicated for me.
I know that Freescale documentations are very good and well structured (a colleague of mine told me this) but can anyone tell me or give me some links where can I find programs/tutorials/examples etc with SPI communication with an EEPROM?
I've found some pdf files but I am stuck at something and I don't know how to continue!
After, if you can and want to give me some links, if is necessary I will add the code from my functions to see if are correct.
Thank you very much for your support and sorry if there are other topics with the same subject!
Have a nice day!