Hello Everybody. I have several templates to build code on. Here is my 12F675 template:
ANSEL = 0 'all inputs digital
CMCON = 7 'comparators off
DEFINE OSCCAL_1K 1 ' Set OSCCAL for 1K device to accurize osc
X VAR BYTE ' use for 256 step ADC result
'uncomment & use the following lines for 1024 step conversion
'X VAR WORD
'DEFINE ADC_BITS 10 ' Set number of bits in result
'DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS
'ADCON0.7=1 ' Right justification for 10-bit A/D
************************************************** *****
Now, I've upgraded to version 2.46 and want to use 12F683 pics. YES! I studied the datasheet! and found some minor differences. Seems they renamed CMCON to CMCON0 and OSCCAL to OSCCON. So I created a template like the above. Here it is:
CMCON0 = 7 'comparators off
ANSEL = 0 'all inputs digital
DEFINE OSCCON_1K 1 ' Set OSCCAL for 1K device to accurize osc
X VAR BYTE ' use for 256 step ADC result
'uncomment & use the following lines for 1024 step conversion
'X VAR WORD
'DEFINE ADC_BITS 10 ' Set number of bits in result
'DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS
'ADCON0.7=1 ' Right justification for 10-bit A/D
************************************************** *****
Am I correct in assuming this template is equivalent to a 12F683 as the above template for the 12F675? Am I missing something here that may haunt me later. I am awaiting the arrival of the new pics and would like to get an early start on the code. Thank you. - Peter