I am working with TWR-K20D72M board. I am interfacing CAT25256-EEPROM with this board over SPI.
my code is written below.i am used "IAR EMBEDDED" software.
In my code SPI_write_byte & SPI_read_byte both function have some problem.i cannot communicate with CAT25256 device.
i have a no idea how SPI resistor & flags are used.
please give a solution for how to communicate with CAT25256. give a reference code for (1)master_initialization(2)mater_write(3)slave_initialization(4)master_read
Please provide any solution so that i can write and read a value for CAT25256 device in proper address.
It would be more appreciable if any kind of suggestions will be get.
Original Attachment has been moved to: code.txt.zip