Hello everyone,
I'm new to programming boards like this one (only tried something with an arduino once), but I wanted to try to create a monitoring station where the LPC54102 reads values from some sensors. I started by reading the example code in LPCOpen, but failed to understand how I can do this... currently I'm trying to read temperatures using an analog temperature sensor. Can anyone help me with example code or just guiding me to someone/somewhere to help?
Thanks in advance
Hi,
You can use the LPC5410x ADC example, the LPC5410x ADC example shows how to use the ADC to perform
a sequence of conversions and monitor a threshold crossing. The ADC is configured to monitor an input and is sampled by manually starting the ADC sequence from the system tick interrupt.
The sequence then starts and generates an interrupt when complete. During ADC sequence conversion, an interrupt will also be generated if the sample read crosses the threshold 0 value.
To use this example, build and program it and then run it on the board. Turn the potentiometer to change the ADC
signal input. Converted ADC values are displayed periodically via the UART as kicked off by the ADC interrupt.
This example is located in the LPCOpen folder,
....\LPCOpen\lpc5410x_lpcxpresso_54102_lpcxpresso_3.01a\periph_adc
In addition please check the below docs, these may help:
How to create a new LPC project using LPCOpen and MCUXpresso IDE
How to create a new LPC project using LPCOpen and LPCXpresso
Have a great day,
Soledad
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hey! Really appreciate the help! I actually found about that example about 2 days ago, but still can't run it properly... Can you tell me if I need to connect the potentiometer to a specific pin? Because I've tried all of them (also tried to connect a temperature sensor instead of a potentiometer) and I can't seem to get it right.