Go Down

Topic: Example of driving ADC and DAC from timer for regular sampling (Read 17438 times) previous topic - next topic


I am working with the DUE timers, could you please tell me where you found the definitions you used in your code, the TcChannel structure, where is this structure defined ? Where is it documented ? Where are the hardware definitions coming from like PIOB and functions like pmc_enable_periph_clk . I am very sorry to ask such a dumb question but I simply can't seem to find the hardware description anywhere ? The code is a great example for understanding the timers, I just need the definitions to make it do what I want.


So what the wrong her :
error: base operand of '->' is not a pointer


 So what the meaning of this ''error: base operand of '->' is not a pointer'' and how I can fix it . :(  :( 


i would like to realise acquisition of 3 analog signals at 1KHz ,with arduino DUE ,and I dont now how to do it .
thanks for advance


To understand the examples of this thread, I suggest that you start by reading the Analog to Digital Converter and Timer Counters sections of Sam3x datasheet.

There are many ways to trigger the ADC controller at a 3 KHz frequency for 3 analog inputs resulting in a 1 KHz sampling of each analog input. One of them is a hardware trigger, as listed in table TRGSEL section 43.7.2 page 1333. Note that there is a typo in this table because ADC_TRIG5 equals to PWM Event Line 1.

Edit : If a TIOA is used to trigger ADC conversions, it is interesting to use TIOA2 (TC0 channel 2 = TC2) since TIOA2 is output on pin PA5 which is not broken out. So you keep broken out pins TIOA0 (PB25) and TIOA1 (PA2)  usable for other purposes.

Go Up