Forum: Mikrocontroller und Digitale Elektronik Motorola 68000 bzw. 68332: SCI Initialisierung (RS232/Uart)


von Matthias L. (matze88)


Lesenswert?

Hallo zusammen,

In der Uni arbeiten wir gerade an einem Projekt auf einem 68332 Board 
und müssen bzw. wollen etwas über eine RS232 ansteuern, dafür benötigen 
wir die SCI des Prozessors.
(EDIT: Haltet mich bitte nicht für blöd, aber es handelt sich vermutlich 
doch um den 68331. Jedoch habe ich grad mal die entsprechenden 
Abschnitte im Datenblatt verglichen und diese decken sich gut genug, 
dass dies hier keine Rolle spielen dürfte)

Leider kriegen wir es einfach nicht hin, sie anzusteuern. Egal was wir 
tun, das TDRE Bit in SCSR wird nicht 0.
Das Board hängt über BDM am Parallelport eines DOS Rechners und wir 
arbeiten mit dem "Cross68k" Debugger/Assembler. Auf dem Board befindet 
sich soweit ich weiß noch ein Rom mit uns unbekanntem 
Initialisierungscode. Die RS232 ist entsprechend hinter einem 
Pegelwandler herausgeführt, der Ruhepegel entspricht den Erwartungen, 
jedoch liegt das Problem ja bereits vorher im Statusregister. Hier 
einmal unser komplette Code:
1
  include gptregs.inc
2
  include simregs.inc
3
*  include qsmregs.inc
4
5
qsmcr  equ  $FFFFFC00
6
ddrqs  equ  $FFFFFC17
7
pqspar  equ  $FFFFFC16
8
sccr0  equ  $FFFFFC08
9
sccr1  equ  $FFFFFC0A
10
scsr  equ  $FFFFFC0C
11
scdr  equ  $FFFFFC0E
12
13
  org  $10000 ; VEKTOREN
14
  dc.l  $20000 ; Stackpointer
15
  dc.l  start  ; Programmstart
16
17
  org  $18000 ; VARIABLE
18
19
  org  $10400 ; PROGRAMM
20
21
start
22
23
*  move.w  #$0080,qsmcr    ; CLR Stop, freeze
24
*  move.w  #
25
  move.w   #27,sccr0    ; baudrate schreiben (9600)
26
  move.w  #%00001000,sccr1  ; SCI TX en
27
  move.b  #$10,d0
28
29
  bsr  send
30
31
*send  move.w  scsr,d1
32
33
*  bclr.l  #8,d1    ; tdre l”schen
34
*  move.w  d1,scsr    
35
*send  bclr  #8,scsr
36
*  move.w  scsr,d2
37
*  move.b  d0,scdr    ; linefeed ausgeben
38
*sendw  btst  #7,scsr    ; wartekrams=?!
39
*  beq  sendw
40
*  move.w  scsr,d1
41
42
wait  bra wait
43
*  bra  send
44
45
send
46
47
  btst  #8,scsr
48
  beq  send
49
  move.w  d0,scdr
50
  rts  
51
52
  end  start

Komischerweise sind die vorhandenen equs in der qsmregs.inc etwas 
verschoben im Vergleich zu denen im Datenblatt, aber wir haben natürlich 
beides ausprobiert. Wir haben auch ziemlich sicher das richtige 
Statusregister erwischt, da erwartete Bits gesetzt sind und z.B. nach 
aktivieren des Empfängers auch das Bit "Framing Error" gesetzt ist.

Der zur Zeit einkommentierte Code in der Send Routine kommt nicht übers 
beq send hinaus, da TDRE nicht 0 wird. der auskommentierte Krams ergibt 
in d1/d2 ebenfalls, das TDRE nicht 0 ist. "Sendet" man trotzdem, so 
passiert nichts.

Systemtakt sind 8,xx MHz. Um den Debugger als Fehlerquelle 
auszuschließen habe ich statt dem Einzelstepmodus auch mehrfach das 
Programm mit Run laufen lassen, man weiß ja nie, wie das sich sonst 
verhält.

Das löschen von Stop und Freeze in QSMCR bringt keine Veränderung.

Wir haben auch ein Codefragment von unserem Dozenten bekommen, dies 
entspricht nahezu der oben geposteten Version (wir haben aber auch mal 
nur das Fragment probiert, ging auch nicht).
Außerdem haben wir alles auf 2 verschiedenen Boards getestet: 
Fehlanzeige, gleiches Problem.

Kennt jemand einen Fallstrick, vielleicht eine ungünstige 
Initialisierung an anderer Stelle, die uns hier zum Problem wird?

Mit aktivieren des Senders entsteht übrigens auch der High-Pegel am 
entsprechenden TXD Pin (bzw. -10V an der DSUB auf richtigem Pin), von 
daher hört er also schonmal grundsätzlich auf uns.

Any Ideas? Wir sind alle total ratlos :-(

Dankeschön!

Matthias Larisch

von Olaf (Gast)


Lesenswert?

> In der Uni arbeiten wir gerade an einem Projekt auf
> einem 68332 Board und müssen

Nein, nein! Ihr duerft! Und zwar mit einem der schoensten 
Microcontroller auf dem Markt und das schon so lange. :-D

> Kennt jemand einen Fallstrick, vielleicht eine ungünstige
> Initialisierung an anderer Stelle, die uns hier zum Problem wird?

Tja, weisst du ich programmier die Teile zwar immer noch oefters, aber 
natuerlich in C und nicht in Assembler und euer Code ist saumaessig 
kommentiert und vermutlich aus verschiedenen Quellen zusammenkopiert.

Vielleicht solltest du mal nur das hinschreiben was du auch benutzt und 
von dir stammt! Ein Punkt der mir z.B sofort ins Auge springt:

pqspar  equ  $FFFFFC16

Warum definierst du dieses ueberaus interessante Register und benutzt es 
dann nie? Ich meine das wirft doch Fragen auf oder? :-D
Schau doch mal was da alles drin steht....

Olaf

von Matthias L. (matze88)


Lesenswert?

Hi!

Erstmal danke für die Antwort.

Warum findest du den Code schlecht kommentiert? Er besteht doch nur aus 
einigen Zeilen.

Alles auskommentierte dient dazu zu zeigen, was wir bereits probiert 
haben.

Das PQSPAR Register definiert Portfunktionen. Das ist für den SCI TX 
aber nicht notwendig, sobald man den einschaltet ists automatisch SCI TX 
der Pin dazu.

Nochmal den Code um alles auskommentierte gekürzt; aber meiner Meinung 
nach ist das wenig sinnvoll:
1
qsmcr  equ  $FFFFFC00   ; QSM control register
2
ddrqs  equ  $FFFFFC17   ; data direction für qsm pins
3
pqspar  equ  $FFFFFC16  ; portfunktionen qsm pins
4
sccr0  equ  $FFFFFC08   ; CR 0 -> baudrate
5
sccr1  equ  $FFFFFC0A   ; CR 1 -> kontrollkrams
6
scsr  equ  $FFFFFC0C    ; statusregister
7
scdr  equ  $FFFFFC0E    ; datenregister
8
9
  org  $10000 ; Interruptvektortabelle
10
  dc.l  $20000 ; Stackpointer initialwert
11
  dc.l  start  ; Programmstart (ab hier gehts los)
12
13
  org  $18000 ; VARIABLE ; speicherbereich für variablen
14
15
  org  $10400 ; PROGRAMM
16
17
start
18
19
*  move.w  #$0080,qsmcr    ; CLR Stop, freeze
20
  move.w   #27,sccr0    ; baudrate schreiben (9600)
21
  move.w  #%00001000,sccr1  ; SCI TX ein
22
23
  move.b  #$10,d0       ; daten (Linefeed) zum senden
24
25
  bsr  send            ; senden
26
27
28
wait  bra wait         ; endlos warten
29
30
* Funktion zum Senden der Daten aus d0 übers SCI. Wartet vorher bis SCI bereit
31
32
send
33
34
  btst  #8,scsr           ; TDRE 1? dann läuft noch sendevorgang -> warten
35
  beq  send
36
  move.w  d0,scdr         ; neue daten ins senderegister
37
  rts  
38
39
  end  start

Bringt der Code so mehr? Nun sieht man nicht mehr, was ch sonst noch so 
getestet hab... Dies war sozusagen statt dem call zur send routine:
1
  move.w  scsr,d1
2
  bclr.l  #8,d1    ; tdre löschen (und status in d1 -> kann man sich angucken)
3
  move.w  d1,scsr   ; nach status schreiben 
4
  move.w  scsr,d2  ; status wieder nach d2 lesen zum im debugger anschaun
5
  move.b  d0,scdr    ; linefeed ausgeben
6
  sendw  btst  #7,scsr    ; #7 transmit complete: das sollte zumindest mal toggeln. diese 2 zeilen sind wohl eher noch nicht durchdacht da TC ja 1 ist wenn fertig und wir loopen wenns 1 ist... aber ist ja auch egal, waren ja auch auskommentiert
7
  beq  sendw
8
  move.w  scsr,d1  ; statusregister nach d1 zum anschauen
9
loop  bra loop

Im Übrigen hier mal ein Link zum Datenblatt, falls das jemand anschauen 
möchte:
http://www.datasheetcatalog.com/datasheets_pdf/M/C/6/8/MC68331CFV16.shtml

Wir halten uns an die unter 6-31 beschriebene Initialisierung, nur halt 
ohne Interrupts (fürs erste). Das geht aber nach der Beschreibung weiter 
am Anfang auch so.

von Nikos T. (nikos)


Lesenswert?

Hi, wie kommt ihr auf den Wert 27 für die Baudrate?

von Hermann H. (hehoe)


Lesenswert?

Guten Abend
Ich bin der zweite von o.g. "wir". Im Datenblatt ist angegeben, dass
.
Laut Aufschrift läuft unser Modell mit etwas mehr als 8MHz, sodass 27 
als Teiler eine Baudrate von ungefähr 9600 (mit 1% Fehler) erzeugen 
sollte. Außerdem wird in dem uns gegebenen Codefragment die 27 genutzt. 
Das Programm, aus dem der Schnipsel stammt, lief angeblich mal. Dieser 
Wert sollte also stimmen. Wir vermuten, wir haben nur irgendetwas - 
vermutlich ganz banales - vergessen (was in dem Fragment nicht erwähnt 
ist). Eine falsche Baudrate würde meinem Verständnis nach auch nicht 
erklären, dass das SCI nichtmal versucht, zu senden.

von UART (Gast)


Lesenswert?

Das hier ist fuer den 68302...

Vielleicht passts ja :-)
1
*  SIMPLE UART "ECHO" CODE 
2
3
* Register initialization values before execution:
4
*
5
* PC=00030300  SR=2700
6
* USP=00080000 *ISP=00004000 (Stack pointers not used)
7
*
8
* D1 = SCCE3 holding register
9
* D3 = count of characters received
10
* D4 = count of characters transmitted
11
* D5 = count of BSY conditions occuring (no receive buffers available)
12
* D6 = 1 or greater, if character(s) waiting to be transmitted, 0 otherwise
13
* A0 = current Rx BD pointer
14
* A1 = current "next TX byte" to send pointer
15
* A2 = current Tx BD pointer
16
* A3 = temp
17
18
* SCC3 Tx Buffer Descriptors initialization:
19
* 00700640  5000 0000 0003 0000
20
* 00700648  7000 0000 0003 0001  (wrap bit set)
21
22
* SCC3 Rx Buffer Descriptors initialization:
23
* 00700600  d000 0000 0003 0002
24
* 00700608  f000 0000 0003 0003  (wrap bit set)
25
26
BAR   EQU  $0F2
27
GIMR   EQU  $700812
28
IPR   EQU  $700814
29
IMR   EQU  $700816
30
ISR   EQU  $700818
31
PACNT   EQU  $70081e
32
SIMODE EQU  $7008b4
33
SCON3   EQU  $7008a2
34
SCM3   EQU  $7008a4
35
SCCE3   EQU  $7008a8
36
SCCM3   EQU  $7008aa
37
38
* SCC3 initialization code:
39
40
   ORG  $30300
41
42
   MOVE.W #$700,BAR          ; BAR = 0700
43
* Base Address = $700000, so ALL 68302 on-chip peripherals begin at
44
* address $700xxx.
45
46
   MOVE.W #$00A0,GIMR    ; GIMR = 00a0
47
   MOVE.W #$FFFF,IPR    ; clear IPR
48
   MOVE.L #$30500,$2a0    ; SCC3 vector initialization
49
50
   MOVE.W #$0300,PACNT    ; PACNT = 0300
51
* Causes the SCC3 TXD3 and RXD3 pins to be enabled.  TCLK3 and RCLK3
52
* pins are left as parallel I/O pins.
53
54
   MOVE.W #$0,SIMODE    ; SIMODE = 0000 (its reset value)
55
* SCC3 is set up for NMSI (i.e. modem) operation.  No multiplexed
56
* modes are used on the other SCCs.
57
58
   MOVE.W #$00d8,SCON3        ; SCON3 = 00d8 for ~9600 baud at 16.67 MHz
59
* Baud Rate generator is used for transmit and receive. Rate is 9556bps.
60
61
   MOVE.W #$171,SCM3    ; SCM3 = 0171
62
* No parity.  Normal UART operation.  8-bit characters.  2 Stop bits.
63
* The CD* and CTS* lines not used to enable reception and transmission,
64
* but do cause a status change in the SCC3 Event register.
65
66
   MOVE.L #$50000000,$700640  ; Set up Tx BD 0 Status and Count
67
   MOVE.L #$30000,$700644   ; Set up Tx BD 0 Buffer Address
68
   MOVE.L #$70000000,$700648  ; Set up Tx BD 1 Status and Count
69
   MOVE.L #$30001,$70064c   ; Set up Tx BD 1 Buffer Address
70
* Set up 2 Tx BDs
71
72
   MOVE.L #$d0000000,$700600     ; Set up Rx BD 0 Status and Count
73
   MOVE.L #$30002,$700604        ; Set up Rx BD 0 Buffer Address
74
   MOVE.L #$f0000000,$700608     ; Set up Rx BD 1 Status and Count
75
   MOVE.L #$30003,$70060c        ; Set up Rx BD 1 Buffer Address
76
* Set up 2 Rx BDs
77
78
   MOVE.W #$0,$700680        ; clear RFCR/TFCR (Function code setup)
79
* Must be initialized to a value other than 7, or won't work with chip selects
80
81
   MOVE.W #$1,$700682        ; MRBLR = 0001  (one-byte receive buffers)
82
* This combined with the "I" bit set in the Rx BD, gives interrupts on each
83
* character received.  
84
85
   MOVE.W #$4,$70069c        ; MAX_IDL don't care since MRBLR = 1.
86
* Normally set to a small value, it closes a receive buffer if a certain
87
* number of idles are received without a new character.  Note that 0 is the
88
* maximum value.  In this case the buffer will always be closed after 1
89
* character, so MAX_IDL is a don't care.
90
91
   MOVE.W #$1,$7006A0        ; BRKCR = 1.  Only one break char. sent if
92
* STOP TRANSMIT command executed.  The STOP TRANSMIT command is not used in
93
* this code.
94
95
   MOVE.W #$0,$7006A2    ; PAREC = 0000
96
   MOVE.W #$0,$7006A4    ; FRMEC = 0000
97
   MOVE.W #$0,$7006A6    ; NOSEC = 0000
98
   MOVE.W #$0,$7006A8    ; BRKEC = 0000
99
* Initialize counters to zero
100
101
   MOVE.W #$0,$7006aa    ; UADDR1 = 0000
102
   MOVE.W #$0,$7006ac    ; UADDR2 = 0000
103
*  UART Address characters not used in normal operation.
104
105
   MOVE.W #$8000,$7006B0    ; CHARACTER1 = 8000
106
* No control characters are initialized to cause special interrupts.
107
* The flow-control facility (XON-XOFF) is not used.
108
109
   MOVE.B #$FF,SCCE3    ; clear SCCE3
110
   MOVE.B #$15,SCCM3    ; SCCM3 = 15
111
* Interrupts in SCCM3 are allowed only for BRK (break character
112
* received), BSY (no receive buffer available), and RX (buffer
113
* received).  Note that buffers are 1 character in this application.
114
115
   MOVE.W #$0100,IMR         ; IMR = 0100. Allow SCC3 interrupts only.
116
117
   MOVE.W #$17d,SCM3         ; SCM3 = 017d
118
* Set ENR and ENT bits in SCM3.
119
120
   CLR.L D0                 ; clear all used data registers
121
   CLR.L D1   
122
   CLR.L D3
123
   CLR.L D4
124
   CLR.L D5
125
   CLR.L D6
126
127
   MOVEA.L #$700600,A0         ; Load A0 as current Rx BD pointer
128
   MOVEA.L #$30002,A1         ; Load A1 as current "next Tx Byte" ptr
129
   MOVEA.L #$700640,A2         ; Load A2 as current Tx BD pointer
130
131
   MOVE.W #$2000,SR               ; Enable interrupts. Stay in spvr mode.
132
133
****************************************************************************
134
* Transmit Code
135
136
* OUTERLOOP:
137
OUTLOOP  CMPI.B #$0,D6           ; Something to send (is D6>=1?)
138
   BEQ.B  OUTLOOP          ; Stay in outerloop if 0
139
   SUBQ.B #$1,D6           ; Decrement send status by 1 (0=empty)
140
141
* INNERLOOP:
142
INLOOP   BTST.B #$0F,(A2)         ; Test Ready bit of Tx BD
143
   BNE.B INLOOP           ; Fall thru if 0, else wait in innerloop
144
145
* The following sets up and sends out the transmit buffer
146
   ADDQ.W #$1,D4           ; Increment number of chars transmitted
147
   MOVEA.L A2,A3           ; A3 will be used to find Tx data buffer
148
   ADDQ.W #$4,A3           ; Inc A3 to point to Tx data pointer
149
   MOVEA.L (A3),A3               ; A3 now points to Tx Data buffer
150
   MOVE.B (A1),(A3)               ; Move char from Rx Buffer to Tx Buffer
151
   ADDQ.W #2,A2           ; Increment A2 to point to byte count
152
   MOVE.W #$1,(A2)               ; Set Tx BD Byte count to 1
153
   SUBQ.W #2,A2           ; A2 now points to beginning of Tx BD
154
   BSET.B #$07,(A2)               ; Set Ready bit of Tx BD
155
* The Tx BD send data status is not checked since the only one is CTS* lost,
156
* which is not applicable, since CTS is ignored in this application.
157
158
* The following updates A2 to point to the next Tx BD
159
   BTST.B #$05,(A2)               ; test Wrap bit
160
   BNE.B REINIT2           ; If set, reinit A2 to 700640
161
   ADDA.W #$08,A2                ; else inc A2 by 8 to next Tx BD
162
   BRA.B CONT                 ; Jump to Continue on
163
REINIT2  MOVEA.L #$700640,A2         ; Reinitialize A2
164
165
* Determine what the next byte to "echo" will be and then go to OUTERLOOP
166
CONT   ADDQ.W #$1,A1           ; Increment A1 to next byte to send
167
   CMPA.L #$30004,A1         ; Is A1 = 30004?  ***
168
   BEQ.B NEWA1           ; If so, go to NEWA1
169
   BRA.B OUTLOOP           ; Jump back to outerloop and wait
170
NEWA1   SUBQ.W #$02,A1                ; Set A1 back to 30002  ***
171
   BRA.B OUTLOOP           ; Jump back to outerloop and wait
172
* The two lines with *** above are dependent on the number of Rx BDs used.
173
* If the number is increased, these values should be increased by the same
174
* amount.  These are the only lines dependent on the Rx BD or Tx BD setup.
175
176
******************************************************************************
177
* SCC3 interrupt routine:
178
179
   ORG $30500
180
181
   CLR.L D1             ; clear D1
182
   MOVE.B SCCE3,D1               ; Move SCCE3 status to D1
183
   MOVE.B #$15,SCCE3         ; Clear only BRK, BSY and RX in SCCE3.
184
185
   BTST.B #$2,D1           ; Is BSY set?
186
   BNE.B BUSY                 ; Jump to BUSY handler if set
187
188
* Test Break:
189
BRKTEST  BTST.B #$4,D1           ; Is BRK set?
190
   BNE.B BREAK           ; Jump to BREAK handler if set
191
192
* Test Receive:
193
RECTEST  BTST.B #$0,D1           ; Is RX set?
194
   BNE.B RECEIVE           ; Jump to RECEIVE handler if set
195
   JMP ALMDONE           ; Jump to About Done (impossible)
196
197
* Busy handler:
198
BUSY   ADDQ.B #1,D5           ; Inc Busy counter (no receive buffers)
199
   BSET.B #$F,(A0)               ; set Empty bit of current Rx BD
200
   JMP BRKTEST           ; Jump to test for BREAK
201
202
* Break handler:
203
BREAK   NOP                   ; This code ignores received breaks
204
* The UART BRKEC will record the number of breaks received
205
   JMP RECTEST           ; Jump to test for RECEIVE
206
207
* Receive handler:
208
RECEIVE  ADDQ.W #1,D3           ; Increment number of chars received
209
   ADDQ.B #1,D6           ; D6 inc by 1 (character ready to send)
210
211
   ADDQ.W #1,A0           ; Inc A0 to point to Rx BD byte status
212
   CMPI.B #$0,(A0)               ; Does status = 00?
213
   BNE.B BSTAT           ; Jump to Bad Status if not 00
214
INCPTR   SUBQ.W #1,A0     ; Dec A0 to point to beginning of Rx BD
215
   ANDI.W #$FF00,(A0)         ; Clear out Rx BD status
216
   BSET.B #$07,(A0)               ; Set Empty bit of Rx BD
217
   BTST.B #$05,(A0)               ; test Wrap bit
218
   BNE.B REINIT0           ; If set, reinit A0 to 700600
219
   ADDA.W #$08,A0                ; else inc A0 by 8 to next Rx BD
220
   BRA.B ALMDONE           ; Jump to Almost Done
221
REINIT0  MOVEA.L #$700600,A0         ; Reinitialize A0
222
   BRA.B ALMDONE           ; Jump to almost Done
223
224
* Bad Status:
225
BSTAT   NOP                   ; Bad status handler would go here
226
* Note that the UART FRMEC, NOSEC, and PAREC counters record bad status.
227
   BRA.B INCPTR           ; Jump back to Receive handler
228
229
* Almost Done:
230
ALMDONE  MOVE.W #$0100,ISR         ; Clear SCC3 bit in the ISR
231
   RTE                   ; end of interrupt handler
232
   END

von Matthias Larisch (Gast)


Lesenswert?

Das Problem ist inzwischen gelöst. Wodran lags? Wir wissen es nicht 
genau. Wir haben nochmal Schritt für Schritt alles durchgekaut nach 
Datenblatt und es ging. Eventuell waren die Boards vorher doch einfach 
alle Defekt? Hier der Code, falls das nochmal jemand braucht:
1
QSMCR  equ  $FFFC00
2
QIVR  equ  $FFFC04
3
PQSPAR  equ  $FFFC16
4
PORTQS  equ  $FFFC15
5
SCCR0  equ  $FFFC08
6
SCCR1  equ  $FFFC0A
7
SCSR  equ  $FFFC0C
8
SCDR  equ  $FFFC0F
9
10
out  equ  $20801
11
out1  equ  $20001
12
in  equ  $21801
13
* in bit 0: clock, bit1: daten
14
15
  org  $10000 ; VEKTOREN
16
  dc.l  $20000 ; Stackpointer
17
  dc.l  start  ; Programmstart
18
  org  $10100
19
  dc.l  qspi_int
20
21
  org  $18000 ; VARIABLE
22
23
24
  org  $10400 ; PROGRAMM
25
start
26
  moveq.l #0,d0
27
  moveq.l #0,d1
28
  moveq.l #0,d2
29
  moveq.l #0,d3
30
  moveq.l #0,d4
31
  moveq.l #0,d5
32
  moveq.l #0,d6
33
  moveq.l #0,d7
34
*  move.w  #%0000000010000001,QSMCR  ; IARB = 1, USER ACCESS
35
*  move.w   #%0000011101000000,QIVR    ; QSPI: PRIO 7, IV 64
36
*  move.b  #$80,PORTQS      ; TXD = 1 (ruhepegel)
37
*  move.w  #%1000000010000000,PQSPAR  ; TXD (aber das geht automatisch) und Ausgang
38
  move.w  #27,SCCR0      ; 9600 bps
39
  move.w  #%0000000000001000,SCCR1  ; TX EN
40
* ascii zeichen ab 0x20 senden, alle 16 Zeichen ein Zeilenumbruch
41
  move.b  #$20,d1
42
l  move.b  d1,d0
43
  bsr  trser
44
  addq  #1,d1
45
  move.b  d1,d2
46
  andi.b  #$0F,d2
47
  bne nnl
48
  move.b  #10,d0
49
  bsr  trser
50
w  add.l  #10000,d0
51
  bvc  w
52
nnl  cmp  #$FF,d1
53
  bne  l
54
  
55
loop  bra loop
56
57
trser  btst  #8,SCSR
58
  beq trser
59
  move.b  d0,SCDR
60
  rts
61
62
qspi_int ; interrupt falls den jemand braucht, ist aber aus hier
63
       rte

Danke übrigens für deinen Code im Post davor, konnten wir allerdings 
leider nicht einbringen... (ist doch ganz schön anders)

Matze

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.