Hallo ich habe ein Kompassmodul CMPS03 an mein RN-Control angeschlossen und ein kleines Testprogramm geschrieben, jedoch bekomm ich beim compilieren Fehler, welche ich mir nicht erklären kann:

Error1 - LINE 38 Unknown Statement [.EQU not found for: PORTC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: PORTC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: DDRC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: DDRC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: DDRC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: DDRC] in File
Error1 - LINE 38 Unknown Statement [.EQU not found for: PINC] in File
... usw...

Zeile 38 ist die letzte Zeile im Code... also das "END SUB"

kann mir jemand helfen ????

danke!


Code:
Declare Sub Kompass()

$crystal = 16000000                                         'Quarzfrequenz
$baud = 9600                                                'Baudrate für RS232

Dim Richtungint As Word                                     'Zwischenvariable für Kompassmessung cmps03
Dim Richtung As Single                                      'Richtung für Kompassmessung cmp03
Dim Lsb As Byte
Dim Msb As Byte


Config Scl = Portc.0                                        'Ports fuer IIC-Bus
Config Sda = Portc.1

I2cinit                                                     'I2C Initialisieren

'On Timer2 Interrupthandler                                  'Alle Interrups werden in dieser Routine behandelt

Do                                                          'Endlosschleife
   Call Kompass()
   Waitms 200
Loop
End

Sub Kompass ()
  I2cstart
  I2cwbyte 192                                              'I2C Adresse C0
  I2cwbyte 2                                                'Register 2 + 3
  I2cstart
  I2cwbyte 193                                              'Leseadresse (C1)
  I2crbyte Msb , Ack
  I2crbyte Lsb , Nack
  I2cstop
  Richtungint = Makeint(lsb , Msb)                          'Word aus 2 Byte machen
' Richtung = Richtungint                                    'In Single zum Rechnen umwandeln
' Richtung = Richtung / 10                                  'Wert ist inkl. einer Nachkommastelle
  Print "Richtung: " ; Richtungint
End Sub