Single data line serial decoding

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
kostas
Newbie
Posts: 0
Joined: Wed Jun 19, 2019 4:33 pm

Single data line serial decoding

Post by kostas »

Hi,

I am trying capture a simple serial decoding scheme were one channel is the sampling clock and another scope channel is the data line. I simply want the data to be sampled at every clock edge and be able to save to a file.
The SPI decoding protocol sort of does this, but is limited to a packet of 8 bits, whereas my packet is 13 bits long.
Is there any easy way to achieve this that I am missing?

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Single data line serial decoding

Post by Gerry »

Hi kostas,

You need to frame the data bits that you are going to use as one word. So, you need to to use the 'SS' input (Chip Select) leaving it high and then forcing it low before and after you have finished transmitting all of your data. However you should take it high after enough time has gone by to have transmitted 2 whole (8-bit) bytes (even if you're only capturing 13) otherwise you may get errors. Then you can decode 13 of the 16 bits at a time.

A possible alternative would be to use I²S, which is a protocol that allows you to specify the number of data bits in your packet and has a separate clock. You would need to use the 'Word Select' input, again, to frame the data bytes that you will be capturing, then you could just toggle the Word Select line for every 13 bits of data to capture a continuous stream. You would then need to bear in mind that the the odd and even bytes of 13-bit data will be separated out in the decoding, and further decode the data (as it assumes the data is coming in as 2's compliment).

Regards,

Gerry
Gerry
Technical Specialist

Post Reply