Starting Point System : Forum

You are not logged in.

#1 2009-11-12 19:31:05

thibach
New member

bus SPI et 16 bits

Hello,

I try connecting a slave component with SPI (MicroMag 3D). But return data is clocked on 16 bits, so ÁChameleon must read 16 bits or wait for a signal.
But ÁChameleon read bytes whth 8 bits.

How could i do ?
I have try with many "spi in" but, i get only the firt 8 bits.

Thanks

PS : I have created a wrapper C# for ÁChameleon with DotNet (it's ok also with VB.NET) ... if someone need it, you can send me a mail.

Offline

 

#2 2009-12-07 19:02:31

SPS Support Team
Moderator

Re: bus SPI et 16 bits

In order to receive 16 bit values, you simply send the 'spi read' command twice. If you have a 'ready' line on you module, you can sample its state with any of the 18 inputs, and the 'pin state' command.
One thing to take care of, is when receiving the two answers, they may be attached, and they should be checked for proper detection of end-of-line character (a CR or LF, depending on what you used when sending your commands). The source code of our 'ÁChameleon Control' test application shows precisely how to do that.

Cheers,

Offline

 

Board footer

Powered by FluxBB

Home