10 years, 9 months ago.  This question has been closed. Reason: I got it

Help with Analog In Pin 19 and 20 of NXP LPC1768

Hi Everyone.

I'm using LPC1768 for observing some signals and voltage at particular pins. Currently I'm working on Analog In ( pins 19 and

20) . I'm sending signal of certain frequency from a board ( presents board - used for in flight entertainment systems) and it pass

through capacitor and resistor and then goes to mbed Analog In pins 19 and 20.

I have tried to figure out code for it but I didn't succeeded.

so I want to know that how much is the frequency coming on these pins (19 and 20).

Any help would be appreciable.

well the signal looks like a sine wave. Yes I only need to get the frequency. Though I have to check that how much frequency is coming from the board that I'm using.

posted by Ravneet S 05 Feb 2014
  1. include "mbed.h"

AnalogIn ain(p19);

DigitalOut led(LED1);

int main() { while (1){

printf("analog in = %f\n", ain.read());

if(ain > 0.3) {

led = 1; } else { led = 0; } } }

Hi Chris, Im using this code to read whatever is coming to analog pin.

posted by Ravneet S 06 Feb 2014