Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 20th September 2003, 01:35 PM   (permalink)
vxr
Default 3 conditions

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
vxr is offline   Reply With Quote
Old 20th September 2003, 10:14 PM   (permalink)
Exo
Default

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
Exo is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 12:57 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.