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

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.