Lecture 9 - DAC (Digital to Analog Conversion)
Today's lecture will be pretty quick. We'll review the DAC from Lecture 8 - Review of SPI, Process of DAC#DAC Approach, and then get into UART.
DAC (Review)
Given, for example, a 12-bit DAC, we can spit out 4096 possible analog output values. The analog output will be put into quantized steps, based on our bit size. There's also some minimum time resolution between steps, so it may take some time to traverse the steps and get a steady state.
Thhe MCP4921 DAC you're given is an SPI device. It will be controlled by the microcontroller. The device has:
- SPI interface logic (so we can communicate with it)
- An input register for counting.
See more information at [[MCP4921.pdf]]. But how is the DAC itself built? It just uses a summing amplifier with multiple denominations of
UART
This is the first optional assigment for the class. However, the UART is very common, so I'd recommend to do this lel.
It is a serial protocol, like SPI, but is asynchronous, so there isn't a common SCLK
now. For UART, we only have TX
and RX
, transmit and recieve data. In fact, if you only need one way (transmit OR receive) then you can only need one wire for this!
UART uses a baud rate. Both the transmitter and receiver need to know, ahead of time, the transmit speed of data.
We may choose 9600 BAUD, meaning there's 1/9600 bits per second. The max is about 115200 BAUD. So BAUD is number of symbols sent per second (ie: bits / second).