;Sending "YES" to Hyperterminal (Tera Terminal) via Serial COM0 (SCI0) on Dragon12+ board ;Serial COM0 (SCI0) is the RS232 next to the LCD. ;Serial COM0 (SCI0) is used by the Serial Monitor to communicate (downLOAD and RUN) with the Trainer board ;Modfied from Example 10-3 in HCS12 book by Mazidi & Causey ;This program must be downloaded into Dragon12 via COM0 using HCS12 Serial Monitor ;Use the usual steps in CodeWarrior. a) Make (F7) b) Set SW7 =00 (LOAD) position, c)use Debug (F5) to download. ;After it is downloaded, d)close the Debugger Windows of CodeWarrior from step C, and e) set SW7=10 (RUN) position ;(f) bring up HyperTerminal (or Tera Term in Windows Vista and Windows 7), ;and g) press RESET on the Dragon12 board and it will run this program. ;(h) to download another program, close the HyperTerminal and set SW7=00 for LOAD. ;Serial Monitor uses COM0 to download (LOAD,SW7=00) and works at 48 MHz ;The RUN mode (SW7=10) of Dragon12+ works at 8 MHz. ;We use COM0 to download using Serial Monitor ;and then switch to RUN to send data to HyperTerminal using the same COM0 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 ;The RUN mode (SW7=10) of Dragon12+ works at 8MHz. ;Serial Monitor used for LOAD works at 48MHz LDAA #$0 STAA SCI0BDH LDAA #26 STAA SCI0BDL ;8MHz/2=4MHz, 4MHz/16=250,000 and 250,000/9600=26 LDAA #0 STAA SCI0CR1 LDAA #$0C STAA SCI0CR2 OVER LDAA #'Y' JSR TRANS LDAA #'E' JSR TRANS LDAA #'S' JSR TRANS LDAA #' ' JSR TRANS BRA OVER ;---------- TRANS HERE: BRCLR SCI0SR1, mSCI0SR1_TDRE, HERE STAA SCI0DRL RTS ;------------------- ;************************************************************** ;* Interrupt Vectors * ;************************************************************** ORG $FFFE DC.W Entry ;Reset Vector. CPU wakes here and it is sent to start of the code at $4000