Device 16F876A
Xtal 20
Dim k As Word
Dim Daten As Byte
Dim Daten2 As Word
Dim PreData As Byte
Dim StatusW As Word
Dim C As Byte
Dim Temper As Float
Symbol CS = PORTC.0
Symbol FSK = PORTC.4
Symbol SDO = PORTC.5
Symbol SCL = PORTC.3
Symbol SDI = PORTC.1
Symbol DQ = PORTA.0
TRISC = %00000010
High FSK
DelayMS 500
Dim i As Byte
Dim Temp As Byte
Dim Text[20] As Byte
All_Digital = 1
Daten2 = $80d7 : GoSub Configs
Daten2 = $8239 : GoSub Configs
Daten2 = $a680 : GoSub Configs
Daten2 = $c623 : GoSub Configs
Daten2 = $94a0 : GoSub Configs
Daten2 = $c2ac : GoSub Configs
Daten2 = $ca81 : GoSub Configs
Daten2 = $c428 : GoSub Configs
Daten2 = $9840 : GoSub Configs
Daten2 = $c800 : GoSub Configs
Daten2 = $c400 : GoSub Configs
Start:
Str Text = "Testsendung",0
For C=0 To 20
Daten = Text[C]
If Daten = 0 Then Break
GoSub Senden
Next
GoTo Start
Senden:
Low CS
For k = 0 To 1
Repeat
Until SDI = 1
SHOut SDO, SCL, MsbFirst, [$b8aa\16]
Next
Repeat
Until SDI = 1
SHOut SDO, SCL, MsbFirst, [$b82d\16]
Repeat
Until SDI = 1
SHOut SDO, SCL, MsbFirst, [$b8d4\16]
Repeat
Until SDI = 1
SHOut SDO, SCL, MsbFirst, [$b800+Daten\16]
High CS
Return
Configs:
Low CS
SHOut SDO, SCL, MsbFirst, [Daten2\16]
High CS
Return