Unfortunately, i broke my board but i ordered a new one. Today in lab i have been trying to read an analog input from AN3, which is the pot, and send an output signal to ANO. Bascially when the pot is hight i want to turn on an LED which is on AN0. This is my first time programming in c, i did this same sort of project using assembly with an HC11. Any tips
1. Make sure to configure the MCF51CN128 explicit pin mux controls correctly. These mux controls assign a function like ADC inputs or GPIO outputs to the pin you want.
2. Take a look at the MQX out of the box demos for an example of how to configure the potentiometer as an ADC input. The webserver demo uses it in this form.
3. Configure the data direction to OUTPUT for GPIO that you want to drive LED. Check the schematics for polarity to drive LED that way you can turn it on.