Go Down

Topic: About SPI protocole (Read 351 times) previous topic - next topic

Frederic_Plante

Jun 07, 2018, 07:31 am Last Edit: Jun 07, 2018, 07:41 am by Frederic_Plante
Unless I'm mistaking, SPI protocol is straight  forward in the sense that if I send say, the byte value 7 to the SPI port, it will literally send "00000111" in the port, right? Nothing more? Does it need to mark a down or up each bits, or will I have to make sequences like "01010101" to make full up and down cycles?

So, anyways in theory, if I want to control an  X9c103S digital potentiometer, this guy, , I could simply connect the INC pin on the SPI clock, and pin U/D on MOSI and then connect CS pin on what ever I want, to chip selecting it, and it's On, baby?

 :)  :)  :)

It seam that no one has tried this angle yet, might has well try it. :) I just can't wait for the Post man to finally show up
As we fight our way northward into the great unknown, only that one thing remains certain...

Delta_G

The Arduino has a hardware SPI port.  You really don't need to concern yourself with how the bits get sent, just hook up to SCK, MOSI, and MISO, pick a CS pin and Bob's your uncle. 

But if you really want to know, it just sends the bits themselves.  No oscillations or anything.  It sets the pin to LOW or HIGH depending on the bit and hits the clock like to let the receiver know it's there. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

jremington

#2
Jun 08, 2018, 08:53 pm Last Edit: Jun 09, 2018, 01:22 am by jremington
The X9c103S digital potentiometer does not have an SPI interface, so it could be quite a challenge to get it to work with one, especially if you don't know how SPI works.

In contrast, it is pretty simple to use two Arduino pins to toggle the chip inputs and "move the wiper".

Go Up