Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 6 months ago. This question has been closed. Reason: N/A
I want to check signal coming on LPC 1768 pin 19.
Hi, I'm sending a signal to pin 19 of mbed. I want to check that how much is the frequency of this signal. I made a low pass filter on breadboard and then connecting mbed to it and after that connected it to the oscilloscope. But I cant see anything variation.
Im using the code below shown in picture;
1 Answer
10 years, 6 months ago.
I doubt that you'll get reliable measurements using a raw audio signal input. First, I would run your LPF signal into a comparator (like the LM339) in order to square up the edges of the raw signal. Then, you can use the InterruptIn and Timer classes to measure time between rising edges. You may still get some noise spikes, though. Also, note that you can't run the InterruptIn on p19 or p20 of the LPC1768. Check the documentation for the InterruptIn class.
Try to send it via Serial to your PC, then you can check how much is coming exactly, instead of only knowing if it is larger or smaller than 0.3.
posted by Erik - 06 Feb 2014Not possible to use serial pin. i already put some other functions on it. :(
posted by Ravneet S 06 Feb 2014You have the LPC1768, the serial connection to your PC is always available. It could be that you already send something else to your PC, in that case, disable it and send this. You can re-enable it later, but first you need to know what you are getting from your AnalogIn. By the way, what kind of signal are you putting on it? (So the source, and things like bias circuits).
posted by Erik - 06 Feb 2014Well Im passing Audio signal to the filter (capacitor and resistor) and then it goes to the pins 19 and 20 (AnalogIn). So based on this I want to check the frequency on those pins.
posted by Ravneet S 06 Feb 2014