Hallo zusammen... ich hab da mal ein Problem, habe folgendes ASM-Prog geschrieben und komm mit der Fehlermeldung nicht klar... über einen Tip wo der Fehler liegt würde ich mich freuen...
1 | .def Potiwert = r14 |
2 | .def DACWert = r15 |
3 | .def temp = r16 |
4 | .def buffer = r17 |
5 | ;Portbezeichnung |
6 | ;PortC |
7 | .equ Daten = 0 |
8 | .equ Takt = 1 |
9 | .equ DCDC = 2 |
10 | .equ Poti = 3 |
11 | ;PortD |
12 | .equ TDon = 0 |
13 | .equ SpSig = 1 |
14 | .equ AnfangsspannungPoti = 50 |
15 | .equ AnfangsspannungDCDC = 255 |
16 | .def SpannungPoti = r12 |
17 | |
18 | |
19 | .include "m8def.inc" |
20 | |
21 | .CSeg |
22 | |
23 | Haupt: |
24 | |
25 | ldi temp,High(Ramend) |
26 | out SPH,temp |
27 | ldi temp,low(Ramend) |
28 | out SPL,temp |
29 | rcall Init |
30 | |
31 | |
32 | Haupt1: |
33 | ldi SpannungPoti,255 |
34 | Haupt2: |
35 | |
36 | mov buffer,SpannungPoti |
37 | mov PotiWert,buffer |
38 | cbi PortC,Poti |
39 | rcall I2CDaten |
40 | sbi PortC,Poti |
41 | dec SpannungPoti |
42 | breq Haupt1 |
43 | rjmp Haupt2 |
44 | |
45 | ret |
Fehlermeldung: test.asm(171): error: Invalid register