$regfile = "Attiny2313.dat" $prog &HFF , &H64 , &HDF , &HFF ' generated. Take care that the chip supports all fuse bytes. $crystal = 1000000 Lm_da Alias Portd.2 Lm_cl Alias Portd.3 Lm_en Alias Portd.4 Dim Nwert As Word Dim Rwert As Word Dim I As Word 'Nwert = &B01010101010101 '5461 - 27305 Khz - Kanal 30 'Rwert = &B1111000000 '5 Khz Raster 'Nwert = 5461 '5461 - 27305 Khz - Kanal 30 'Rwert = 960 '5 Khz Raster Nwert = 4000 '4000 - 20000 Khz - Test Rwert = 704 '5 Khz Raster 'Info zum Rwert 'PLL - Steuerung, Tabelle siehe Datenblatt ' '|S|R2|R1|R0|TB|B2|B1|B0|T1|T0| '|1| 1| 1| 1| 0| 0| 0| 0| 0| 0| ' 'R0 - R2 = Faktor 1440 = 5 Khz Raster Waitms 100 Reset Lm_da Reset Lm_cl Reset Lm_en 'Do ' If Taster1 = 1 Then ' Gosub Sende_an_lm7001 ' End If 'Loop Lm_en = 1 Waitus 10 'bit 0 - 13 (Nwert) For I = 0 To 13 If Nwert.i = 1 Then Set Lm_da Else Reset Lm_da End If Waitus 10 Set Lm_cl Waitus 10 Reset Lm_cl Waitus 10 Next I 'bit 14 - 23 (Rwert) For I = 0 To 9 If Rwert.i = 1 Then Set Lm_da Else Reset Lm_da End If Waitus 10 Set Lm_cl Waitus 10 Reset Lm_cl Waitus 10 Next I 'Shiftout Lm_da , Lm_cl , Nwert , 0 , 14 , 3 'Shiftout Lm_da , Lm_cl , Rwert , 0 , 10 , 3 Waitus 10 Lm_en = 0