90s2313 + Bascom + 7seg = :/

Jul 18, 2004 0 Replies

Witam Jest taki programik w Bascom AVR na uC 90s2313 i kwarc 4M (lub 8M - efekt jest ten sam):



Config Timer0 = Timer , Prescale = 1 Enable Interrupts Enable Timer0 On Timer0 Ledy Nosave Dim Licznik As Byte



Ddrd = &B1111111



Do Loop



Ledy: If Licznik > 4 Then : Licznik = 1 : End If Select Case Licznik Case 1 : Portb = 6 Portd.2 = 0 Case 2 : Portb = 6 Portd.3 = 0 Case 3 : Portb = 6 Portd.4 = 0 Case 4 : Portb = 6 Portd.5 = 0 End Select ''''''''''''''' Incr Licznik Return



Wyswietla multipleksowo "1111" na czterech wys. 7seg led. Wszystko bylo by dobrze, gdyby nie to ze segmenty, ktore w danej chwili nie maja swiecic lekko sie jarza, co zmniejsza wyrazistosc odczytu. Wys. sa sterowane z portu b przez uln2003 i oporniki. Kluczowanie z portu d przez 4 klucze. Co robie nie tak? Czas trwania imp. kluczujacych jest za krotki? Moze nalezy inaczej sklonstruowac program? Z gory dziekuje za wszystkie sugestie.


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required