template<
size_t num_daisychained = 1,
size_t num_parallel = 1>
class daisy::ShiftRegister4021< num_daisychained, num_parallel >
Device Driver for CD4021 shift register.
- Author
- shensley
CD4021B-Q1: CMOS 8-STAGE STATIC SHIFT REGISTER
Supply Voltage: 3V to 18V Clock Freq: 3MHz at 5V (less at 3v3) -> 8.5MHz at 15V Pin Descriptions:
- Parallel Data[1-8] - 7, 6, 5, 4, 13, 14, 115, 1
- Serial Data - 11
- Clock - 10
- P/!S - 9
- Q[6-8] - 2, 12, 3
Driver has support for daisy chaining and running up to 2 same-sized chains in parallel from a single set of clk/latch pins to reduce pin/code overhead when using multiple devices.
When dealing with multiple parallel/daisy-chained devices the states of all inputs will be filled in the following order (example uses two chained and two parallel): data[chain0,parallel0], data[chain1,parallel0], data[chain0,parallel1], data[chain1,parallel1];
When combining multiple daisy chained and parallel devices the number of devices chained should match for each parallel device chain.