Hi all, I have recently purchased an HY-LPC1788 development board. I'm experimenting with ADC's but some channels seem not to respond to setup code. Just to semplify I've configured all ADC pins as GPIO output. The following code:
PINSEL_ConfigPin(BRD_ADC_CH_PORT_1, BRD_ADC_CH_PIN_31, 0); GPIO_SetDir(1, (1<<31), 1); GPIO_ClearValue( 1, (1<<31) ); PINSEL_ConfigPin(BRD_ADC_CH_PORT_0, BRD_ADC_CH_PIN_13, 0); GPIO_SetDir(0, (1<<13), 1); GPIO_ClearValue( 0, (1<<13) );
works properly for pins P1.31 and P0.13. The same code applied to P0.23-P0.26 does not have any effect. Even setting up P0.23 to 0.26 as ADC I still get output HIGH. I tried to report the problem to the technical support of the seller but I have received no reply. Searching on the forum I've found another thread about a similar problem (on P0.21) but the user did not posted if and how he solved. Thanks in advance for your help.
Raffaele
These types of boards tend to be self-service.
Review the schematic, check if the pins are used, if they have pull-ups or are connected to other circuitry. Make sure appropriate clocks are enabled.
Hi Pier, thanks for your reply.
Well...yes, P0.23/24/25 are connected to the UDA1380HN stereo audio interface. Pin P0.26 is the DAC out and is connected to a 10K resistor. As I don't need of the audio interface nor the DAC, I (partially) solved the problem by breaking the electrical contact between ADC pins and the board and by wiring the core pins directly to my sensors. It seems working well. Thank you so much for your help.