XC912BC32CFU8 Motorola Semiconductor Products, XC912BC32CFU8 Datasheet - Page 225

no-image

XC912BC32CFU8

Manufacturer Part Number
XC912BC32CFU8
Description
M68HC12B Family Data Sheet
Manufacturer
Motorola Semiconductor Products
Datasheet
; ----------------------------------------------------------------------
;
; ----------------------------------------------------------------------
TRANS: BRCLR
; ----------------------------------------------------------------------
;
; ----------------------------------------------------------------------
DATA:
EOT:
14.6 Synchronous Character Transmission using the SPI
14.6.1 Equipment
14.6.2 Code Listing
INCLUDE 'EQUATES.ASM'
; User Variables
; Bit Equates
; ----------------------------------------------------------------------
;
; ----------------------------------------------------------------------
;
MAIN:
FINISH:
M68HC12B Family — Rev. 8.0
MOTOROLA
TABLE : DATA TO BE TRANSMITTED
MOVB
CPX
BNE
RTS
DC.B
DC.B
DC.B
DC.B
DC.B
END
ORG
BSR
BSR
BRA
TRANSMIT SUBROUTINE
NOTE:
MAIN PROGRAM
SC1SR1,#$80, TRANS ; Wait for TDRE flag
1,X+,SC1DRL
#EOT
TRANS
'Motorola HC12 Banner - June, 1999'
$0D,$0A
'Scottsdale, Arizona'
$0D,$0A
$04
$7000
INIT
TRANSMIT
FINIS
This program is intended to communicate with the HC11 on the UDLP1 board. It
utilizes the SPI to transmit synchronously characters in a string to be displayed on
the LCD display. The program must configure the SPI as a master, and
non-interrupt driven. The slave peripheral is chip-selected with the SS line at low
voltage level. Between 8 bit transfers the SS line is held high. Also the clock idles
low and takes data on the rising clock edges. The serial clock is set not to exceed
100 kHz baud rate.
For this exercise, use the M68HC912B32EVB emulation board.
A comment line is deliminted by a semi-colon. If there is no code before comment,
an “;” must be placed in the first column to avoid assembly errors.
;Equates for all registers
; Transmit character, increment X pointer
; Detect if last character has been transmitted
; If last char. not equal to "eot", Branch to TRANS
; else Transmission complete, Return from Subroutine
; Return (cr) ,Line Feed (LF)
; Return (cr) ,Line Feed (LF)
; Byte used to test end of data = EOT
; End of program
; 16K On-Board RAM, User code data area,
; start main program at $7000
; Subroutine to initialize SPI registers
; Subroutine to start transmission
; Finished transmitting all DATA
Serial Interface
Synchronous Character Transmission using the SPI
Serial Interface
Data Sheet
225

Related parts for XC912BC32CFU8