Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
;******************************************************************
;* *
;* 12F675 *
;* *
;******************************************************************
#include <p12f675.inc>
errorlevel -302
__config _MCLRE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT
RESET clrf STATUS ; |B0
movlw b'00000111' ; |B0
movwf CMCON ; comparator off > digital I/O |B0
bsf STATUS,RP0 ; bank 1 |B1
call h'3FF' ; get factory calibration value |B1
movwf OSCCAL ; set OSCCAL calibration value |B1
clrf ANSEL ; set all pins to digital mode |B1
;******************************************************************
;* *
;* 12F683 *
;* *
;******************************************************************
__config _FCMEN_OFF & _IESO_OFF & _MCLRE_OFF & _WDT_OFF & _INTOSCIO
;
; 12F683 specific peripheral initialization
;
Reset clrf STATUS ; |B0
movlw b'00000111' ; |B0
movwf CMCON0 ; comparator off |B0
bsf STATUS,RP0 ; bank 1 |B1
clrf ANSEL ; digital I/O |B1
;
; setup INTOSC for 8-MHz and wait for it to become stable
;
movlw b'01110000' ; |B1
movwf OSCCON ; 8-mhz INTOSC system clock |B1
Stable btfss OSCCON,HTS ; oscillator stable? |B1
goto Stable ; no, branch |B1
bcf STATUS,RP0 ; bank 0 |B0
Th a lot Mike! I also think that 12F683 is a nice litle beast all thought I bhougt it cause I didn't found any 12F675's :lolMike said:Your hardware initialization will be slightly different and while the '675 INTOSC is "locked in" at 4-MHz, the '683 INTOSC is adjustable up to 8-MHz.
BTW, the 12F683 is a good choice.
Kind regards, Mike
[/code]
Duhh!......just kiding :loljimg said:This thread got me interested. I just checked the specs for the 683. It has a 32K mode without a crystal that only draws 25 ua at 3v. For only 25 cents more, less than a crystal and caps, I'm switching from the 12f629 to the 683!
I don't need the precision of the crystal, just the low current draw.
?? No, I was serious. Am I mis-reading the specs here?Tarsil said:Duhh!......just kiding :lol
Sorry ...I was mean for no reason. U aren't mis-reading the specs. I just thought that the Nanowatt isn't that important compaired to other improvements over the 12F629 (now I think I might be wrong). It has higher speed int osc, 2X FLASH, RAM, EEPROM, 4X10bits AD imputs, PWM etc. a lot of things that 12F629 doesn't have.jimg said:?? No, I was serious. Am I mis-reading the specs here?