spi

You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • I'm not aware of any ack in (basic) SPI communication - except when you expect the device to which you talk is delivering data while you keep the clock ticking... see some (basic intro here)[http://www.embedded.com/electronics-blog­s/beginner-s-corner/4023908/Introduction­-to-Serial-Peripheral-Interface].

    For reading from a device, you usually send a command - a few bytes - which go with as many clock ticks as bits and then you do a read which is basically producing clock ticks for the number of bytes times 8 and on either rise or fall within the tick cycle you capture the master input line status and compose the statuses to bits. While this all happens, the chip select line has to stay active - usually low because it is -CS.

    Of course it is not your application that has to handle this clocking and status capturing. It is implemented in firmware and micro controller hardware. In the application you just invoke the SPI methods / functions... some they let you optionally pass a parameter for that chip select pin, so you do not even have to handle chip select by yourself. But it always depends on the spec the device expects.

    Take a look at data sheet of some SPI connectable devices wherein some basics and the device specifics are explained. As one article explains, it is a communication 'within a box' which means that the connectivity is very controlled and reliable under practically any circumstances.

About

Avatar for allObjects @allObjects started