- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Trying to get a 5LP communicating with a TI SN65HVS882 Serializer.
I am basiclly using the sample SPI code to test but not seeing any data on the lcd. Any suggestions?
CODE:
int main()
{
uint8 i = 0u;
/* Software buffers use internal interrupt functionality to interact with
* hardware buffers. Thus global interrupt enable command should be called
*/
CyGlobalIntEnable;
/* We need to start Character LCD, SPI Master and Slave components */
LCD_Start();
SPIM_Start();
/* SPI communication is provided in Mode 0. So, the first byte
* should be written directly to the SPI Slave
*/
/// SPIS_WriteTxDataZero(0x11u);
/* We need to know the moment when SPI communication is complete
* to display received data. SPIS_SPI_DONE status should be polled.
*/
// while(!(SPIS_ReadTxStatus() & SPIS_STS_SPI_DONE));
/* SPI communication is complete so we can display received data */
while(1u) {
LCD_Position(0u,0u);
LCD_PrintString("SPIM Rx data:");
LCD_Position(1u,0u);
ld_Write(1);
for(i=0u; i<8u; i++)
{
/* Read from SPIM Rx software buffer */
LCD_PrintHexUint8(SPIM_ReadRxData());
}
// ld_Write(0);
CyDelay(400u);
ld_Write(0);
LCD_ClearDisplay();
};
}
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are comments in the line where you access SPIM. Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
What board are you using?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another weird thing is no matter what i seem to do, I can not get the sclk output to show on my logic analyzer. I can see the ld toggle. But no clock.
I have even tried a different pin.
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see that the SN65HVS882 has got an SPI interface (apart from Power supply of 10V). You did not connect MOSI. You do not send any information over SPI master.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob,
The datasheet says the chip has a SPI compatable interface. There isnt anything to send to the chip. just trying to de-serialize the data from it. If you need the datasheet I can upload it but its a 8 bit digital input serializer.
Is there another way to 'de-serialize' the data from this chip? I only need the numerical value of the serialized data. Not needed to make parallel again.
Thanks
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I saw datasheet and the buffer chip to overcome the supply voltage differences. Still does not look as a (usual) SPIS interface.
I am quite sure that the SPIM interface will not fetch any data when you do not send (and wait for completion) any dummy data.
Bob