Basic Toggle Control For Basic PRO Compiler




@ device  PIC16F877 
define osc 4
define adc_bits 8
main:

    trisb =$00
    trisa =$ff
    adcon1 = 7
    lamp   var portb.0
    sw1    var porta.0 
    lamp=0  

while(1)  
     if(!sw1) then 
        pause 10     
        toggle lamp
        while(!sw1):wend 
     endif
     pause 10   
wend 
end




READ  Forverse - Reverse Control For Basic PRO Compiler

Leave a Comment

*
= 4 + 0

Read previous post:
Basic input-output For Basic PRO Compiler

define osc 4 define adc_bits 8 trisb =$00 trisa =$ff adcon1 = 7 lamp var portb start var porta.0 stops...

Close
Scroll to top