3 conditions

Status
Not open for further replies.

vxr

New Member
how to have 3 conditions in programing the PIC16F84 in asm

eg. Condition 1 , Condition 2 , Condition 3

if condition 1

execute........

if condition 2

execute........

if condition 3

execute

loop back
 
using GOTO's
Code:
Again         BTFSC A_File, A_Bit1
              GOTO Condition1 
Resume2       BTFSC A_File, A_Bit2
              GOTO Condition2
Resume3       BTFSC A_File, A_Bit3
              GOTO Condition3   
              GOTO Again

Condition1   ;Condition 1 code
              GOTO Resume2

Condition2   ;Condition 2 code
              GOTO Resume3

Condition3   ;Condition 3 code
              GOTO Again
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…