Ich habe ein Programm für ein 8-Kanal-Lauflicht für den ATtiny13. Leider Geht mein Assembler-Code nicht: ----- $regfile = "attiny13.dat" $crystal = 1200000 $hwstack = 16 $swstack = 5 $framesize = 16 Macro Leds_off Ddrb = &B00000000 Portb = &B00000000 End Macro Macro Led1 Ddrb = &B00010001 Portb = &B00000001 End Macro Macro Led2 Ddrb = &B00010001 Portb = &B00010000 End Macro Macro Led3 Ddrb = &B00010010 Portb = &B00000010 End Macro Macro Led4 Ddrb = &B00010010 Portb = &B00010000 End Macro Macro Led5 Ddrb = &B00010100 Portb = &B00000100 End Macro Macro Led6 Ddrb = &B00010100 Portb = &B00010000 End Macro Macro Led7 Ddrb = &B00011000 Portb = &B00001000 End Macro Macro Led8 Ddrb = &B00011000 Portb = &B00010000 End Macro Do Led1 : Waitms 100 Led2 : Waitms 100 Led3 : Waitms 100 Led4 : Waitms 100 Led5 : Waitms 100 Led6 : Waitms 100 Led7 : Waitms 100 Led8 : Waitms 100 Loop End ----- Immer wenn ich ihn in AVR-Studio kompiliere kommen diese 2 Errors: error: $regfile: Unknown instruction or macro error: syntax error, unexpected '=' Was ist falsch an meinem Programm?
Jannik schrieb: > Ich habe ein Programm für ein 8-Kanal-Lauflicht für den ATtiny13. Leider > Geht mein Assembler-Code nicht: Das wundert mich nicht. Das ist kein ASssembler COde sondern BASCOM
wenn man die Pins als Ausgang benutzt muss man auch nicht mittels DDR ständig die Datenrichtung (Ein/Ausgang) wechseln, das macht man einmalig am Anfang und danach nicht mehr. Schau dir das mal an https://www.mikrocontroller.net/articles/AVR-Tutorial:_IO-Grundlagen#Assembler-Sourcecode
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.