How to Make (Almost) Anything


Project 11

Title: Output Devices
Design: Fabduino + Charlieplexing

Fabduino

Fabduino is a fab-able circuit board compatible with Arduino integrated development environment (IDE). Fabduino uses a single ATmega328p microprocessor and 8 MHz resonator.

SPI Library <1>

Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers (master) for communicating with one or more peripheral decices (slaves). SPI can also be used for communication between two microcontrollers.

Master (microcontroller) has the following three lines:
- MISO (Master In Slave Out): The slave line for sending data to the master.
- MOSI (Master Out Slave In): The master line for sending data to the slave paripherals.
- SCK (Serial Clock): The clock pulses generated by the master which synchronize data transmission.

Slaves (peripherals) have the following pin to communicate with the master:
- SS (slave Select): The pin on each device that the master can use to enable and disable specific devices.
-- When a device's SS is set as low, it communicates with the master.
-- When a device's SS is set as high, it ignores the master.
This allows you to have multiple SPI devices sharing the same MISO, MOSI, and CLK lines.

A few notes in writing a code for a new SPI device:
- SPI.setBitOrder(): sets whether the data is shifted in Most Significan Bit (MSB) or Least Significant Bit (LSB).
- SPI.setDataMode(): sets the clock mode.
- SPI.setClockDivider(): sets the SPI's running speed.

Charlieplexing

Charlieplexng is a method to reduce the required number of I/O pins on microcontroller to drive an array of LEDs.

Charliplexing allows n number of pins to drive an array of n by n-1 LEDs, where otherwise requires n*(n-1) number of I/O pins on microcontroller.

While I read more about how it works, I run out of time this week...