Name

dac_write8 — writes a byte to the DAC

Synopsis

#include <dac.h>   
void dac_write8 (channel,  
 value); 
uint8_t channel;
uint8_t value;
 

Arguments

channel

DAC channel

value

value to set

Description

Writes the given data byte to the specified DAC channel. If the underlying DAC is not 8-bit, the value is scaled as required. For example, if the underlying DAC is 12-bits, and dac_write8 is invoked with value of 0xFF, the value is scaled up to 0xFFF.