mc68hc908ey16a Freescale Semiconductor, Inc, mc68hc908ey16a Datasheet - Page 253

no-image

mc68hc908ey16a

Manufacturer Part Number
mc68hc908ey16a
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
19.4.2.1 GetByte
GetByte is a routine that receives a byte on the general-purpose I/O PTA0, and the received value is
returned to the calling routine in the accumulator (A). This routine is also used in monitor mode so that it
expects the same non-return-to-zero (NRZ) communication protocol and baud rates.
This routine detects a framing error when a STOP bit is not detected. If the carry (C) bit of the condition
control register (CCR) is cleared after returning from this routine, a framing error occurred during the data
receiving process. Therefore, the data in A is not reliable. The user software is responsible for handling
such errors.
Interrupts are not masked (the I bit is not set) and the COP is not serviced in the GetByte routine. User
software should ensure that interrupts are blocked during character reception.
The baud rate is defined by f
baud rate is f
2.4576 MHz/256 = 9600.
To use this routine, some hardware setup is required. The general-purpose I/O PTA0 must be pulled up.
For more information, refer to
Entry Condition
PTA0 must be configured as an input and pulled up in hardware.
Exit Condition
A — Contains data received from PTA0.
C bit — Usually the C bit is set, indicating proper reception of the STOP bit. However, if the C bit is clear,
a framing error occurred. Therefore, the received byte in A is not reliable.
receive a byte serially on PTA0.
Freescale Semiconductor
Routine’s Call)
(Including the
Subroutines
Stack Used
Variable
Called
RAM
Table 19-10. Summary of On-Chip FLASH Support Routines (Continued) (Continued)
op
(None)
N/A
6 bytes
divided by 256. When the internal operating frequency is 2.4576 MHz, the baud rate is
GetByte
MC68HC908EY16A • MC68HC908EY8A Data Sheet, Rev. 1
op
19.3 Monitor Module
divided by a constant value. In the case of the MC68HC908EY16A, the
(None)
N/A
6 bytes
PutByte
PutByte for
LADDR (2 bytes),
9 bytes for verify
13 bytes for
(MON).
send-out option
send-out option
DATA array (no
size limitation as
long as in the zero
page)
option
Verify
(None)
CPUSPD, LADDR
10 bytes
(2 bytes), DATA
array (maximum
32 bytes)
fProgram
Example 19-1
Routines Supported in ROM
(None)
8 bytes
CPUSPD
shows how to
fErase
253

Related parts for mc68hc908ey16a