Seven segment display 1 digit For Basic PRO Compiler

@ device pic16f877 
define osc 4   'sevent segment common Anode
define adc_bits 8
main:
adcon1 = 7
trisa = $ff
trisd = $00
 disp   var     portd
 num    var     byte
 num =0 

 while(1)  
    for num = 0 to 9  
     lookup num,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$10],disp 
     pause 500 
    next num
 wend
end

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.