Wednesday 11 March 2015

Programming PIC16F877A in Assembly (Continued)

Bit Oriented Operations:


BCF:

Santax: BCF f,b
f  => address of file register
b => Bit number which is to be clear

Function: Use to clear bit of file register.

BSF:

Santax: BSF f,b
f  => address of file register
b => Bit number which is to be set

Function: Use to set bit of file register.

BTFSC:

Santax: BTFSC f,b
f  => address of file register
b => Bit number which is to be test

Function: Use to test bit of file register and skip next instruction if bit is clear.

BTFSS:

Santax: BTFSS f,b
f  => address of file register
b => Bit number which is to be test

Function: Use to test bit of file register and skip next instruction if bit is set.

Literal and Control Operations:

ADDLW:

Santax: ADDLW k
k  => Literal Value

Function: Use to add literal value and data in working register.Result will store in WREG.

SUBLW:

Santax: SUBLW k
k  => Literal Value

Function: Use to subtract value in working register from literal value.Result will store in WREG.

ANDLW:

Santax: ANDLW k
k  => Literal Value

Function: Use to Perform AND operation on literal value and data in working register. commonly use for masking.Result will store in WREG

IORLW:

Santax: IORLW k
k  => Literal Value

Function: Use to Perform OR operation on literal value and data in working register. commonly use for masking.Result will store in WREG

XORLW:

Santax: XORLW k
k  => Literal Value

Function: Use to Perform XOR operation on literal value and data in working register. commonly use for masking.Result will store in WREG

MOVLW:

Santax: MOVLW k
k  => Literal Value

Function: Use to move literal value into working register.

CALL:

Santax: CALL t
t  => Tag of subroutine which is to be call.

Function: Use to Call subroutine.

CLRWDT:

Santax: CLRWDT

Function: Use to clear watchdog timer.

GOTO:

Santax: GOTO t
t  => Tag of subroutine.

Function: Use to go to address/tag.

RETFIE:

Santax: RETFIE

Function: Use to return from interrupt service routine.

RETURN:

Santax: RETURN

Function: Use to return from subroutine routine. which is call by CALL command.

SLEEP
Function: Use to go into standby mode.



No comments:

Post a Comment