*********** Developing environment for Motorola 68HC11. ************** *********** ************** *********** By Wilfried Markenstein ************** *********** Zandkever 4 ************** *********** 7423 GL Deventer ************** *********** Netherlands ************** ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Program the Motorola 68HC11 without the need of programming EPROM'S,³ ³through the serial port of your PC. ³ ³ ³ ³Unpack this Selfextracting (DL68HC11.EXE) executable utility by ³ ³starting to execute it in your favorite directory ! ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Contents of DL68HC11.EXE: Files: (7 total) - README This file. - DLHC11.EXE DownLoad PC program for Motorola 68HC11. DLHC11.S19 DownLoad S-rec program for 8.0 or 4.9152 Mhz. - LED.C Source-code led-blink test-program. (pin PA3) LED.S19 DownLoadable S-rec. - CHAT.C Source-code chat test-program. CHAT.S19 DownLoadable S-rec. If you find my DownLoad-program usable please contribute my efforts by donating 10 dollars or more at my bank-account RABO 3 777 240 41 Netherlands or by sending me a cheque. Note: The .C programs are build with compiler: Micro Series 68HC11 C-Compiler V2.31B/MD2 (c) Copyright IAR Systems 1988 General Information: -------------------- The 68HC11 has a special bootstrap mode which distinguises from normal operating modes. Therefore pins MODA and MODB need to be connected to ground during power on (special-boot-reset) ! The bootloader program uses the SCI to read a 256 bytes program into on-chip RAM at locations $0000-$00FF. After the byte for address $00FF is received, control is automatically passed to that program (DLHC11.S19) at location $0000 (Your targetsystem 68HC11 may run at a 4.9152 Mhz or at a 8Mhz Crystal). This program (DLHC11.S19) first sets the baudrate to the appropriate baudrate (9600 for 8Mhz and 19.200 for 4.9152 Mhz) then switches the operationmode from bootstrap- to expanded and then it starts downloading a S-record-Program (LED.S19 or any selfmade S-record), loading its code at the corresponding S-recordformat addresses. After the last record (S9) is received, DLHC11.S19 will hangup itself waiting for you to reset the target-system with pins MODA and MODB connected to +5V. Then it starts running in normal operation mode with the interruptvectors at position $FFD6-$FFFC and accesing RAM and ROM. Usage Information: ------------------ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³DownLoad utility for Motorola 68HC11 (C) 1992, 1995 W.A.A. Markenstein³ ³68HC11 running in Special Bootstrap mode (MODA and MODB connected to Ground)³ ³ ³ ³Usage: DLHC11 /dDLHC11.S19 /aLED.S19 /x8.0 [/c1] [/b9600] [/?] ³ ³Where: /dFilename = downloadboot Filename (S Record of DLHC11.S19). ³ ³ /aFilename = application Filename (S Record). ³ ³ /x8.0 = X-tal frequency (target system) to determine baurate(s)³ ³ for downloading the BootFile and the UserFile. ³ ³ (8.0, or 4.9152) ³ ³ /c1 = Com port to be used. COM1 or COM2 (default = COM1) ³ ³ /b9600 = Baudrate Chatmode after loading ! ³ ³ (1200, 2400, 4800, 9600, 19200, 38400). ³ ³ /? = this help screen. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Usage Example: - DLHC11 /dDLHC11.S19 /aLED.S19 /x8.0 This way the DLHC11.EXE will first download program DLHC11.S19 and then LED.S19. After downloading, you have to RESET your TargetSytem so that the program LED.S19 will run. Measure pin PA3 with a Voltmeter or connect a led and a 1K resistor to it and see what happens ! The LED.S19 program will be loaded at $8200-$FFFF so you'll need RAM at that location by changing you ROM to RAM (see below). - DLHC11 /dDLHC11.S19 /aCHAT.S19 /x8.0 /b9600 This way the DLHC11.EXE will download program DLHC11.S19 and then CHAT.S19. Hereafter DLHC11.EXE will open a chat window and initializes the COM-port at 9600,N,8,1 Baud and after you reset your TargetSystem with MODA and MODB connected to +5V you can communicate with your TargetSystem by typing at your keyboard. By specifying the '/b9600' baudrate the program DLHC11.EXE will open a communication-window at this baudrate after the download-process. The CHAT.S19 program will be loaded at $8200-$FFFF so you'll need RAM at that location by changing you ROM to RAM (see below). Serial connection: ------------------ Connect your PC with your 68HC11 PCB for downloading programs. PC-Side 68HC11-Side 2 -TX---->----RX- 3 3 -RX----<----TX- 2 7 ----- GND ----- 7 Connect your PC-Serial port to the 68HC11 SCI-Serial port, using Max 232, 1488/89 or other similar line drivers. RAM and ROM: ------------ You can download your UserProgram into RAM addresses. (2000-7FFF) But if you do so, you cannot use interrupt service routines because they reside at $FFD6-$FFFF and you have no RAM at that location. You can easily change your ROM to RAM (8000-FFFF) by changing a few wires and test your programs without the need of programming EPROM'S, and the possibility to use interrupt routines into your programs. Do not forget to reset the 68HC11, with MODA and MODB connected to 5V after downloading the program, so that it runs in Expanded Multiplex Mode. In this Expanded Multiplex Mode the interruptvectors are at there original location. ($FFD6-$FFFF) (see Operating Modes versus MODA and MODB of the 68HC11-datasheet) If you want to keep the program in RAM after switching OFF the power, then try the following suggestion ! ÚÄÄÄÄÄÄÄ¿ D2 ³ ³ÄÄÄÄÄÄÄÄÄÄÂÄÄÄ´ÄÄÄÄÄ VCC ³ ³ ÄÁÄ ³ ³ D1  ³ ³ +³ ³ ³ ÍØÍ Litium battery 3V ³ R A M ³ -³ ³ ³ÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÂÄÄÄÄ ³ ³ ÄÁÄ ÀÄÄÄÄÄÄÄÙ D1 & D2 = BAT85 #################################################