SPI data transfer issue

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

amaitra
Posts: 12
Joined: Thu Jun 30, 2011 11:22 am

Re: SPI data transfer issue

Post by amaitra »

No problem. Thanks for your help so far.

Just tell me - why did you suggest the configuration you did. That is all I want to know. Because we might end up using sub-20 in another applications as well.

Thanks in advance.

Regards,

Amit

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: SPI data transfer issue

Post by xol »

I used this:

Clock Phase And Polarity: The LTC6802-2 SPI compatible
interface is configured to operate in a system using
CPHA = 1 and CPOL = 1. Consequently, data on SDI must
be stable during the rising edge of SCKI
.

It means you can sample on rising edge

Data Transfers: Every byte consists of 8 bits. Bytes are
transferred with the most significant bit (MSB) first. On a
write, the data value on SDI is latched into the device on
the rising edge of SCKI (Figure 6). Similarly, on a read,
the data value output on SDO is valid during the rising
edge of SCKI and transitions on the falling edge of SCKI


It means setup on falling edge.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: SPI data transfer issue

Post by xol »

I assume SDI is data from IC to SUB-20 and
SDO is from SUB-20 to IC

If it is vice versa you will need instead SETUP_SAMPLE

amaitra
Posts: 12
Joined: Thu Jun 30, 2011 11:22 am

Re: SPI data transfer issue

Post by amaitra »

Thanks!

Amit

Post Reply