Hi Francois,

I will try to answer your questions.

>>I didn't see any Serial command in your example ?

There are three examples of communicating with SPI devices. Each begins with a comment describing the device they apply to. After setting the value of two or three Bytes (valuebyte, commandbyte, and secondbyte), a GOSUB is called to move the data. The subroutines are: "sendspi" used to send commands to the digital pot and the amplifier and and "txrxspi" to command an ADC to convert and read back the data. The result of the data read back is put into the variable vcount. I know this does not look like much code but it is all you have to do. Simple, isn't it!?!

>>about the speed ? where to set it ?

Bits 3 - 0 of the SSPCON register select transmission speed. It is a function of the MCPU clock. In my instance, I use a 20 MHz oscillator and define at the top of my code using the define: DEFINE OSC 20.

>>may I use it like it is to "try something" mostly send commands to my friend's unit

Feel free to use this any way you wish. Note that the Byte values developed are for specific devices so you will have to adapt them to do your task and create a loop for them to run in.

I hope I have explained adequately.

Cheers,
Mike