;Sending "YES" to Terminal via Serial COM1 (SCI1) on Dragon12+ board ;with D-Bug12 Program installed. This code is for AsmIDE or MiniIDE Assemblers ;Serial COM0 (SCI0) is used by the D-Bug12 to communicate with the Dragon12 Trainer board ;You need two x86 PCs for this program ;PC#1 for AsmIDE or MiniIDE/D-Bug12 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 D-Bug12 ;Use the usual steps in in D-Bug12 to download. ;After it is downloaded, connect the 2nd x86 PC serial port to COM1 of Dragon12+ board ;bring up HyperTerminal (or Tera Term in Windows Vista and Windows 7) on the 2nd x86 PC, ;and >G 2000 to run this program via D-Bug12. ;This program sends "YES" to HyperTerminal of the 2nd x86 PC via COM1(SCI1) ;on the older Dragon12 with D-Bug12 you have 2nd serial port with RSR232 connector. So you connect it to the 2nd x86 PC and run it. ;On the new Dragon12-USB board the 2nd serial port(SCI1) is available in TTL only. ;therefore, you need to purchase a RTA (RS232-to-TTL adaptor) or UTA(USB-to-TTL adaptor) from Dragon board site. ;The RTA and UTA adaptors are available under the accessoies. http://www.evbplus.com/wytec_shopping/accessories.htm #include "C:\Reg9s12.H" ;code section ORG $2000 LDS #$2000 ;Stack ;D-Bug12 works at 48MHz LDAA #$0 STAA SC1BDH LDAA #156 ;48MHz/2=24Mhz, 24Mhz/16= 1.5MHz, 1.5MHz/9600=156 STAA SC1BDL ;Notice the value for Baud Rate LDAA #0 STAA SC1CR1 LDAA #$0C STAA SC1CR2 OVER LDAA #'Y' JSR TRANS LDAA #'E' JSR TRANS LDAA #'S' JSR TRANS LDAA #' ' JSR TRANS BRA OVER ;---------- TRANS HERE: BRCLR SC1SR1, $80, HERE STAA SC1DRL RTS