Question
How to write to the 12 data bits in mcp4821 DAC's register using 8bit data size Spi ?.
I'm using stm32 MCU to interface with mcp4821 D A C . The MCU's spi data size is set to 8 bit mode.The D A C has a 16 bit register and (Starting from 0) bit 12 to 15 are configuration bits and the remaining bits are data bits . My problem is ...how should I enter the full scale value by using 8 bit mode spi and how should I separate the data and store it in the first 8 bit register and the other in bit 9 to 12 . I'm new to MCUs and I'm just getting started with programming ... so could anyone please help me with this problem.
