This post describes MOVF and MOVFF Instructions for PIC Microcontroller with examples. MOVF and MOVFF instructions are used to copy values inside the PIC microcontroller. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included MPASM i.e. the assembler we…
MOVLW and MOVWF Instructions for PIC Microcontroller
This post describes MOVLW and MOVWF Instructions for PIC Microcontroller with examples. MOVLW and MOVWF instructions are used to copy values to and from WREG respectively. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included MPASM i.e. the assembler…
CALL RCALL and RETURN Instructions for PIC Microcontroller
This post describes CALL RCALL and RETURN Instructions for PIC Microcontroller with examples. CALL and RCALL instructions are used to call subroutines. RETURN instruction is used to return from a subroutine. Subroutines are used when same piece of code is required to be used multiple times in a program. Writing this piece of code as…
BRA and GOTO Instructions for PIC Microcontroller
This post describes BRA and GOTO Instructions for PIC Microcontroller with examples. BRA and GOTO instructions are unconditional branch / jump instructions that unconditionally jump to the given label. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included MPASM…
INCFSZ and INFSNZ Instructions for PIC Microcontroller
This post describes INCFSZ and INFSNZ Instructions for PIC Microcontroller with examples. INCFSZ and INFSNZ increment a file register and skip the next instruction if the result is zero or not zero respectively. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last…
DECFSZ and DCFSNZ Instructions for PIC Microcontroller
This post describes DECFSZ and DCFSNZ Instructions for PIC Microcontroller with examples. DECFSZ and DCFSNZ decrement a file register and skip the next instruction if the result is zero or not zero respectively. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last…
SETF and CLRF Instructions for PIC Microcontroller
This post describes SETF and CLRF Instructions for PIC Microcontroller with relevant examples. SETF / CLRF instructions are used to set / clear all the bits of a file register. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included…
INCF and DECF Instructions for PIC Microcontroller
This post describes INCF and DECF Instructions for PIC Microcontroller with relevant examples. INCF / DECF instructions are used to increment / decrement a file register. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included MPASM i.e. the assembler…
How to Check an Input Pin of PIC Microcontroller
This posts describes how to check the state of a single input pin of PIC microcontroller in C as well as assembly language. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last version that included MPASM i.e. the assembler we require to…
BTFSS and BTFSC Instructions for PIC Microcontroller
This post describes BTFSS and BTFSC Instructions for PIC Microcontroller with relevant examples. BTFSS and BTFSC are bit oriented instructions used to check the status of a single bit of any file register. Note: For this tutorial I am using MPLAB X v5.0 but you can use any version upto v5.35. Version 5.35 is last…