Nem tudok számolni?
Friedrich Gábor
igazifido at t-online.hu
Thu Jan 18 12:28:59 CET 2007
Üdv!
Az alábbi Bascom kódnak számolásom szerint a PD6 kimenetet
7372800/(256*64)-gyel kellene billentenie,
ehelyett kb. 1Hz-el billeg.
Hol a hiba?
Köszi
Fidó
$crystal = 7372800
$regfile = "Attiny2313.dat"
Dim Szamlalo As Byte
Szamlalo = 64
Config Timer0 = Timer , Prescale = 256
On Timer0 Megszakitas
Enable Interrupts
Enable Timer0
Config Portd.6 = Output
Do
Loop
Megszakitas:
Decr Szamlalo
If Szamlalo = 0 Then
Szamlalo = 64
Toggle Portd.6
End If
Return
End
More information about the Elektro
mailing list