Hello guys, i am new to arduino and coding in general. i saw the nano 33 iot has 12 dma channels and also can perform DAC.
i want a DMA structure that will work in conjunction with an ADC input and a DAC output. can anyone help with this to maybe construct a sample code i can work with and test... i have looked everywhere for help and really need help
That looks not correct. DMA stands for Direct Memory Access outside the controller kernel.
I don't know that controller but maybe it can produce analog voltages.
Please describe what the real task is. Your are off the tracks.
this is the nano 33 iot datasheet
and my real task here is
i want to use DMA to sample an input random analog signal at a clk rate and put each sample into buffers and for the transmit side, when the clock occurs whatever sample is at the buffer is put into the DAC and is output. im just finding a hard time actually integrating the dma functions into this code i have here. im not familar with arduino and coding . `const int analogInPin = A0; // Analog input pin (ADC)
const int pwmOutPin = 3; // PWM output pin
void setup() {
pinMode(analogInPin, INPUT);
pinMode(pwmOutPin, OUTPUT);
}
void loop() {
int sensorValue = analogRead(analogInPin); // Read the analog input
int outputValue = map(sensorValue, 0, 1023, 0, 255); // Map it to the range of the PWM output
analogWrite(pwmOutPin, outputValue); // Output the PWM signal
delay(10); // Small delay for stability
}
`
I'm surpriced by the data You show. What does that "DMA function" provide?
DMA accesses memory as far as I know. Connect an I/O pin to it would be great but never seen anything like that yet.
Tell what the "DMA function" is that You expect.
Hopefully there's more information down in the document.
No member has been bringing this question up during my time here. Therefore the doubts.
Salesmen often step outside the technical facts to sell their gods.
I'm eager to learn.
you could be right about the salesmen part. this is the link https://docs.arduino.cc/resources/datasheets/ABX00027-datasheet.pdf
about the DMA functions, i mean sampling rate, buffer sizes and location, setting clk , identifying where interrupts will occur.
Thanks for the link!
Having a breif look into it, I find nothing about that "12 channel DMA". It's way too late here and maybe that's a disturbing factor.
What You have described looks like: read an I/O, send out a DAC value, store somewhere. That is usually done by a few line of code in "all" controllers.
Have You found any DMA documentation that I miss?
interesting, because it says there under features and peripherals... but now im not sure anymore. i do know it uses the SAMD21 like the arduino zero which also has 12 dma peripheral. and yes basically read an I/O send out DAC/PWM value, store somewhere .. transmit and receive with interrupts. i just would need help structuirng that or a code guide or a sample code
thank you very much
Sorry but I have to leave this for the other helpers. No "features and peripheral" found in the link.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
