hi:
this is for the xdp512, but is generic in nature so you could use it for the b32. it fills a 16 byte buffer with received data, and when the buffer is full it start over again. oddly enough, this weekend i'm writing a complete set of code for the b32 and if you are still having trouble i would give it to you.
;sci0 setup
movw #130,sci0bd ;20000000/ (16*130)=9615
movb #0,sci0cr1 ;no loop, enabled in wait,internal tx/rx for loop,1 start 1stop 8bits,idle after no parity
movb #%00101100,sci0cr2 ;int on receive buffer full,tx+rx on,no wakeup, no break
;interrupt handler
svc_sci0 ldx #sci0_in_buffer
ldab sci0_in_ptr
ldaa sci0sr1 ;need to read to clear the interrupt
ldaa sci0drl ;fetch data and finish clearing the interrupt bit
staa b,x ;save off the data
cmpb #15 ;test for end of receive array
bhs sci0_buff_full
inc sci0_in_ptr
rti
sci0_buff_full clr sci0_in_ptr
rti
regards,
ed
Message Edited by eeetee on 04-13-200604:34 PM
Message Edited by eeetee on 04-13-200604:58 PM