PIC12F683 Data Sheet - Microchip
PIC12F683 Data Sheet - Microchip PIC12F683 Data Sheet - Microchip
PIC12F683 BTFSS Bit Test f, Skip if Set Syntax: [ label ] BTFSS f,b Operands: 0 ≤ f ≤ 127 0 ≤ b < 7 Operation: skip if (f) = 1 Status Affected: None Description: If bit ‘b’ in register ‘f’ is ‘0’, the next instruction is executed. If bit ‘b’ is ‘1’, then the next instruction is discarded and a NOP is executed instead, making this a 2-cycle instruction. CLRWDT Syntax: Operands: Operation: Status Affected: Description: Clear Watchdog Timer [ label ] CLRWDT None 00h → WDT 0 → WDT prescaler, 1 → TO 1 → PD TO, PD CLRWDT instruction resets the Watchdog Timer. It also resets the prescaler of the WDT. Status bits TO and PD are set. CALL Call Subroutine Syntax: [ label ] CALL k Operands: 0 ≤ k ≤ 2047 Operation: (PC)+ 1→ TOS, k → PC, (PCLATH) → PC Status Affected: None Description: Call Subroutine. First, return address (PC + 1) is pushed onto the stack. The eleven-bit immediate address is loaded into PC bits . The upper bits of the PC are loaded from PCLATH. CALL is a two-cycle instruction. COMF Complement f Syntax: [ label ] COMF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) → (destination) Status Affected: Z Description: The contents of register ‘f’ are complemented. If ‘d’ is ‘0’, the result is stored in W. If ‘d’ is ‘1’, the result is stored back in register ‘f’. CLRF Clear f Syntax: [ label ] CLRF f Operands: 0 ≤ f ≤ 127 Operation: 00h → (f) 1 → Z Status Affected: Z Description: The contents of register ‘f’ are cleared and the Z bit is set. CLRW Syntax: Operands: Operation: Status Affected: Description: Clear W [ label ] CLRW None 00h → (W) 1 → Z Z W register is cleared. Zero bit (Z) is set. DECF Decrement f Syntax: [ label ] DECF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) - 1 → (destination) Status Affected: Z Description: Decrement register ‘f’. If ‘d’ is ‘0’, the result is stored in the W register. If ‘d’ is ‘1’, the result is stored back in register ‘f’. DS41211D-page 104 © 2007 Microchip Technology Inc.
PIC12F683 DECFSZ Decrement f, Skip if 0 Syntax: [ label ] DECFSZ f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) - 1 → (destination); skip if result = 0 Status Affected: None Description: The contents of register ‘f’ are decremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. If the result is ‘1’, the next instruction is executed. If the result is ‘0’, then a NOP is executed instead, making it a 2-cycle instruction. INCFSZ Increment f, Skip if 0 Syntax: [ label ] INCFSZ f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) + 1 → (destination), skip if result = 0 Status Affected: None Description: The contents of register ‘f’ are incremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. If the result is ‘1’, the next instruction is executed. If the result is ‘0’, a NOP is executed instead, making it a 2-cycle instruction. GOTO Unconditional Branch Syntax: [ label ] GOTO k Operands: 0 ≤ k ≤ 2047 Operation: k → PC PCLATH → PC Status Affected: None Description: GOTO is an unconditional branch. The eleven-bit immediate value is loaded into PC bits . The upper bits of PC are loaded from PCLATH. GOTO is a two-cycle instruction. IORLW Inclusive OR literal with W Syntax: [ label ] IORLW k Operands: 0 ≤ k ≤ 255 Operation: (W) .OR. k → (W) Status Affected: Z Description: The contents of the W register are OR’ed with the eight-bit literal ‘k’. The result is placed in the W register. INCF Increment f Syntax: [ label ] INCF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (f) + 1 → (destination) Status Affected: Z Description: The contents of register ‘f’ are incremented. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. IORWF Inclusive OR W with f Syntax: [ label ] IORWF f,d Operands: 0 ≤ f ≤ 127 d ∈ [0,1] Operation: (W) .OR. (f) → (destination) Status Affected: Z Description: Inclusive OR the W register with register ‘f’. If ‘d’ is ‘0’, the result is placed in the W register. If ‘d’ is ‘1’, the result is placed back in register ‘f’. © 2007 Microchip Technology Inc. DS41211D-page 105
- Page 55 and 56: PIC12F683 8.3 Comparator Configurat
- Page 57 and 58: PIC12F683 8.6 Comparator Interrupt
- Page 59 and 60: PIC12F683 8.9 Comparator Gating Tim
- Page 61 and 62: PIC12F683 FIGURE 8-7: COMPARATOR VO
- Page 63 and 64: PIC12F683 9.0 ANALOG-TO-DIGITAL CON
- Page 65 and 66: PIC12F683 9.1.5 INTERRUPTS The ADC
- Page 67 and 68: PIC12F683 REGISTER 9-1: ADCON0: A/D
- Page 69 and 70: PIC12F683 9.3 A/D Acquisition Requi
- Page 71 and 72: PIC12F683 TABLE 9-2: SUMMARY OF ASS
- Page 73 and 74: PIC12F683 10.0 DATA EEPROM MEMORY T
- Page 75 and 76: PIC12F683 10.2 Reading the EEPROM D
- Page 77 and 78: PIC12F683 11.0 CAPTURE/COMPARE/PWM
- Page 79 and 80: PIC12F683 11.2 Compare Mode In Comp
- Page 81 and 82: PIC12F683 11.3.1 PWM PERIOD The PWM
- Page 83 and 84: PIC12F683 TABLE 11-4: TABLE 11-5: R
- Page 85 and 86: PIC12F683 12.0 SPECIAL FEATURES OF
- Page 87 and 88: PIC12F683 12.2 Calibration Bits Bro
- Page 89 and 90: PIC12F683 12.3.4 BROWN-OUT RESET (B
- Page 91 and 92: PIC12F683 FIGURE 12-4: TIME-OUT SEQ
- Page 93 and 94: PIC12F683 TABLE 12-4: INITIALIZATIO
- Page 95 and 96: PIC12F683 12.4.2 TIMER0 INTERRUPT A
- Page 97 and 98: PIC12F683 12.5 Context Saving Durin
- Page 99 and 100: PIC12F683 REGISTER 12-2: WDTCON: WA
- Page 101 and 102: PIC12F683 FIGURE 12-10: WAKE-UP FRO
- Page 103 and 104: PIC12F683 13.0 INSTRUCTION SET SUMM
- Page 105: PIC12F683 13.2 Instruction Descript
- Page 109 and 110: PIC12F683 RETFIE Return from Interr
- Page 111 and 112: PIC12F683 SUBWF Subtract W from f S
- Page 113 and 114: PIC12F683 14.0 DEVELOPMENT SUPPORT
- Page 115 and 116: PIC12F683 14.7 MPLAB ICE 2000 High-
- Page 117 and 118: PIC12F683 15.0 ELECTRICAL SPECIFICA
- Page 119 and 120: PIC12F683 15.1 DC Characteristics:
- Page 121 and 122: PIC12F683 15.3 DC Characteristics:
- Page 123 and 124: PIC12F683 15.5 DC Characteristics:
- Page 125 and 126: PIC12F683 15.6 Thermal Consideratio
- Page 127 and 128: PIC12F683 15.8 AC Characteristics:
- Page 129 and 130: PIC12F683 FIGURE 15-5: CLKOUT AND I
- Page 131 and 132: PIC12F683 TABLE 15-4: RESET, WATCHD
- Page 133 and 134: PIC12F683 FIGURE 15-9: CAPTURE/COMP
- Page 135 and 136: PIC12F683 TABLE 15-9: PIC12F683 A/D
- Page 137 and 138: PIC12F683 FIGURE 15-10: PIC12F683 A
- Page 139 and 140: PIC12F683 16.0 DC AND AC CHARACTERI
- Page 141 and 142: PIC12F683 FIGURE 16-4: 5.0 MAXIMUM
- Page 143 and 144: PIC12F683 FIGURE 16-8: MAXIMUM IDD
- Page 145 and 146: PIC12F683 FIGURE 16-12: MAXIMUM IDD
- Page 147 and 148: PIC12F683 FIGURE 16-16: BOR IPD vs.
- Page 149 and 150: PIC12F683 FIGURE 16-20: WDT PERIOD
- Page 151 and 152: PIC12F683 FIGURE 16-24: VOL vs. IOL
- Page 153 and 154: PIC12F683 FIGURE 16-28: SCHMITT TRI
- Page 155 and 156: PIC12F683 FIGURE 16-32: LFINTOSC FR
<strong>PIC12F683</strong><br />
DECFSZ Decrement f, Skip if 0<br />
Syntax: [ label ] DECFSZ f,d<br />
Operands: 0 ≤ f ≤ 127<br />
d ∈ [0,1]<br />
Operation: (f) - 1 → (destination);<br />
skip if result = 0<br />
Status Affected: None<br />
Description: The contents of register ‘f’ are<br />
decremented. If ‘d’ is ‘0’, the result<br />
is placed in the W register. If ‘d’ is<br />
‘1’, the result is placed back in<br />
register ‘f’.<br />
If the result is ‘1’, the next<br />
instruction is executed. If the<br />
result is ‘0’, then a NOP is<br />
executed instead, making it a<br />
2-cycle instruction.<br />
INCFSZ Increment f, Skip if 0<br />
Syntax: [ label ] INCFSZ f,d<br />
Operands: 0 ≤ f ≤ 127<br />
d ∈ [0,1]<br />
Operation: (f) + 1 → (destination),<br />
skip if result = 0<br />
Status Affected: None<br />
Description: The contents of register ‘f’ are<br />
incremented. If ‘d’ is ‘0’, the result<br />
is placed in the W register. If ‘d’ is<br />
‘1’, the result is placed back in<br />
register ‘f’.<br />
If the result is ‘1’, the next<br />
instruction is executed. If the<br />
result is ‘0’, a NOP is executed<br />
instead, making it a 2-cycle<br />
instruction.<br />
GOTO<br />
Unconditional Branch<br />
Syntax: [ label ] GOTO k<br />
Operands: 0 ≤ k ≤ 2047<br />
Operation: k → PC<br />
PCLATH → PC<br />
Status Affected: None<br />
Description: GOTO is an unconditional branch.<br />
The eleven-bit immediate value is<br />
loaded into PC bits . The<br />
upper bits of PC are loaded from<br />
PCLATH. GOTO is a<br />
two-cycle instruction.<br />
IORLW<br />
Inclusive OR literal with W<br />
Syntax: [ label ] IORLW k<br />
Operands: 0 ≤ k ≤ 255<br />
Operation: (W) .OR. k → (W)<br />
Status Affected: Z<br />
Description: The contents of the W register are<br />
OR’ed with the eight-bit literal ‘k’.<br />
The result is placed in the<br />
W register.<br />
INCF<br />
Increment f<br />
Syntax: [ label ] INCF f,d<br />
Operands: 0 ≤ f ≤ 127<br />
d ∈ [0,1]<br />
Operation: (f) + 1 → (destination)<br />
Status Affected: Z<br />
Description: The contents of register ‘f’ are<br />
incremented. If ‘d’ is ‘0’, the result<br />
is placed in the W register. If ‘d’ is<br />
‘1’, the result is placed back in<br />
register ‘f’.<br />
IORWF<br />
Inclusive OR W with f<br />
Syntax: [ label ] IORWF f,d<br />
Operands: 0 ≤ f ≤ 127<br />
d ∈ [0,1]<br />
Operation: (W) .OR. (f) → (destination)<br />
Status Affected: Z<br />
Description: Inclusive OR the W register with<br />
register ‘f’. If ‘d’ is ‘0’, the result is<br />
placed in the W register. If ‘d’ is<br />
‘1’, the result is placed back in<br />
register ‘f’.<br />
© 2007 <strong>Microchip</strong> Technology Inc. DS41211D-page 105