English
Language : 

MSC1202Y3RHHTG4 Datasheet, PDF (36/92 Pages) Texas Instruments – Precision Analog-to-Digital Converter and Current-Output Digital-to-Analog Converter
MSC1200
MSC1201
MSC1202
SBAS317E − APRIL 2004 − REVISED MAY 2006
Stack
Another use of the Scratchpad area is for the
programmer’s stack. This area is selected using the Stack
Pointer (SP, SFR 81h). Whenever a call or interrupt is
invoked, the return address is placed on the Stack. It also
is available to the programmer for variables, etc., since the
Stack can be moved and there is no fixed location within
the RAM designated as Stack. The Stack Pointer defaults
to 07h on reset and the user can then move it as needed.
The SP will point to the last used value. Therefore, the next
value placed on the Stack is put at SP + 1. Each PUSH or
CALL increments the SP by the appropriate value and
each POP or RET decrements it.
www.ti.com
Program Memory
After reset, the CPU begins execution from Program
Memory location 0000h. If enabled, the Boot ROM will
appear from address F800h to FFFFh.
Boot ROM
There is a 1kB Boot ROM that controls operation during
serial programming. Additionally, the Boot ROM routines
shown in Table 5 can be accessed during the user mode,
if it is enabled. When enabled, the Boot ROM routines will
be located at memory addresses F800h−FBFFh during
user mode.
Table 5. MSC120x Boot ROM Routines
HEX
ADDRESS
F802
F805
ROUTINE
sfr_rd
sfr_wr
C DECLARATIONS
char sfr_rd(void);
void sfr_wr(char d);
DESCRIPTION
Return SFR value pointed to by CADDR(1)
Write to SFR pointed to by CADDR(1)
FBD8
monitor_isr
void monitor_isr() interrupt 6;
Push registers and call cmd_parser
FBDA
cmd_parser
void cmd_parser(void);
See application note SBAA076, Programming the
MSC1210, available at www.ti.com.
FBDC
put_string
void put_string(char code *string);
Output string
FBDE
FBE0
page_erase
write_flash
char page_erase(int faddr, char fdata, char fdm);
Assembly only; DPTR = address, ACC = data
Erase flash page
Flash write(2)
FBE2
FBE4
write_flash_chk
write_flash_byte
char write_flash_chk(int faddr, char fdata, char fdm);
void write_flash_byte(int faddr, char fdata);
Write flash byte, verify
Write flash byte(2)
FBE6
faddr_data_read
char faddr_data_read(char faddr);
Read byte from Configuration Memory
FBE8
data_x_c_read
char data_x_c_read(int faddr, char fdm);
Read xdata or code byte
FBEA
tx_byte
void tx_byte(char);
Send byte to USART0
FBEC
tx_hex
void tx_hex(char);
send hex value to USART0
FBEE
putx
void putx(void);
send “x” to USART0 on R7 = 1
FBF0
rx_byte
char rx_byte(void);
Read byte from USART0
FBF2
rx_byte_echo
char rx_byte_echo(void);
Read and echo byte on USART0
FBF4
rx_hex_echo
char rx_hex_echo(void);
Read and echo hex on USART0
FBF6
rx_hex_dbl_echo
int_rx_hex_dbl_echo(void);
Read int as hex and echo: USART0
FBF8
FBFA
rx_hex_word_echo
autobaud
int_rx_hex_word_echo(void);
void autobaud(void);
Read int reversed as hex and echo: USART0
Set USART0 baud rate after CR(3) received
FBFC
putspace1
void putspace1(void);
Output 1 space to USART0
FBFE
putcr
void putcr(void);
Output CR, LF to USART0
(1) CADDR must be set prior to using these routines.
(2) MWS register (SFR 8Fh) defines Data Memory or Program Memory write.
(3) SFR registers CKCON and TCON must be initialized: CKCON = 0x10 and TCON = 0x00.
36