be80be
Well-Known Member
I been playing with the 16f18855 DAC making waves with some code that was for a 8 bit DAC
The DAC1R how do you set this
I ran this code
The DAC1R how do you set this
I ran this code
Code:
/**
#include "mcc_generated_files/mcc.h"
/*
Main application
*/
void main(void)
{
// initialize the device
SYSTEM_Initialize();
// When using interrupts, you need to set the Global and Peripheral Interrupt Enable bits
// Use the following macros to:
// Enable the Global Interrupts
//INTERRUPT_GlobalInterruptEnable();
// Enable the Peripheral Interrupts
//INTERRUPT_PeripheralInterruptEnable();
// Disable the Global Interrupts
//INTERRUPT_GlobalInterruptDisable();
// Disable the Peripheral Interrupts
//INTERRUPT_PeripheralInterruptDisable();
uint8_t count=0;
DAC_Initialize();
while (1)
{
for(count=0; count<=32; count++)
{
DAC_SetOutput(count);
__delay_ms(50);
}
}
}
/**
End of File
*/