Hello all,

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

Reply to This

Replies to This Discussion

here is a few 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.

:-) Happy programming...

Reply to This

RSS

Advertisement Click Here

Spread The Word!

Follow TowerGeeks on TwitterTowerGeeks on FacebookShare This
Towergeeks has their own pages on Twitter as well as Facebook. Find us there and help spread the word about the Tower System!

© 2010   Created by TowerGeeks.

Badges  |  Report an Issue  |  Terms of Service

Sign in to chat!