Home

User Manual

image

Contents

1. 19 Additional HC08 Development Tools 19 S Flash Loader FLOS icin eee re mentale here 20 e x ed AIR 20 Serial Communication 20 FLOS Commands TAN 21 Autostart Function 21 08 Welcome Kit Startup Behaviour Redirected Interrupt Vectors 9 Memory Ses niet ir a ate ee ta eek ieee tex User Manual 1 Overview The 08 Welcome Kit provides you with a small microcontroller board that helps to evaluate the Motorola MC68HC908GP32 It is a cost effective off the shelf solution which provides a stable hardware platform for starting an 8 application development The competitive price and the compact size of the evaluation board make it ideal also for low to mid volume series applications A comprehensive range of development tools debuggers assem blers C compilers are available to help making software development for the 08 an easy process Technical Data Motorola MC68HC908GP32 8 bit Microcontroller QFP44 package with up to 33 I O Pins 9 8304 MHz Oscillator removable socketed Bus Clock up to 8 MHz alternatively PLL based clock generation with 32 kHz Crystal 32 KB Flash Memory 512 Byte RAM SPI synch
2. 08 Welcome Kit User Manual June 30 2003 8 Welcome Kit Copyright C 2000 2003 by MCT Elektronikladen GbR Hohe Str 9 13 D 04107 Leipzig Telefon 49 0 341 2118354 Fax 49 0 341 2118355 Email mct elektronikladen de Web http www elektronikladen de mct This manual and the product described herein were designed carefully by the manufacturer We have made every effort to avoid mistakes but we cannot guarantee that it is 100 free of errors The manufacturer s entire liability and your exclusive remedy shall be at the manufacturer s option return of the price paid or repair or replacement of the product The manufacturer disclaims all other warranties either expressed or implied including but not limited to implied warranties of merchantability and fitness for a particular purpose with respect to the product including accompanying written material hardware and firmware In no event shall the manufacturer or its supplier be liable for any damages whatsoever including without limitation damages for loss of business profits business interruption loss of business information or other pecuniary loss arising out of the use of or inability to use the product even if the manufacturer has been advised of the possibility of such damages The product is not designed intended or authorized for use in applications in which the failure of the product could create a situation where personal injury or death may
3. together with the circuitry in the controller form a Pierce Oscillator which is generating a 32768 Hz clock This clock is the input signal for the PLL which produces the internal bus clock up to 8 MHz The parts C3 and C4 form a filter combination for the PLL In order to activate the PLL mode the canned oscillator IC3 must be removed and solder bridge BR4 must be closed The 08 Welcome Kit is shipped with the High Speed Flash Loader FLOS residing in Flash memory FLO8 uses the PLL to generate a bus clock of 7 3728 MHz To utilize the PLL some initialization steps are required Please refer to the HC908GP32 data book for a comprehensive discussion of the PLL functions For your convenience a setup example is provided in the Application Hints section of this manual Monitor Mode Interface For the purpose of Flash programming and software debugging the HC908GP32 makes use of a special operating mode named Monitor Mode The difference between the Monitor Mode and the normal User Mode is that firmware in the GP32 s internal ROM is executed instead of the user s program At first this firmware examines a set of I O pins which are used to select some operating parameters Finally this firmware establishes an asynchronous serial interface function on the port pin PTAO This interface works bidirectionally half duplex and corresponds to the usual RS232 conventions The baud rate is 9600 Baud Besides the appropriate c
4. cover all kinds of knowledge and techniques required to design a microcontroller program Please refer to the data sheets of the silicon vendors and to the manuals of the software tools you use to find additional help Startup Code Every microcontroller program starts with a number of hardware initialization commands For an HC908GP32 application program only a small number of issues are important setting the Stack Pointer selecting the proper base clock for the SCI if used disabling or using the COP Watchdog timer The following assembly language sequence shows an example entry ldhx 00ff Program Entry Point txs Init Stack Pointer mov 01 CONFIG2 SCI uses Bus Clock mov 01 CONFIG1 Disable Watchdog PLL Initialization An application program can use the PLL to generate the bus clock In this case the program must take care to properly initialize the PLL module The following program listing shows an example of how to initial ize a system with bus clock rate of 7 3728 MHz as used by FLOB 18 User Manual PCTL EQU 36 PBWC EQU 537 PMSH EQU 38 PMSL EQU 39 PMRS EQU 3A PMDS EQU 3B BCS EQU 4 PLLON EQU 5 LOCK EQU 6 AUTO EQU 7 INITPLL BCLR BCS PCTL Select external Clock BCLR PLLON PCTL Turn PLL off MOV 02 PCTL 0 2 01 PMDS 1 03 PMSH 900 84 PMSL MOV 85 0 5 21 192 1 clear PLLF BSET AUTO PBWC Automatic band
5. mode connection The solder bridges 1 and 2 on the solder side of the PCB have to be set to position 1 2 this configuration the PC works as a host the HC08 Welcome Kit board represents the device side The reverse case happens if a serial LC display is to be operated at the user RS232 port In this configuration the HC08 Welcome Kit board is the host and the LCD module represents the device side The necessary RxD TxD crossing can be done externally or by setting the solder bridges BR1 BR2 to position 2 3 At the same time the serial LCD can be supplied with operating voltage by closing solder bridge BR3 Note this option is a deviation from the standard RS232 connec tor layout Serial alphanumeric LC displays are offered by several vendors We particularly recommend LC displays from Matrix Orbital see http www matrix orbital com Power Supply Voltage regulator IC4 supplies 5V to the board from a DC voltage of between 8 and 12V supplied to the power input connector X1 IC4 is rated for up to 1 ampere and thus should be more than adequate even with no special cooling measures taken The load current of the board is well less than 100mA 17 HCO08 Welcome 7 Application Hints In this section some details will be given on how to program the HC908GP32 in general and the HC08 Welcome Kit in particular Please be aware that even if this manual can provide some specific hints it is impossible to
6. occur Should you use the product for any such unintended or unauthorized application you shall indemnify and hold the manufacturer and its suppliers harmless against all claims even if such claim alleges that the manufacturer was negli gent regarding the design or implementation of the product Product features and prices may change without notice All trademarks are property of their respective holders User Manual Contents a cs 3 Technical Data ue de beoe Rea P ero 3 Package Contents conl eb EUR RI RAP ERAS REV CRUS 4 osha te hentia aS ete be wha aly 5 3 Parts Location Diagram 7 4 Jumpers Solder Bridges 9 Ju immpets e ae det uve roga 9 Solder Bridges 4 endete eee tae expe ut ede dus 9 DS nee 11 6 Circuit Description 14 Schematic Diagram 14 Controller Core and Input Output 14 Clock Generation ioo e MA en reg re e ey 15 Monitor Mode Interface 15 User 5232 24 eea is ete oben eb d opes tec end 17 Power Supply epe OE ERA ees 17 7 Application Hints 18 St rtup Code a Eus 18 PLI Initialization 248 eu EEN E Vr e wee ares 18 Additional Information on the Web
7. ected with RS232 transceiver IC2 Factory Default Setting 10 User Manual 5 Connectors Power Supply Connector 1 central pin outside Monitor Mode Connector X2 EB n c PC RxD ERES PC TxD gg GND ERE 2 User RS232 Connector X3 n c Rx ERES gg EMEN co GND ERE n c X3 11 8 Welcome Expansion Connector 4 VCC GND PTCO PTC2 6 TXD GND SS MOSI T1CHO T2CHO GND 8 lee VCC RST PTC1 PTC3 PTC5 n c RXD MISO SPSCK T1CH1 T2CH1 GND User Manual Expansion Connector X5 vec BA vcc GND 3 EN n C n c 7 EN Prae P5 ve PTA3 PTA2 7 PTE5 19 20 Pre 25 5 08 Welcome Kit 6 Circuit Description Schematic Diagram The schematic diagram of the HC08 Welcome Kit is available as a separate document to ensure optimum visibility of all details Controller Core and Input Output The Microcontroller HC908GP32 needs only a few external components Many peripheral functions such as SCI Analog Digital Converter and 32 KB of Flash Memory are integrated on chip The HC908GP32 is offered in several packages The HC08 We
8. heck the solder bridges factory default for BR1 and BR2 is position 1 2 BR3 is open 4 and BR5 are closed Connect the Controller Module via RS232 to a PC The connec tion between the HC08 Welcome Kit connector and the PC is simply made using the included flat ribbon cable Start a terminal program on the PC easy to use terminal program is OC Console which is available at no charge from our Website Select a communication speed of 115200 Baud Disable all hardware or software protocols Activate the handshaking the terminal must wait for the character before sending another S Record line Connect a Power supply of 8 to 12 VDC to X1 central pin carries 5V GND outside Now FLOS will start a High Speed Flash Loader software which was programmed into Flash before shipping If necessary erase the Flash memory using command X Start the download using command L Send the S Record file OC Condole command Transfer 8 Welcome Kit Now the program is being loaded into Flash During this process an increasing number of handshake characters becomes visible After reception of an S9 line the programm will be started To restart the program after reset either type or close the AUTO jumper JP2 Note the user program must start at address 8000 in this case We hope you will enjoy working with the HC08 Welcome Kit User Manual 3 Parts Location Diagram IC5 Component
9. lcome Kit uses the 44 pin QFP version of the 68HC908 This package has four more I O pins than the DIP40 version The operating voltage for the HC08 Welcome Kit is 5V though the MCU can operate down to 3V see data sheet for details The reset system of the 8 is different from other Motorola Microcontrollers HC11 HC12 For example the capacitor C6 on the reset pin of this circuit could never be used in an HC11 system The HC908GP32 has an integrated low voltage inhibit circuit so an external reset controller is not required As an optical indicator a LED is connected to port pin PTC2 A driver circuit is not required because this port pin has a drive capability of up to 25mA The I O pins of the microcontroller are accessible on the expansion connectors X4 and X5 When connecting any external components the requirements to activate the Monitor Mode should be considered see below 14 User Manual Clock Generation The oscillator IC3 generates a frequency of 9 8304 MHz This clock is delivered to the 1 input of the microcontroller The solder bridge BR4 must be open in this mode The external clock from 18 required for Monitor Mode operation programming debugging via 8 but can also be used for normal operation mode i e running a user program User Mode Alternatively the PLL module of the HC908GP32 can be used as the clock source For this purpose Q1 C1 C2 R1 and R2
10. lock 9 8304 MHZ a number of port 15 08 Welcome Kit pins must be connected to certain logic levels as summarized in the following table Monitor Mode Levels on Ports A and C The monitor mode interface circuit on the evaluation board produces these levels using five pull up or pull down resistors Apart from the above requirements it is further necessary to supply the IRQ pin of the microcontroller with a higher voltage in the range of approx 7 to 10V to enter Monitor Mode This voltage is generated by the charge pump of the RS232 transceiver IC2 and limited to 8 2V using the Zener diode D4 JP1 MON must be set in order to apply this higher voltage to IRQ The connection of the Monitor Mode interface to the PC is made via X2 A ribbon cable with a 10 pin female header connector at the device end and a 9 pin Sub D connector at the PC end can be used The pinout scheme of the cable is shown in the following table X2 USB08 PC Sub D9 Pin MONI RS232 Pin Pin configuration of the Monitor Mode cable 16 User Manual User RS232 Port In contrast to the serial Monitor Mode interface the user RS232 port incorporates separate send and receive lines The HC908GP32 has a SCI hardware module for asynchronous serial communication the related pin names being TXD send and RXD receive X3 is the user RS232 port connector For a connection to a PC the same kind of cable is used as for the monitor
11. no address is specified the program can be started manually with the G command or after reset by the autostart function In this case the program must start at address 8000 Autostart Function After reset the Flash Loader 08 detects if the AUTO jumper JP2 is set connecting the port pins PTC2 and PTC3 If this is the case FL08 immediately jumps to memory address 8000 This feature allows starting an application program without modifying the reset vector which resides in the protected Flash boot block 21 8 Welcome Kit Startup Behaviour After reset FL08 executes a number of initialization steps which can have effect on the application program CONFIGI 01 Watchdog disabled e CONFIG2 01 SCI uses bus clock PLL generates 7 3728 bus clock e SCI active using 115200 Baud polling mode stack from 0200 downward Redirected Interrupt Vectors The interrupt vectors of the HCOS are located at the top of the 64 KB address space i e within the write protected Flash Loader code To allow interrupt functions in an application program the Flash Loader redirects all interrupt vectors except the reset vector to addresses within internal RAM This scheme is similar to the operation of the HC11 in Special Bootstrap Mode The application program sets the required interrupt vector during runtime before global interrupt enable by placing a jump instruction into the RAM pseudo vecto
12. r Example to use the IRQ interrupt the application must perform the following steps lda JMP Opcode sta 5023 IRQ Pseudo Vector ldhx isrFunc Jump Address sthx 023B IRQ Pseudo Vector 4 1 For C programs the following code sequence is applicable install IRQ pseudo vector in RAM if running with FLO8 unsigned char 0x023a void 58 void 0x023b OxCC JMP opcode isrFunc 22 User Manual The following table summarizes all vector addresses original and redirected for the HC908GP32 08 Vector Address FFDC FFDE FFEO FFE2 FFE4 FFE6 FFE8 FFEA FFEC FFEE FFFO FFF2 FFF4 FFF6 FFF8 FFFA FFFC Redirected Interrupt Vector Address sw serre 6 000 23 08 Welcome Kit 9 Memory Map 0 0040 0 023 512 08 redirected interrupt vectors 0200 wozo 0 8000 OxEFFF 28672 Byte Flash Memory 28 KB free for user application OxF000 OXFDFF 3584 Byte Flash Memory 3 5 KB used by Flash Loader FLO8 OxFE00 OXFFDB Control Registers and Monitor ROM Code OxFFDC OxFFFF 36 Byte Interrupt Vector Table Flash Memory Map of the HC908GP32 with 08 For details about the Memory Map of the Microcontroller and information on addresses of Control Registers and Interrupt Vectors please see the Motorola Data Book MC68HC908GP32 Technical Data 24
13. ronous serial interface 4x 16 Bit Timer Input Capture Output Compare PWM 8 Channel 8 Bit A D Converter all I O Lines are available via header connectors on the board Monitor Mode Interface for In System Programming ISP Advanced features Remote Power Cycle and Remote Break make debugging much easier Serial Interface including RS232 driver to connect a PC or a serial LCD Indicator LED 5V On Board Voltage Regulator and connector for Wall Power Plug 08 Welcome Kit Reset push button Power On Reset Wire wrap area 6x12 compact size 100mm x 60mm approx 4 x 2 4 Package Contents Evaluation Board with HC908GP32 RS232 Cable Sub D9 9 8304 MHz canned oscillator integrated High Speed Flash Loader FL08 User manual this document schematic diagram EMIL os PS oc oc nik 000000 lt Doooococoo 2000000 e 08 Welcome Kit V2 0 User Manual 2 Quick Start Nobody likes to read big manuals For that reason we will summa rize the most important things in the following section If you need additional information please refer to the more detailed sections of this manual Here is how you can start Please check the board for any shipping damage Check the Jumpers the default position of JP1 MON and JP2 AUTO is open JP3 VENA and JP4 RRST must be in position 1 2 C
14. rrupt vectors are available redirected to internal RAM The drawback of using FLOS is the dedication of resources FLO8 occupies a part of the MCU s memory and the limitation of debugging capabilities full debugging features only avaliable in monitor mode Serial Communication FLO8 communicates over the RS232 interface SCI on with a rate of 115200 Baud Further settings are 8N1 no hardware or software handshake no protocol 20 User Manual FLO8 Commands After startup FLO8 sends a welcome message over the serial inter face and awaits one of the following user commands X Mass Erase Erases the whole Flash memory the protected FLO8 code remains unchanged G Go Starts the application program by jumping to address 8000 Load Loads a file in Motorola S Record format into the microcontroller s Flash memory Each S1 Record must not contain more than 32 data bytes If a certain Flash page is accessed for the first time during loading this Flash page 128 bytes will be erased in the first step Therefore it is not required to perform a mass erase command before loading The terminal program which sends the S Records must wait for the handshake character before transmitting the next line As soon as the download sequence is terminated by an 59 containing an address not equal to zero the application program will be started automatically by jumping to the given address If
15. side 8 Welcome Kit e e e e e Lo a Solder side User Manual 4 Jumpers and Solder Bridges To locate jumper positions please refer to the parts location diagram see above Jumpers MON Monitor Mode open User Mode user program FL08 Flash Loader closed Monitor Mode programming debugging via MONO JP2 AUTO Autostart open start Flash Loader FLOS closed after Reset FLO8 immediately branches to address 8000 to execute user program JP3 VENA Voltage Enable 1 2 standard control mode for IC4 2 3 reserved for LIN option JP4 RRST Remote Reset 1 2 enable Remote Reset via serial DTR line 2 3 disable Remote Reset Solder Bridges The following solder bridges are located at the solder side of the board BR2 RS232 TxD RxD Select 1 2 RS232 configured as Device for connection to a PC etc 2 3 RS232 configured as Host for connection to a serial LCD etc 08 Welcome Kit BR3 open closed BRA open closed BR5 open closed LCD Power Supply SERT VCC not available on RS232 port standard Sub D connector layout VCC available on RS232 port at Pin 9 of the Sub D connector OSC external Oscillator IC3 delivers clock required for Monitor Mode Clock generation by 32 crystal PLL remove IC3 in this case OSC reserved for LIN option Controller pin RxD is conn
16. width control BSET PLLON PCTL Turn PLL on W4LOCK BRCLR LOCK PBWC W4LOCK Wait for lock BSET BCS PCTL Select PLL Clock Additional Information on the Web Additional information about hard and software of the 08 Welcome Kit will be published on our Website as it becomes available http www elektronikladen de en kit08 html Additional HC08 Development Tools Motorola provides free development tools for the 8 microcon trollers assembler programmer debugger etc Please check the following Web links http www motorola com mcu http www pemicro com ics08 19 08 Welcome Kit 8 Flash Loader FLO8 Overview The Flash Loader FLO8 was implemented to simplify the download of application programs in S19 format The HC908GP32 provides a special mode for download and debugging called monitor mode Unfor tunately using monitor mode requires a number of prerequisites e g the presence of an external oscillator Using the Flash Loader FLOS has the following advantages no mode change required to switch between monitor and user mode no need to change jumpers or clock source the same RS232 interface can be used for download and normal program operation fast download using 115200 Baud if AUTO jumper is set the user program will be invoked automatically after reset easy system initialisation 7 3728 MHz bus clock generated by the PLL from a 32 kHz clock crystal all inte

Download Pdf Manuals

image

Related Search

Related Contents

RECUEIL - Ethias  American Standard 4175503F15.075 Installation Guide  tica final - Manual Normativo Académico  LOEWE Xelos 37 SL DR+    コンポジット―Y/Cトランスコーダ FC−10/KR−10 取 扱 説  User manual 8002 RD  

Copyright © All rights reserved.
Failed to retrieve file