Last Night I put the finishing touches to my now enormous but fully functioning program, using my trusty IcePic2. This morning I was ready to Demo my creation to my customer, but was not in a position to show it with the IcePic, so I blew an EPROM version of the PIC17C756A, for demonstration purposes. Bugger me, but my program is now playing up badly, seeing inputs being made when they are not (rang the customer to cancel the appointment). I went back to the IcePic2 and everything was OK. Please can somebody help this newbie with some suggestions. I have a feeling its something to do with the ADCON statements. One question I would like answered please, is it OK to keep switching on and off the ADC? do I need to add wait statements after switching it off. I do lots of reads with the ADC at various times. I disable the ADC with an ADCON1=11101111 after doing a read, is this correct? The program also uses I2C reads and writes, I've put wait's after all the writes as it says in the book. I have the following code near the top of my program
ADCON1 = %11101111
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
GoTo MAIN
Bookmarks