Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

New Articles From Microcontroller Tips

Back
Top