I want to add a couple of Analogue inputs to a 12F683 Oshonsoft program. How do I set up the code (ADCON0, ANSEL, ADCON, ADON or whatever) for this please? I will use AN1 and AN2. I'm happy with similar examples!
Hi Eric,
You might remember helping me with a TIMER program last week? This is an add on to it, and will use a timer in conjunction with the A/Ds. So both programs have been merged. I don't fully understand the 'bits' in the header, even though I spend quite a time trying in the data sheets. I wouldn't dare try changing them, in case it has repercussions, that I again wouldn't understand.
I was looking at the header layerout and noticed (e,g,
T1CON = %00110000 '0x30 = 8:1, so thats 1MHz/8= 125KHz or 8uSec
T1CON.T1OSCEN = 1
T1CON.TMR1ON = 1
T1CON.TMR1CS = 0
Am I correct, that at the 'T1CON' line '.T1OSCEN-TMR1ON and TMR1CS' can be 'catered for by changing the %00000000 bits?
Hi Eric,
Paul's code is a bit long for me to follow, but I've tried to shrink mine and tidy it up the best I can, hope you can read it easier.
Camerart.
Since I posted the 'tidied up' program I've slipped back down the well. I must have altered something, but I can't find the problem. Should I go back to before I changed it?
I added a led to a spare pin, as a kind of diagnostic help, but I couldn't get it to work. So I changed the LOOP as a simple LED toggle. I have added a LED to the 3 spare output pins and a pause only, but PINs 2 and 3 don't seem to work.