Help needed for newbie interfacing CY14B256PA nvram and rtc | Cypress Semiconductor
Help needed for newbie interfacing CY14B256PA nvram and rtc
I am new to SPI interfacing and I have just got a PIC talking to a CY14B256PA so that I can read the device ID just fine.
My next challenge is to talk to the RTC. At this stage I simply want to read the data that is in the RTC in the device (it hasn't been programmed yet but I'm trying to do the simple stuff first).
The data sheet says that I need to set the Read bit in the flags register before I can read the data, and also that I do not have to set the Write bit to set the read bit. I am not certain what the sequence is to achieve this.
Do I need to enable CS, Write to register 00 first using WRTC to set the Read bit, then clear CS, then set CS, perform the RDRTC to read the data, clear CS, then perform another WRTC cycle to clear the read bit, or do I do the whole lot in one CS cycle?
Any help you can give would be most appreciated.