Digital Signal Processing
While working on the DAP project, I have the need for lots of notes on digital signal processing. I will be using this page to document the notes I take as work on the DAP. Mostly rewritten from Wikipedia and other notes that will be linked below.
Digital Signal Processing
Z-transform
Finite Impulse Response Filters
Infinite Impulse Response
Buffering
Digital Communications
Pulse-Code Modulation (PCM)
PCM is a method of digitally encoding analog signals. Unlike pulse-width modulation (PWM), which is adjusts the pulse-width or duty cycle of a train of pulses to encode analog signals and is ubiquitous among Arduino and other dev boards, PCM sends a series of pulses to represent the analog value in a binary format, such as fixed-point or two’s complement. Linear PCM or LPCM (typically used for audio) refers to the quantization of the analog signal being linear, as opposed to logarithmic quantizations such as $\mu$-law or A-law encoding. The PCM protocol can vary for different purposes, usually containing information in the form of headers and parity bits for error correction.
Inter-Integrated Circuit Sound (I^2^S)
Serial interface protocol for communicating stereo digital audio using PCM (not to be confused with I^2^C). Features three lines:
- Serial Clock (SCK/BCLK): used to delimit each bit
- Word Select (WS/LRCLK/FS): used to delimit each “word” and to switch between left (lo) and right (hi)
- Serial Data (SD/SDATA/SDIN/SDOUT): transmits the binary-encoded data
Frequency of WS is the same as the sampling frequency of the audio signal. Data is encoded as two’s complement MSB -> LSB.
Serial Peripheral Interface
- Serial Clock (SCK/SCLK/CLK/SCL)
- Master Out Slave In (MOSI)
- Master In Slave Out (MISO)
- Slave/Chip Select (SS/CS): Active-low signal to open communication between master/slave
In a multidrop configuration, each slave has a separate SS channel while SCK, MOSI, MISO are shared. If the master does not possess multiple SS channels, then an expander can be used to add SS’s, while the master just has to communicate to the expander which slave to select. In this configuration, ensure that beginning communication with a slave, all SS’s are set to high before selecting which slave to communicate with.
Inter-Integrated Circuit (I^2^C)
Only two lines:
- Serial Data Line (SDA)
- Serial Clock Line (SCL)
Citations
- https://ccrma.stanford.edu/~jos/