AnsweredAssumed Answered

NEED DIGITAL OUTPUT ADuC 7024

Question asked by Abi on Apr 28, 2011
Latest reply on Mar 12, 2014 by Linc

Hi

I am new user of microcontroller ADuC 7024

I am using this microcontroller to convert Analog signal to digital

here I am pasting the expample pot.c program for ADUC 7024

 

#include<aduc7024.h>
void ADCpoweron(int);
int main(void)
{
// ADC and DAC configuration
ADCpoweron(20000);       // power on ADC                                   A
ADCCP = 0x00;                              // conversion on ADC0
DAC1CON = 0x13;                         // AGND-AVDD range
REFCON = 0x01;                         // internal 2.5V reference
while (1)
{
ADCCON = 0xA3;                    // software conv., single-ended, conv. enabled
while (!ADCSTA){}               // wait for end of conversion
DAC1DAT = ADCDAT;               // result format is identical for DAC and ADC
}
}
void ADCpoweron(int time)
{
ADCCON = 0x20;                               // power-on the ADC
while (time >=0)                           // wait for ADC to be fully powered on
    time--;
}

 

the line in red coloured sending digtal data to DAC1 to convert it back to analog



My question is that is there anyway to take out digital data using GPIO pins without converting it back to analog signal.?

 

Thanks in advance

Abi

Outcomes