کلیت همیناست خودت یکم تغییر بده بهش میرسی :read:

کد:
http://www.best-microcontroller-projects.com/support-files/frequency-counter-circuit-7seg-tmr1.pdf
کد:
http://www.proschematic.com/support-files/Frequency_counter_4MHz_7seg_test-shift.zip
[hr]
کد:
$regfile = "m32def.dat"
$crystal = 8000000
'------------------------
Config Porta = Output
Config Portb = Output
Porta = &H00
Portb = &HFF
'-----------------------
Dim I As Byte
Dim Segment(10) As Byte
Segment(1) = &HF5
Segment(2) = &H50
Segment(3) = &HB3
Segment(4) = &HF2
Segment(5) = &H56
Segment(6) = &HE6
Segment(7) = &HC7
Segment(8) = &H70
Segment(9) = &HF7
Segment(10) = &H76
'-----------------------
Do
if pinb.0 = 1 then
I=I+1
Porta = Segment(i)
Waitms 500
end if
Loop
End