Author Topic: Using Atmel SAM Devices  (Read 2010 times)

0 Members and 2 Guests are viewing this topic.

Offline BocaDev

  • Contributor
  • Posts: 42
  • Country: us
Re: Using Atmel SAM Devices
« Reply #25 on: September 28, 2018, 02:36:44 pm »

I am using the Atmel SMART SAMC21 Xplained pro board. If you look at the top left of the picture below, the connector block with 6 female connection are labeled A0, A1, A2, A3, A4, A5 for the A/D connections. I had tried grounding all 6 inputs while looking at the serial output on a terminal to observe a 0x0000 reading. Non of these pins were changing the output.

After investigation, my board has an additional connector (not shown in the picture) mounted next to the ADC connector labeled DAC-OUT. That is where I found the PA02 signal your code had selected as the ADC channel. The C21 Xplained Pro user guide (08/2016) on page 5 does have the board picture which shows the DAC-OUT connector. I believe Atmel was trying to accommodate the Arduino shields, however the 6 Arduino A/D lines are not mapped as 1:1. That is, A0 on a Arduino board is not mapped to AD0 on the SAMC21 board.

My next goal is to scan 6 channel inputs continuously and for the ADC results to be quickly stored within memory via DMA. This is my next challenge to see if I can get that up and running. Any words of wisdom here would be greatly appreciated.

Thanks,
Alan



 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 5851
  • Country: us
    • Personal site
Re: Using Atmel SAM Devices
« Reply #26 on: September 28, 2018, 04:17:17 pm »
Ok, I see. I basically ignore the Arduino connectors.

All my code uses signals available on connectors EXT1-3. How well that maps to Arduino I don't know.

Do a 6 channel configuration and read the results manually first. Then add the DMA. Both things on their own are relatively simple. But debugging both at the same time may be hard.
Alex
 

Offline BocaDev

  • Contributor
  • Posts: 42
  • Country: us
Re: Using Atmel SAM Devices
« Reply #27 on: September 28, 2018, 05:37:09 pm »
Yes that is what I am going to do. I'll build a resistor network feeding each A/D channel a different voltage. Next I'll run a slow manual scan outputting each channel onto the terminal to prove the channel mux is working. Then, if I need DMA speed, I'll step into that task. Should be interesting work.

Thanks for your time Alex, you have done a great job!
Alan
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf