Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jon76

  • Rank
  1. Reynard, That was the problem! I redefined adc_measure() to AND ADCON0 with 0xC7 and shift "channel" left twice as you said, and the function now works on RA1. Thanks for the help. JT
  2. I'm having trouble getting the 16F616 to do a conversion on any ADC pin but RA0. Using the SourceBoost C compiler under MPLAB 8.10. With ANSEL = 1, TRISA = 1, adcon0.CHS0 = 0, and channel 0 selected, ADC works fine and writes ADC data to port c. With any other ADC input selected, and appropriate registers modified, the 'adc_measure( n )' function does not write the appropriate ADC value to port c. See code below. Int Osc set to 4 MHz, all other features disabled except MCLR. Programmed using ICD2. /* 16F616_analog_in.c */ //CODE to test 16F6
  3. Thanks, Turns out that's the problem, pins were set to analog in. ANSEL = 0; solved the problem. Thanks again for the quick reply. JT
  4. Sorry for the confusion. I'm now programming a 16F877 with a 4 Mhz external osc as on the Pic Dem 2 board. My eventual goal is to figure out what I'm doing wrong on the '877 which I've used in the past with a different compiler, and then go back to the 16F616.
  5. I’m having difficulty getting the Sourceboost C compiler to integrate with MPLAB 8.1. The code will compile but when it is downloaded to the PIC and run, nothing appears to happen at the hardware, and the Watch List is not updated as if the registers have not been changed. I tried to program a 16F616 with no luck. I’m now trying the program WINK LED that I got off the web on a 16F877 on aPicDem2 board. Again no work! Code is as shown. //Wink LED CODE toggles RB0, RB1 #include <pic16f877.h> #include <system.h> #include <icd2.h> // Set configuration fus
  • Create New...