Forum: Mikrocontroller und Digitale Elektronik Helft mir bitte schnell mit FastAVR


von Benjamin (Gast)


Lesenswert?

Hallo,

ích habe dieses Programm mit FastAVR geschrieben [Code]


'/////////////////////////////////////////////////////////
'///   FastAVR Basic Compiler for AVR by MICRODESIGN   ///
'///   Name of Your project
'/////////////////////////////////////////////////////////
$Device= 4433   ' used device
$Stack = 28     ' stack depth
$Clock = 4      ' adjust for used crystal 4 MHz
$Source= On     ' basic source in Asm

Dim n As Byte

DDRD=&hff       ' PortD is output
DDRB=&hff       ' PortB is output
n=&hfe          ' init n
m=&hfe          ' init n
Do              ' never ending loop
 PORTD=n        ' n out to port
 Rotate(Left, 1, n) ' rotate n left one bit
 WaitMs 100     ' 100ms delay
Loop            ' back to start of loop
Do              ' never ending loop
 PORTB=m        ' n out to port
 Rotate(Left, 1, m) ' rotate n left one bit
 WaitMs 200     ' 100ms delay
Loop            ' back to start of loop


[Code/]und auf Compile gedrückt, aber es entstanden diese Fehler:

 1. Unknown identifier m (line  15)
 2. Missing "=" (line  15)
 3. Unknown error! (faktor) (line  15)
 4. Not a regular metastatement! (line  15)
 5. Variable M is not declared! (line  22)
 6. Syntax error! (line  22)
 7. Missing "LOOP" (line  22)
 8. Variable M is not declared! (line  23)
 9. Error in Shift function! (line  23)
 10. Missing ")" (line  23)
 11. Unknown identifier address (line  23)
 12. Missing "=" (line  23)
 13. Unknown error! (faktor) (line  23)
 14. Syntax error! (line  23)

von tobias hofer (Gast)


Lesenswert?

hallo

ich kenn mich zwar überhaupt nicht aus mit fast avr und basic
aber wenn du in zeile 15 die variable m brauchst, wäre es nicht schlecht 
diese auch zu deklarieren.

du deklarierst nähmlich nur

Dim n As Byte

tobias

von A. Arndt (Gast)


Lesenswert?

Hallo,

hier ist ein FASTAVR-User, mail mir mal bitte das Programm zu, ich werde 
sehen was, ob ich helfen kann..

Gruss
A. Arndt

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.