Hello Sol,
Thanks again for your repply.
After reading the files you pointed, I added the following line to the "twrk60n512.h" file: "#define BSP_ADC_INPUT_0 (ADC1_SOURCE_AD19)".
In the document http://cache.freescale.com/files/32bit/doc/ref_manual/K60P144M100SF2V2RM.pdf , page 123, the table lists AD19 to the input ADC1_DM0.
In the twrk60n512 schematics, i found that the ADC1_DM0 is connected to the A30 pin in my twrk60n512, so I soldered a wire and put voltage signals ranging from gnd to Vcc.
The convertion is not working properly, as it is not varying with the input. It only shows a trash signal around 1000mV, independent of whatever I put in the input.
In my routine I:
Initiate the LWADC with the function: _lwadc_init_input(&input0,BSP_ADC_INPUT_0);
Attempt to read the ADC with the funciont: _lwadc_read_average(&input0, 10, &percentinput0);
Print the result of the convertion with the function: printf("input0 = %3d\r\n",percentinput0);
Can you help me with that?
Thank you very much.
Best regards,
Francisco S. Locatelli