Interfacing an external SPI RTC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have been able to do a loopback with SPI in Creator and I have been able to create and use an internal RTC using the clock crystal. I cannot find any examples of how to add an external SPI slave to the top level schematic design. Any assistance would be greatly appreciated.

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Dear Geof,

Got it!

I thought you were playing PSoC4. SCB(Serial Communication Block) is only available for PSoC4. There is no SCB in PSoC5 LP.

I'm sorry I'm afraid there is no external SPI in PSoC Creator's library by default.

An external component in PSoC Creator is just a symbol, There is neither software, nor hardware resource generated for an external component after build and compile. In this case, one can draw anything as he/she'd like.

(I really hope I can also play something like PSoC at my 75!)

Enjoy your PSoC time!

Best Regards,

Ryan

View solution in original post

0 Likes
4 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Geoffrey,

Do you mean PSoC playing as an SPI slave or SPI master?

No matter SPI Slave or Master, PSoC Creator has examples about it. Of course you could put a SCB component on top level sch, and configure it as an SPI type component.

Thanks,

Ryan

0 Likes
Anonymous
Not applicable

Hi Ryan,

To clarify, the SpoC 5LP will be acting as the SPI master.

I need to be able to add an SPI slave to the schematic to allow Creator to build the application.

I have been able to add a SPI slave internal to the SPoC 5LP and loop  back per one of the Code Examples. This was helpful and worked fine. I suspect I can disable the SPI slave and delete all of that code, but was hoping that I could find an external SPI component in the library so that I could add it to the top level schematic and wire it up. No joy in finding one. I tried to create a dummy one, but was unable to do so without actually implementing it, even though I marked it as an external component.

You mentioned a SCB component. What does SCB stand for? and where might they be found? Sounds like that might work.

I am used to working with MCU's such as AVR's, RPi's, and FPGA's from Altera. First time with Cypress and the PSoC LP5. Just to give you my background. Also I am 75 and retired and enjoy playing with these things. My kit is from Sparkfun and I am trying to hook their SPI Deadon RTC to the Cypress PSoc.

Thank you. Your response is appreciated.

Geof

0 Likes
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Dear Geof,

Got it!

I thought you were playing PSoC4. SCB(Serial Communication Block) is only available for PSoC4. There is no SCB in PSoC5 LP.

I'm sorry I'm afraid there is no external SPI in PSoC Creator's library by default.

An external component in PSoC Creator is just a symbol, There is neither software, nor hardware resource generated for an external component after build and compile. In this case, one can draw anything as he/she'd like.

(I really hope I can also play something like PSoC at my 75!)

Enjoy your PSoC time!

Best Regards,

Ryan

0 Likes
Anonymous
Not applicable

Good morning Ryan,

I have had no problems with the Cypress internal SPI master and slave. When I do try to draw an external component in the schematic the Creator software complains about the connections (something like wrong type of pin).

From here, I think I will disable the internal slave by holding the !CS pin high. Disconnect the CS, MISO, MOSI, and CLK pins from the internal slave and hook those to my external RTC. Then simply try to send something to the RTC and see if I can get a response. As a final thing I will hook up my DSO to the pins and see if I can figure things out. But that is a last resort.

Consider this thread closed and I thank you very much for your response to my noobie question.

Regards,

Geof

0 Likes