AN2183 Freescale Semiconductor / Motorola, AN2183 Datasheet - Page 36

no-image

AN2183

Manufacturer Part Number
AN2183
Description
Using FLASH as EEPROM on the MC68HC908GP32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
PrintString1:
PrintString:
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
PutChar:
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
36
PrintString Subroutine
This subroutine will output the null teminated string pointed to by H:X to the SCI.
Calling convention:
Returns:
Changes:
PutChar Subroutine
This subroutine will output the character passed in ACC to the SCI.
C function prototype:
Calling convention:
Returns:
Changes:
GetChar Subroutine
This subroutine will wait forever for a character to be received by the SCI and then
returns with that character in ACC.
is the primary loop where the COP counter is cleared.
C function prototype:
Calling convention:
ldhx
jsr
brclr
mov
tst
bne
rts
void PutChar (char data);
lda
jsr
brclr
sta
rts
char GetChar (void);
jsr
#string
PrintString
nothing
H:X
SCTE,scs1,PrintString1
x+,scdr
,x
PrintString1
data
PutChar
nothing
nothing
SCTE,scs1,PutChar
scdr
GetChar
=====================================================================
=====================================================================
Freescale Semiconductor, Inc.
=================================================================
For More Information On This Product,
Go to: www.freescale.com
No error checking is performed.
; point to start of string
; go output it
; wait until SCI transmitter is empty
; output character to the SCI and advance pointer
; test string character
; loop back if not null
; else, return
; get character
; go output it
; wait until SCI transmitter is empty
; output character to the SCI
; return
; get a character from the SCI
Note that this
MOTOROLA
AN2183

Related parts for AN2183