Fundamental Concepts

From Bike Wiki
Revision as of 15:59, 25 April 2020 by Entenmann God (talk | contribs) (Created page with "=Overview= This page serves to hold fundamental information related to the electrical, embedded, communication systems present on the bike. ==Serial Peripheral Interface (SP...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

This page serves to hold fundamental information related to the electrical, embedded, communication systems present on the bike.

Serial Peripheral Interface (SPI)

The motivation behind using SPI communication rather than serial ports is because serial ports act on asynchronous communication. Ansynchronous communication (i.e. not synchronized with a common clock) often requires extra overhead due to the use of start and stop bits (i.e. sync bits). Synchronous communication, however, uses a common clock to synchronize data transmission. The clock is normally idle and only produces an oscillating signal to tell the receiver when to sample bits on the data line. SPI is type of synchronous communication that allows bi-directional data transmission. Thus, there are two lines of communcation, MOSI and MISO. MOSI (Master-Out-Slave-In) allows the master to send data to the slave. MISO (Master-In-Slave-Out) allows the slave to send data to the master. Only one side of the SPI generates the clock signal (called SCK for Serial Clock) and is usually referred to the master (because they control when transmission occurs). In the case of the bike, the arduino DUE is the master and IMU acts as a slaves. Another capability of SPI is communicating with multiple slaves and supported using the SS line (Slave Select). There are two ways to implement SS: separate lines for each slave or salves daisy-chained. The bike uses separate lines to communicate with the IMU and RS (i.e. BeagleBone).