CHAPTER 6 PERIPHERAL HARDWARE FUNCTION
185
Users Manual U10676EJ3V0UM
Example For serial output of the 16-bit data of BUFF1, 2 from bit 0 of port 3
CLR1 MBE
MOV XA, BUFF1
MOV BSB0, XA ; Sets BSB0, 1
MOV XA, BUFF2
MOV BSB2, XA ; Sets BSB2, 3
MOV L, #0
LOOP0: SKT BSB0, @L ; Tests specified bit of BSB
BR LOOP1
NOP ; Dummy (to adjust timing)
SET1 PORT3.0 ; Sets bit 0 of port 3
BR LOOP2
LOOP1: CLR1 PORT3.0 ; Clears bit 0 of port 3
NOP ; Dummy (to adjust timing)
NOP
LOOP2: INCS L ; L L + 1
BR LOOP0
RET