Implementation Details
5-62
_iprtc
in
a0, 0x10
; read from PortC
ret
_iprtd
in
a0, 0x18
; read from PortD
ret
_iprte
in
a0, 0x20
; read from PortE
ret
_iprtf
in
a0, 0x28
; read from PortF
ret
_in_port_access
; table for table lookup
DATA
_iprta
DATA
_iprtb
DATA
_iprtc
DATA
_iprtd
DATA
_iprte
DATA
_iprtf
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
; called from C––
; void cport(char Port, int Control)
; Writes Control bits for the I/O port specified by the letter Port.
; Example:
; cport(’B’, 0xFF); //Configure all bits of Port B as output
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
_cport
mov
a0, *r7 – 4
; port address
mov
a0~, *r7 – 2
; data
add
a0, _cont_port_access – ’A’ ; find the location in the table
mov
a0, *a0
; get the value of the label in the table
jmp
*a0
; jump to the label from the table
_cprta
out
0x04, a0~
; write to PortA control
ret
_cprtb
out
0x0C, a0~
; write to PortB control
ret
_cprtc
out
0x14, a0~
; write to PortC control
ret
_cprtd
out
0x1C, a0~
; write to PortD control
ret
_cprte
out
0x24, a0~
; write to PortE control
ret
_cont_port_access
; table for table lookup
DATA
_cprta
DATA
_cprtb
DATA
_cprtc
DATA
_cprtd
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...