Charlie U
Joined: 09 Sep 2003 Posts: 183 Location: Somewhere under water in the Great Lakes
|
Wizard adds erroneous setup_vref() call. |
Posted: Mon Apr 05, 2010 11:30 am |
|
|
I generally use the wizard to create the basic set up for new parts. I did this for a project that runs on a PIC16F1937. The wizard adds a setup_vref(FALSE); at the end of the initialization. The call to setup_vref(FALSE) clears the ADCON0. If the ADC has been setup prior to this, which the wizard does, the ADC is turned off and the channel is set to 0!!
Another half day down the drain.
Lesson learned (again): Don't trust the wizard! |
|