This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interfacing STP16CPC26 Led Display Driver to NRF52832 via SPI

Hello, I am trying to interface the STPC16CPC26 with the NRF52832. As per the datasheet of the display driver, we have to toggle two IO pins from the NRF which shall be connected to the Latch Enable(LE) and Output Enable(OEn) for the data that is sent over by SPI to latch on the display driver, as shown in the attached file STP_TimingDiag.png. I tried using the sample SPI Code provided in the examples, and it works perfectly when I see the scope, I can see the clock and data signals correctly. The problem is I have to latch the data on the STP by sending a pulse from an IO pin on the rising edge of the 16th clock cycle, but I am unable to do the same. Could someone please help me as to how should I go about it, can I modify the existing library and do it, or do I need to write my own SPI routine.

Thanks, Shalin

Parents
  • Hi,

    From the datasheet it looks to me like the pulse on LE is not happening on the rising edge of the 16th clock cycle, but rather after the 16th rising edge of the clock. I think the point is that you should wait until the SPI transfer is complete before you send the latch pulse, to ensure that the correct data is present in the SPI shift register (you should get this confirmed by STMicro).

    If you are using the SPI master driver, you will get a NRF_DRV_SPI_EVENT_DONE event when the SPI transfer is done. You can set the LE pulse in the event handler to latch the data after completion of the SPI transfer.

    Best regards,

    Jørgen

  • Hello Jorgen, Thanks for your prompt reply. I had already tried that approach, I am attaching an image from my scope.20161130_102845.jpg The Pink line is the data, the Yellow is the clock and the Blue line is the pulse I am sending on the LE line. As seen in the attachment, there is no clock pulse available when I want to send the LE pulse. Is there a way to do that.

    Thanks, Shalin

Reply Children
No Data
Related