Issue with DACC, not able to use full output range 0 to 3.3v

Discussion around product based on ARM Cortex M4 core.
This forum will be discontinued soon.

Moderators: nferre, ncollot

priyanshu
Posts: 2
Joined: Wed May 07, 2014 2:26 pm

Issue with DACC, not able to use full output range 0 to 3.3v

Mon Jun 02, 2014 8:18 am

I am using SAM4E-EK kit which is having SAM4E16E controller and I am trying to generate a square wave of 0 to 3.3v amplitude but I am getting square wave output from DACC channel in the range of 400mv to 2.8v. I think there is something wrong in initializing procedure.
Is there any way to extend the range to 0 to 3.3v ???

//_____________________________________
#define DACC_CHANNEL 1 // (PB14)
#define DACC_ANALOG_CONTROL (DACC_ACR_IBCTLCH0(0x02) \
| DACC_ACR_IBCTLCH1(0x02) \
| DACC_ACR_IBCTLDACCORE(0x01))

void gen_square(void)
{
sysclk_enable_peripheral_clock(ID_DACC);
dacc_reset(DACC);
dacc_set_transfer_mode(DACC, 0);
dacc_set_power_save(DACC, 0, 0);
dacc_set_timing(DACC, 0x08, 0, 0x10);

dacc_set_channel_selection(DACC, DACC_CHANNEL);

dacc_enable_channel(DACC, DACC_CHANNEL);

dacc_set_analog_control(DACC, DACC_ANALOG_CONTROL);

while (1)
{
dacc_write_conversion_data(DACC, 4095);
delay_ms(1);
dacc_write_conversion_data(DACC, 0);
delay_ms(1);
}
}
//_____________________________________
joshuajk
Posts: 2
Joined: Tue Aug 05, 2014 12:36 am

Re: Issue with DACC, not able to use full output range 0 to

Tue Aug 05, 2014 12:40 am

I do not think you can get the full range. In the SAM4E Series manual on page 1450, in table 47-52 Analog outputs, it states that the min is Vref/6 and the max is Vref*5/6. If you for anyone else find a way to get full range can you post, as I would be interested in this as well.

Thanks.
rayher
Posts: 4
Joined: Sun Jul 05, 2015 2:30 pm

Re: Issue with DACC, not able to use full output range 0 to

Fri May 20, 2016 10:43 am

joshuajk wrote:I do not think you can get the full range. In the SAM4E Series manual on page 1450, in table 47-52 Analog outputs, it states that the min is Vref/6 and the max is Vref*5/6. If you for anyone else find a way to get full range can you post, as I would be interested in this as well.

Thanks.
thank for your information.

It wasted me one day to find out this answer. I am using a SAM4S DACC to drive analog waveform, it indeed swing within 1/6 ADVREF ~ 5/6 ADVREF.

I think this DAC design is 20 years old. :oops:

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 2 guests