Altera_Forum
Honored Contributor
7 years agoIs this the function to use for basic read from Max 10 ADC?
Hi.
I'm putting a Max10 ADC into my NIOS2 based design. I have not been able to find any examples for writing NIOS C code to read Max10 ADC. I'm sure it's simple, but getting the includes, drivers, declarations and pointers right can be tricky. I am piecing it together though, and have found something hopeful in the docs. The following is from the NIOS2 user manual- Is this the correct function to read from dedicated ANIN channel 0, slot 0, no sequencer? " 15.3.12 alt_adc_word_read prototype int alt_adc_word_read (alt_u32 sample_store_base, alt_u32* dest_ptr, alt_u32 len)arguments • sample_store_base: base address of sample store core. • *dest_ptr: destination buffer • len: number of 32-bit reads
description reads words from the sample store "
Thanks, Bob