Hi
Check the following line:
MCF_ADC_POWER &= ( MCF_ADC_POWER_PD0 | MCF_ADC_POWER_PD1 | MCF_ADC_POWER_PD2 );
These bits are '1' as default (powered down) so to power them up you need to set them to '0'. That is you need to use &= ~(...)
If you need complete ADC support, check out the following: http://www.utasker.com/forum/index.php?topic=280.0. The utasker simulator supports the ADC module and can be used to test threshold triggering interrupts etc...It also automatically optimises the power consumption of the module depending on its exact usage.
Regards
Mark
www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."