ADC, Error

New to XMOS and XCore? Get started here.
Post Reply
jarain78
New User
Posts: 2
Joined: Thu Dec 26, 2013 2:56 pm
Contact:

ADC, Error

Post by jarain78 »

hello my name is jaime, I received a gift of a XMOS Startkit, and am in the process of learning to program it, and I control the I / O ports and I want to do the ADC, but here's my question, when I run one of the example find on page for an analog to digital conversion, generates me errors in this line:

adc_enable (xs1_su, c_adc, trigger_port, adc_config);

and at the entrance: xs1_su says not stated, but the example is not shown as it is declared.

Can someone explain me what does that entry and How to declare it.

thanks


richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

jarain78 wrote:hello my name is jaime, I received a gift of a XMOS Startkit, and am in the process of learning to program it, and I control the I / O ports and I want to do the ADC, but here's my question, when I run one of the example find on page for an analog to digital conversion, generates me errors in this line:

adc_enable (xs1_su, c_adc, trigger_port, adc_config);
The first argument to adc_enable is the reference to the tile on the network containing the ADCs. The the case of the startKIT this is "adc_tile", i.e. you should use

Code: Select all

adc_enable(adc_tile, c_adc, trigger_port, adc_config)
.

You need to include "platform.h" for the declaration of the adc_tile tile.
Post Reply