Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
949 Views

Is 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 

 

0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
78 Views

The ADC user guide references the header files you need to use to access the ADC: 

 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/max-10/ug_m10_adc.pdf
Reply