;Sending "YES" to Hyperterminal via Serial COM1 (SCI1) on Dragon12+ board ;Serial COM1 (SCI1) is the RS232 next to the power connection, and COM0(SCI0)is next LCD. ;You need two x86 PCs for this program ;PC#1 for CodeWarrior/Serial Monitor uses COM0 to communicate(download/run) with Dragon12 board,and ;PC#2 for HyperTerminal to display data via COM1 ;Modfied from Example 10-3 and 10-5 in HCS12 book by Mazidi & Causey ;This program must be downloaded into Dragon12 via COM0 (SCI0) using HCS12 Serial Monitor ;Use the usual steps in CodeWarior. a) Make (F7) b) Set SW7 =00 (LOAD) position, ;(c)use Debug (F5) to download. ;After it is downloaded, d) connect the 2nd x86 PC serial port to COM1 of Dragon12+ board ;bring up e)HyperTerminal (or Tera Term in Windows Vista and Windows 7) on the 2nd x86 PC, ;and f)press F5 in Debug step C to start running this program via Serial Monitor. ;Serial Monitor uses COM0 to download (LOAD,SW7=00) and works at 48 MHz ;We use COM0(SCI0) to download and run using Serial Monitor on the main x86 PC ;and use COM1(SCI1)to connect to the 2nd x86 PC to display data on HyperTerminal at the same time. ;The program sends "YES" to HyperTerminal of the 2nd x86 PC via COM1(SCI1) ABSENTRY Entry ; for absolute assembly: mark this as application entry point ; Include derivative-specific definitions INCLUDE 'mc9s12dp256.inc' ;CPU used by Dragon12+ board ;code section ORG $4000 ;Flash ROM address for Dragon12+ Entry: LDS #$4000 ;Stack ;Serial Monitor used for LOAD works at 48MHz ;We use Serial Monitor to download and execute the program via COM0 LDAA #$0 STAA SCI1BDH LDAA #156 ;For 9600 on Serial COM1 STAA SCI1BDL ;48MHz/2=24MHz, 24MHz/16=1.5MHz and 1.5MHz/9600=156 LDAA #0 STAA SCI1CR1 LDAA #$0C STAA SCI1CR2 OVER LDAA #'Y' JSR TRANS1 LDAA #'E' JSR TRANS1 LDAA #'S' JSR TRANS1 LDAA #' ' JSR TRANS1 BRA OVER ;---------- TRANS1 HERE: BRCLR SCI1SR1, mSCI0SR1_TDRE, HERE STAA SCI1DRL RTS ;------------------- ;************************************************************** ;* Interrupt Vectors * ;************************************************************** ORG $FFFE DC.W Entry ;Reset Vector. CPU wakes here and it is sent to start of the code at $4000