peterzatko
New Member
I need help with my project. Need to do timer from 0 to 999 / (0,1,2 .... 999 every second) and display it in 3 digit 7 segment LED display Here I have a timer from 0 to 9 every second. I need help because I do not know how to proceed ďalej.PIC 16F887.Program is in mikrobasic.
I know I have to use multiplexing. displays are the common cathode.
loop:
PORTA.0 = 1 / on port RA0 - RA2 outputs are the base of the transistor
PORTD = $ 3F / number 0 on the display
delay_ms (900)
PORTD = $ 06
delay_ms (900)
PORTD = $ 5B
delay_ms (900)
PORTD = $ 4F
delay_ms (900)
PORTD = $ 66
delay_ms (900)
PORTD = $ 6D
delay_ms (900)
PORTD = $ 7D
delay_ms (900)
PORTD = $ 07
delay_ms (900)
PORTD = $ 7F
delay_ms (900)
PORTD = $ 6F
delay_ms (900)
goto loop
I know I have to use multiplexing. displays are the common cathode.
loop:
PORTA.0 = 1 / on port RA0 - RA2 outputs are the base of the transistor
PORTD = $ 3F / number 0 on the display
delay_ms (900)
PORTD = $ 06
delay_ms (900)
PORTD = $ 5B
delay_ms (900)
PORTD = $ 4F
delay_ms (900)
PORTD = $ 66
delay_ms (900)
PORTD = $ 6D
delay_ms (900)
PORTD = $ 7D
delay_ms (900)
PORTD = $ 07
delay_ms (900)
PORTD = $ 7F
delay_ms (900)
PORTD = $ 6F
delay_ms (900)
goto loop