s908ey16g2vfar Freescale Semiconductor, Inc, s908ey16g2vfar Datasheet - Page 254

no-image

s908ey16g2vfar

Manufacturer Part Number
s908ey16g2vfar
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Development Support
GetByte:
19.4.2.2 PutByte
PutByte is a routine that receives a byte on the general-purpose I/O PTA0. The sent value must be loaded
into the accumulator (A) before calling this routine. This routine is also used in the monitor mode.
Therefore, it uses the same non-return-to-zero (NRZ) communication protocol. The communication baud
rates are the same as those described in GetByte.
To use this routine, some hardware setup is required. The general-purpose I/O PTA0 must be pulled up
and configured as an input and the PTA0 data bit must be initialized to 0.
Interrupts are not masked and the COP is not serviced in the PutByte routine. User software should
ensure that interrupts are blocked during character transmission.
Entry Condition
A — Contains data sent from PTA0
PTA0 — This pin must be configured as an input and pulled up in hardware and the PTA0 data bit must
be initialized to 0.
Exit Condition
A and X are restored with entry values.
Example 19-2
PutByte:
19.4.2.3 Verify
When using the Verify routine, the user must select one of the function options summarized in
Table
254
19-11. See
equ
bclr 0,DDRA
jsr
bcc
equ
bclr 0,DDRA
bclr 0,PTA
lda
jsr
shows how to send a byte ($55) serially on PTA0.
After GetByte is called, the program will remain in this routine until a START
bit (0) is detected and a complete character is received.
Verify Routine Options
$1000
GetByte
FrameError
$100C
#$55
PutByte
MC68HC908EY16A • MC68HC908EY8A Data Sheet, Rev. 1
Example 19-1. Receiving a Byte Serially
Example 19-2. Sending a Byte Serially
;EY16A/8A GetByte jump address
;Configure port A bit 0 as an input
;Call GetByte routine
;If C bit is clear, framing error
; occurred. Take a proper action
;EY16A/8A PutByte jump address
;Configure port A bit 0 as an input
;Initialize data bit to zero PTA0=0
;Load sent data $55 to A
;Call PutByte routine
for details.
NOTE
Freescale Semiconductor

Related parts for s908ey16g2vfar