Home

PK-HC08QY4 User`s Manual

image

Contents

1. 2 Make sure the PK HCO8QY4 starter kit is connected to the PC and powered on PK HCO8QY4 is powered by the USB connection If you connected the PK HC08QYA board to the PC before installing the CodeWarrior user interface and the SofTec Microsystems Additional Components the PK HCO8QY4 USB driver may not have been correctly installed on your system Unplugging and replugging the USB cable is of no use since Windows has marked the device as disabled As a consequence CodeWarrior cannot communicate with the PK HC08QYA board To restore the USB driver provided both CodeWarrior and SofTec Microsystems Additional components have been installed perform the following steps under Windows XP Plug the PK HCO8QY4 board to the PC Open the Control Panel Start gt Settings gt Control Panel Open the System options Select the Hardware tab Click the Device Manager button The 08 Series Starter Kit device will be shown with an exclamation mark next to it Double click on this device Inthe General tab click the Reinstall Driver button Follow the on screen instructions Page 31 5 Troubleshooting 3 Make sure you are working with the correct hardware model To view change the hardware model in use choose inDART HC08 gt MCU Configuration from the CodeWarrior HC S 08 debugger s main menu 4 Ifthe inDART HC08 menu is not present in the CodeWarrior HC S 08 debugger
2. Enabled freescale 222222222232 S4 224242224 ROO 7 080 4 5 User 16 PK HC08QY4 Starter Kit for Freescale MC68HC908QY4 User s Manual Sarlec We want your feedback SofTec Microsystems is always on the look out for new ways to improve its Products and Services For this reason feedback comments suggestions or criticisms however small are always welcome SofTec Microsystems E mail general information info softecmicro com E mail marketing department marketing softecmicro com E mail technical support support softecmicro com Web http www softecmicro com Important SofTec Microsystems reserves the right to make improvements to the PK Series of Starter Kits their documentation and software routines without notice Information in this manual is intended to be accurate and reliable However SofTec Microsystems assumes no responsibility for its use nor for any infringements of rights of third parties which may result from its use SOFTEC MICROSYSTEMS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA PROFITS USE OF PRODUCTS OR INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF ADVISED OF THE POSSIBILITY THEREOF Trademarks Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc Metrowerks and CodeWarrior are trademarks or registered trade
3. The new value of the A D conversion will be displayed on the LEDs Congratulations You have successfully completed this tutorial You can continue to experiment with the CodeWarrior user interface and discover by yourself its potentialities For an in depth guide of all of the user interface features select Help CodeWarrior Help from the CodeWarrior HC S 08 IDE s main menu Additional Examples Additional examples can be found under the Program Files Metrowerks CodeWarrior CWO08X CodeWarrior Examples HCO8 SofTec Microsystems PK HC08QY4 directory Page 17 PK HC08QY4 User s Manual 3 Hardware Features Introduction PK HCO08QYA is an in circuit debugger it programs files into the MC68HC908QY4 microcontroller and offers debugging features like real time code execution stepping and breakpoints Its debugging features are achieved thanks to the microcontroller s integrated MONO8 monitor module Contrariwise to traditional in circuit emulation where the target application is executed and emulated inside the emulator PK HCO8QY4 uses the very same target microcontroller to carry on in circuit execution This means that all microcontroller s peripherals timers A D converters I O pins etc are not reconstructed or simulated by an external device but are the very same target microcontroller s peripherals Moreover the 080 4 debugging approach ensures that the target microcontroller s electrical characteris
4. application into the microcontroller FLASH memory Together with CodeWarrior 080 4 provides you with everything you need to write compile download in circuit emulate and debug user code Full speed program execution allows you to perform hardware and software testing in real time PK HCO8QY4 is connected to the host PC through a USB port A prototyping area allows you to wire your own small application Page 5 1 Overview PK HCO08QYA offers you the following benefits Real time code execution In circuit debugging In system programming and debugging through a MONO8 compatible interface Demo area with push buttons potentiometer and user LEDs Prototyping area Metrowerks CodeWarrior IDE the same user interface of all Freescale tools with editor assembler C compiler and debugger Note PK HC08QYA starter kit has been designed for evaluation purposes only Even though it has full feature debugging options its main limitations are target microcontroller is fixed soldered to the board target microcontroller runs only at 5 V data transfer rate PC to target and target to PC is slow This results in high programming times For serious debugging we suggest you to switch to the SofTec Microsystems inDART 08 Series of debugging programming tools What is the MONOS Interface The 08 integrated MONOS interface allows you to update the con
5. insert the SofTec Microsystems System Software CD ROM into your computer s CD ROM drive A startup window will automatically appear Choose Install Instrument Software from the main menu A list of Page 12 PK HC08QY4 User s Manual available software will appear Click on the 08 Series Additional Components option Follow the on screen instructions Note if you are installing the 080 4 additional components on Windows 2000 or Windows XP you must have logged in as Administrator Installing the Hardware The PK HC08QYA board is connected through a USB port to a host PC Connection steps are listed below in the recommended flow order 1 Install all the required system software as described in the previous section 2 Insert one end of the USB cable into a free USB port 3 Insert the other end of the USB cable into the USB connector on the 4 board The green POWER LED on the instrument should turn on Windows will automatically recognize the instrument and will load the appropriate USB driver Note both Windows 2000 and Windows XP may issue a warning the first time PK HCO08QYA is connected to the PC This warning is related to the fact that the USB driver used by is not digitally signed by Microsoft and Windows considers it to be potentially malfunctioning or dangerous for the system However you can safely ignore the warning since every kind of compat
6. session the target microcontrollers FLASH memory is automatically erased programmed with the user application and the trimming value if the trimming option is enabled is automatically calculated and programmed Halt Debugging Handling The Halt debugging command in the CodeWarrior IDE will not work unless the IRQ interrupt is properly handled In particular the following precautions must be taken in the application s source code 1 Global interrupts must be enabled use the cli instruction 2 The IRQEN bit in the CONFIG2 register must be set to 1 3 The IRQ interrupt vector must be handled Page 26 PK HC08QY4 User s Manual 4 The IRQ handling routine must include the following code Pu Waits for the IRO signal to go high swi Jumps to monitor code rti Returns from interrupt Breakpoints and Swi Instruction The HC08 s on chip debug module only handles one hardware breakpoint However you can force the program execution to stop at other specific locations by inserting the swi Assembly instruction on your source code Interrupt Execution during Steps When issuing stepping instructions and there are pending interrupts the debugger will not step inside the interrupt handling routine but the whole interrupt handling routine is executed An exception is when you single step on an Assembly instruction which branches to itself in this case interrupts which may occur are not handled Reading Periph
7. to the evaluation purposes of the PK HC08QYA starter kit and therefore to the slow data transfer rate from the PC to the target and vice versa the DataBlaze programming utility takes a long time to write to read from the whole microcontroller memory For serious debugging programming we suggest you to switch to the SofTec Microsystems inDART HC08 Series of debugging programming tools Page 29 4 Debugging Features Ey E gt m E 7 Project Select Blank Erase Read Program Very Code Help Project Properties Device Check Memory WETTE 6 7178 E EN mE or Driver EEOO 8B 89 95 04 87 EE 05 F6 AF 01 9E EF 06 8B SofTec MONOS 10 88 9E EF 05 88 81 FC C6 EE 4C 95 01 HC08 Programmer EE20 C6 EE A9 4C F7 CE EE AB 89 8A CE EE 20 1F 89 v 1 11 EE30 8B F6 87 02 4C 9E 06 03 EE 01 8 4C 20 EE40 03 7F AF 01 4B FB 9E 6B 05 F7 88 AF 04 SE 6B EESO 02 DD 9E 6B O1 D9 C6 EE AE 87 C6 EE AD 87 AD AO Device 60 97 4C E 03 AD 99 4C 9E 04 4 26 03 51 00 Motorola 70 18 AD 8D 87 SA AD 89 97 20 05 AD 84 F7 01 9E MCBEHCSOSQY4 EESO 6B 04 F7 6B 03 20 DS A7f 90 AS 02 26 04 45 00 BO 94 EE Auto EEAO CE EE AS FD 20 00 B3 00 oops Code Memory EEBO 00 OO OO 9A 10 1F 6E 49 1E 6E Device Range EECO 21 3C 6E 60 3F OF 3C FD 4E 3E Mass Erase Code EEOOh FFFFh
8. 908QY4 ze z freescale Enabled LED ENABLE RESET 4 08 5 www softecmicro com The 080 4 Board CodeWarrior Integrated Development Environment PK HCO8QY4 comes with a free version of CodeWarrior Development Studio for HC S 08 Microcontrollers Special Edition CodeWarrior Development Studio for HC S 08 is a powerful and easy to use tool suite designed to increase your software development productivity Its Integrated Development Environment IDE provides unrivaled features such as Processor Expert application design tool full chip simulation Data Visualization and project manager with templates to help you concentrate on the added value of your application Page 8 PK HC08QY4 User s Manual The comprehensive highly visual CodeWarrior Development Studio for Freescale HC S 08 Microcontrollers enables you to build and deploy HC S 08 systems quickly and easily This tool suite provides the capabilities required by every engineer in the development cycle from board bring up to firmware development to final application development To use the Special Edition 4 KB code size limited you must have a valid license key Without the license key the product will run in a 1 KB code size limited demonstration mode To request the license key please refer to Metrowerks website This documentation covers the basic setup and operation of the CodeWarrior IDE but does not cover all of
9. EEDO 80 00 00 FF FF FF FF FF FF FF I Blank Check Code EEEO FF FF FF FF FF FF FF FF FF FF Program TRIMLOC BEER Buffer Range EEFO FF FF FF FF FF FF FF FF FF FF Program Code FFFFh EFOO FF FF FF FF FF FF FF FF FF FF Verity Code en EF10 FF FF FF FF FF FF FF FF FF FF EF20 FF FF FF FF FF FF FF FF FF FF EF30 FF FF FF FF FF FF FF FF FF FF teslis EF40 FF FF FF FF FF FF FF FF FF FF Not Available EFSO FF FF FF FF FF FF FF FF FF FF EF60 FF FF FF FF FF FF FF FF FF FF Option Bytes EF70 FF FF FF FF FF FF FF FF FF FF EFB80 FF FF FF FF FF FF FF FF FF FF Not Available EF9O FF FF FF FF FF FF FF FF FF FF EFAO FF FF FF FF FF FF FF FF FF FF EFBO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF EFCO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF EFDO FF FF FF FF FF FF FF FF FF FT FF FF FF FF FF FF EFEO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF EFFO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FO10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Y Ready Motorola 68 9080 4 PI HCOBQY4 HCO8 FLASH MCUs FLASH 4Kx8 The DataBlaze User Interface Page 30 PK HC08QY4 User s Manual 5 Troubleshooting Common Problems and Solutions This section reports some common problems that may arise during general use Communication Can t Be Established with 080 4 1
10. FF FF FF 0040 FF FF FF 00 EE EE 67 E Startup Aut Symb Local done cnd SofTec_postload cud Postload command file correctly executed in lt gt For Help press F1 68 9080 4 done cmd SofTec_postload cmd Debugging Session Started 8 From the main menu choose Run gt Start Continue The program will be executed in real time By rotating the potentiometer on the 080 4 board you affect the results of the A D conversion and the value of each conversion is displayed on the LEDs 9 From the main menu choose Run gt Halt The program execution will stop The next instruction to be executed is highlighted in the Source window 10 From the main menu choose Run Single Step The instruction highlighted in the Source window will be executed and the program execution will be stopped immediately after Page 16 PK HC08QY4 User s Manual 11 Inthe Source window insert a breakpoint at the PTB ADR instruction in the main function To insert the breakpoint right click on the PTB ADR line and from the pop up menu select Set Breakpoint 12 Rotate the potentiometer slightly Then from the main menu choose Run gt Start Continue The application will restart from where it was previously stopped The application will stop at the breakpoint location as soon as the next A D conversion is done 13 Issue a Single Step command Run gt Single Step
11. PK HC08QY4 1 A133 MHz or higher PC compatible system running Windows 98 Windows 2000 or Windows XP 2 128 MB of available system RAM plus 500 MB of available hard disk space A USB port 4 CD ROM drive for installation 11 2 Getting Started Installing the Software Note before to connect the PK HC08QY4 board to the PC it is recommended that you install all of the required software first see below so that the PK HC08QY4 USB driver will be automatically found by Windows when you connect the board PK HCO8QY4 requires that both Metrowerks CodeWarrior IDE and SofTec Microsystems PK HCO8QY4 additional components be installed in the host PC Note Metrowerks CodeWarrior HC S 08 IDE must be installed first Please note that PK HCO08QYA only works with CodeWarrior for HC S 08 version 3 0 or above Installing Metrowerks CodeWarrior IDE To install the CodeWarrior IDE insert the CodeWarrior CD ROM into your computer s CD ROM drive A startup window will automatically appear Follow the on screen instructions Installing SofTec Microsystems Additional Components The SofTec Microsystems additional components install all of the other required components to your hard drive These components include PK HCO8QY4 USB driver PK HCO08QYA software plug in for CodeWarrior HC S 08 Examples Documentation in PDF format To install the SofTec Microsystems additional components
12. We therefore recommend that you use the PK HCO8QY4 board with the USB cable provided or if you use another USB cable ensure that the cable length does not exceed 2 meters Page 20 PK HC08QY4 User s Manual Technical Note The MC68HC908QY device like all devices of the 08 family features a monitor code which through a serial communication line allows the programming and the in circuit debugging of the user application The monitor code is executed in monitor mode the user application is executed is user mode To enter the monitor mode some microcontroller lines must be properly driven for further details please refer to the microcontroller s data sheet The 080 4 USB to MONO8 Interface section groups the circuitry needed to generate the required signals to enter the monitor mode and to communicate with the host PC s USB port In particular to enter the monitor mode the USB to 08 Interface circuitry generates handles the following signals high level voltage signal Vrsr 8 2 V on the PTAZ IRQ pin of the microcontroller A reset signal on PTA3 RST pin of the microcontroller The PTA1 and PTA4 pins of the microcontroller are driven to the following levels PTA1 1 4 0 power supply line to drive the Vo pin of the microcontroller to 0 V or 5 V single wire bidirectional serial communication line on the PTAO pin of the microcontroller A28 MHz clock sig
13. e Established with 080 4 Stepping Execution is Slow Communication Lost During Debugging Getting Technical Support Appendix A Electrical and Physical Specifications PK HC08QY4 User s Manual 1 Overview What is the PK HCO8QY4 Starter Kit The PK HC08QYA Starter Kit is an entry level tool which allows you to get started with the Freescale 68 08 family of low cost high performance microcontrollers units MCUs The 68 08 Family is a Complex Instruction Set Computer CISC with a Von Neumann architecture All MCUs in the family use the enhanced 68 08 central processor unit CPU08 and are available with a variety of modules memory sizes and types and package types The main features of the MC68HC908QY4 microcontroller are High performance M68HCO08 CPU core 4096 bytes of FLASH memory 128 bytes of RAM 8MHzinternal bus operation at 5 V 4 MHz at 3 V 3 2 MHz internal oscillator 4 8 bit analog to digital converter ADC 2 16 bit timer interface module The 080 4 Starter Kit has been designed for the evaluation of the MC68HC908QY4 microcontroller and the debugging of small user applications The PK HC08QYA Starter Kit takes advantage of the Metrowerks CodeWarrior Integrated Development Environment which groups an Editor Assembler C Compiler and Debugger and the Freescale s MONOS interface which allows the download of the user
14. e Project gt Debug This will compile the source code generate an executable file and download it to the PK HCO8QY4 board 7 Anew debugger environment will open Page 15 2 Getting Started True Time Simulator amp Real Time Debugger C Program Files Metrowerks CodeWarrior CWO8_V3 0 CodeWarrior_Examples HCOB SofTec 024 File View Run inDART HCO8 Component Assembly Window Help Sul ejej Te 2 F 5 A Assembly Woe C Program Files Metrowerks CodeWarrior CW08_V3 0 CodeWarrior_Examples HCOB main c Line 22 Startup SEI void main void EE8D LDA OxEEA6 0 90 0 02 EnableInterrupts Enables Global Interrupt EE92 BNE 6 sabs EE98 CONFIG1 0 01 Disables EE94 LDHX 0 00 0 CONFIG2 0x49 Enables external oscillator and IRQ RST pi 97 5 OSCSTAT 0x02 Enables external clock generator EE98 JSR OXEE17 DDRB OxFF rt B as output EE9B LDX OxEEA ADSCR 0 21 H C channel 1 m ADICLK 0x60 iS k 8 Y Ps 2 HCOB Auto P A 0 HX FF SP FF SR 6B Status VHINZC Startup PC Start08 c Auto Symb Global Auto startupData lt 9 gt _tagStartup 0080 7F 2A 00 00 FF EO 00 00 8EG END SSTACK array 0 of unsigned char 0088 00 1C FF FF FF FF FF FF 0090 FF FF FF FF FF FF FF FF 0098 FF FF FF FF FF
15. er Project File 0 C Debugger Cmd Files la ha le da da lc da da The Project Window 5 The C code of this example is contained in the main c file Double click on it to open The following window will appear Page 14 PK HC08QY4 User s Manual mim db 0 My df Path C Program Files Metrowerks CodeWarrior CW08_V3 0 CodeWarriot_ExamplesHCOB SofTec main c lt gt 222 22222 7 ADC Sample for SofTec Microsystems PK HCOSQY4 Starter Kit By rotating the potentioneter PT 1 channel 1 you affect the results of the A D conversion and the value of each conversion is displayed on the LEDs on PTB 7 0 Make sure that all of the LED ENABLE jumpers and the POTENTIOMETER ENABLE jumper are inserted Copyright c 2004 SofTec Microsystems http www softecnicro com DE include lt hidef h gt For EnableInterrupts macro include lt MC68HC9080Y4 h gt Peripheral Declarations MI ttn Mtn Enables Global Interrupt Disabl COP Enables external oscillator and IRQ RST pin Enables external clock generator Configures port B as output Enables ADC channel 1 Bus clock 8 for Forever while ADSCR amp 0x80 Waits for ADC end of conversion PTB DR Writes the ADC value on port B Line 11 Col42 4 gt The Example s Source Code 6 From the main menu choos
16. eral Status Care must be taken when reading some peripheral s status data registers since a reading operations may cause the clearing of flags This may happen when the Memory window or the Data window is open since these windows read microcontroller s resources during refresh operations Internal RC Oscillator Calibration The MC68HC908QY microcontroller features an internal trimmerable RC oscillator working at 3 2 MHz The MC68HC908QY microcontroller is factory pre programmed with a default trimming value in a dedicated FLASH location specified in the datasheet However due to the different real world conditions of the user s system it is always suggested to recalibrate the internal oscillator to reflect the actual working conditions The Trimming Settings dialog box allows you to enable disable the trimming feature If enabled it is possible to specify whether to save the calculated trimmed value in the default location the location suggested either by Freescale or SofTec Microsystems restorable at Page 27 4 Debugging Features any moment via the Restore button or into a different location specified in the Flash Trimming Location parameter The calculation of the trimmed value and its writing to the specified address are carried out transparently when programming the device or during download when debugging If you don t want to reserve a FLASH location for the calibration but use it as normal memory in
17. figuration Hardware Model Hw code PKCHCOBQYA Cancel Device Device code Communication Settings The MCU Configuration Dialog Box 5 Onthe CodeWarrior HC S 08 debugger interface a new menu inDART HCO8 will be created From this menu select Load and locate the object file your project is based on Limitations Some hardware and software limitations apply Page 25 4 Debugging Features PTAO 2 PTA3 and PTAS pins of the microcontroller are reserved in particular the PTAO bit in the DDRA Register must not be changed must be left to input MONOS lines PTA1 PTA4 and the PTA3 RESET line have a 1 KOhm serial resistor Since the IRQ PTA2 line is reserved and it is driven to the bil and bih Assembly instructions will result in no branch and always branch respectively The COP must be disabled at the beginning of the user code Break Module peripheral is reserved and only one hardware breakpoint is available however you can insert a swi instruction into your code to generate a software breakpoint The Halt debugging command in the CodeWarrior IDE will not work unless the IRQ interrupt is properly handled 13 bytes of stack are wasted by the on chip monitor therefore the addresses from SP 13 to SP are reserved Notes and Tips Entering Debug Session with CodeWarrior When entering a debug
18. ibility security test has been carried out by SofTec Microsystems Application Tutorial This section will provide a step by step guide on how to launch your first PK HCO8QY4 project and get started with the CodeWarrior HC S 08 user interface Page 13 2 Getting Started The sample application reads the position of the potentiometer connected to the microcontroller s ADC peripheral and displays this value on the LEDs To execute the sample application follow the next steps 1 Ensure that the PK HCO8QY4 board is connected to the PC via the USB cable 2 Verify that both the J5 and J4 jumpers near the potentiometer and the LEDs are inserted This is the factory configuration and indicates that both the potentiometer and the LEDs are connected to the lines of the microcontroller 3 Start the CodeWarrior HC S 08 IDE by selecting Start gt Programs gt Metrowerks CodeWarrior gt CW08 gt CodeWarrior IDE The CodeWarrior HC S 08 IDE will open 4 From the main menu choose File Open Select the adc mcp workspace file that is located under the Program Files Metrowerks CodeWarrior CWO08 CodeWarrior Examples HCO8 SofTec Microsystems PK HCO8QY4 C Adc directory Click Open The following window will appear ADC mcp SofTec Jay SR Files Link Order Targets e File Code Data f BD readme txt n a n a Sources 30 manc 30 Startup Code 166 Pm 0 9 Libs 14K Debugg
19. its functions For further information please refer to the CodeWarrior on line help and on line documentation provided Recommended Reading This documentation describes how to use PK HCO8QY4 together with Metrowerks CodeWarrior HC S 08 IDE Additional information can be found in the following documents PK HC08QY4 Schematic Metrowerks Additional Documentation Available from the CodeWarrior IDE CPUOSG Central Processor Unit Reference Manual Programming reference containing the description of the full 08 instruction set MC68HC908QT QY Data Sheets Software Upgrades The latest version of the PK HC08QY4 system software is always available free of charge from our website http www softecmicro com Metrowerks CodeWarrior upgrades can be found at http www metrowerks com Page 9 PK HC08QY4 User s Manual 2 Getting Started PK HC08QY4 Components The 080 4 package includes the following items The PK HC08QY4 evaluation board A USB cable The Metrowerks CodeWarrior HC S 08 CD ROM The SofTec Microsystems PK HC08QYA System Software CD ROM A QuickStart Tutorial color poster This user s manual DARAN Host System Requirements The PK HCO8QY4 in circuit debugger is controlled by an Integrated Development Environment running under Windows CodeWarrior HC S 08 The following hardware and software are required to run the CodeWarrior HC S 08 user interface together with
20. marks of Metrowerks Corp Microsoft and Windows are trademarks or registered trademarks of Microsoft Corporation PC is a registered trademark of International Business Machines Corporation Other products and company names listed are trademarks or trade names of their respective companies Written by Paolo Xausa PK HC08QY4 User s Manual Contents 1 Overview What is the 080 4 Starter Kit What is the MONOS Interface PK HCO8QY4 Board Layout CodeWarrior Integrated Development Environment Recommended Reading Software Upgrades 2 Getting Started PK HC08QY4 Components Host System Requirements Installing the Software Installing Metrowerks CodeWarrior IDE Installing SofTec Microsystems Additional Components Installing the Hardware Application Tutorial Additional Examples 3 Hardware Features Introduction MCU Section USB to MONOS Interface Demo Section Prototype Area 4 Debugging Features Creating Your Own Application Using the Project Wizard to Create Your Application Skeleton Starting your first Debugging Session Using Existing Projects with PK HCO8QY4 Limitations Contents Notes and Tips Entering Debug Session with CodeWarrior Halt Debugging Handling Breakpoints and Swi Instruction Interrupt Execution during Steps Reading Peripheral Status Internal RC Oscillator Calibration DataBlaze Programming Utility 5 Troubleshooting Common Problems and Solutions Communication Can t B
21. nal on the PTA5 OSC1 pin of the microcontroller in order to communicate at a speed of about 27 000 baud over the serial communication line specified above All of the above signals are generated by the MC68HC908JB16 microcontroller through a USB interface Demo Section The Demo section groups push buttons a potentiometer and user LEDs In detail Eight user LEDs together with jumpers to connect them to disconnect them from the microcontroller s Port B pins All of the microcontroller I O pins provide the required current to drive the low current LEDs used by the starter kit so no external transistors are needed Page 21 3 Hardware Features user push button connected to the microcontroller s PTA4 pin In order to read the status of this push button the microcontroller s internal pull up must be enabled through software on this pin push button connected to the microcontrollers rest pin PTAS RST potentiometer together with a jumper to connect it to disconnect it from the microcontrollers PTA1 pin Prototype Area The prototype section features both a standard thru hole area for mounting traditional components and a SMD area for soldering SMD components in SOIC package Page 22 PK HC08QY4 User s Manual 4 Debugging Features Creating Your Own Application Using the Project Wizard to Create Your Application Skeleton CodeWarrior HC S 08 helps you get sta
22. rted with your own application by including a project wizard specific for HC08 based SofTec Microsystems boards To create a new PK HCO8QY4 project 1 From the main menu select File New 2 A dialog box will appear Select HC S 08 New Project Wizard 3 Follow the Project Wizard steps making sure you select the correct microcontroller derivative you are working with and that the SofTec Microsystems target connection is used Starting your first Debugging Session The first time you enter a debugging session by selecting Project Debug from the CodeWarrior s main menu the MCU Configuration dialog box will open asking you to select the debugging hardware connected to the PC Make sure that the hardware code is set to PK HC08QY4 MCU Configuration Hardware Model HW code PKCHCOSQY4 Device Device code Commurication Settings The MCU Configuration Dialog Box Page 23 4 Debugging Features Using Existing Projects with 080 4 If your project has been targeted to an emulator simulator other than PK HCO8QY4 and you wish to use PK HC08QYA as the debugger for your project please do the following 3 If your project has been created with a version of CodeWarrior less than 3 0 make sure that the target command line option specifies the GDI target interface To do so a Open your existing project s settings dialog box b Inthe Target Setting
23. s Panels section click on the Build Extras item c If in the debugger s argument edit box the string target appears make sure that is set to target GDI CodeWarrior is interfaced to the PK HCO8QY4 engine through a so called GDI interface From the CodeWarrior HC S 08 debugger interface select Component gt Set Target and choose 08 as processor and GDI Target Interface as target interface Set Target Processor HCOB A Target Interface GDI Target Interface Cancel GDI Target Interface Hitex Emulator Target Interface MONOS Target Interface Motorola Motosil Target Interface SAA PRE Target Interface Simulator Target Interface Trace32 Target Interface The Set Target Dialog Box A dialog box will appear asking you to locate the GDI DLL file needed to interface with PK HCO8QY4 Select the inDART HCO68 dll file located into the Program Files Metrowerks CodeWarrior CWO8 prog directory the PK HCO8QY4 board is based on the SofTec Microsystems inDART debugging engine Page 24 PK HC08QY4 User s Manual GDI Setup Communication GDI Driver DLL Path and name of the GDI DLL Browse inDART HCOG dl Show Protocol OK Cancel The GDI Setup Dialog Box 4 The MCU Configuration dialog box will appear allowing you to select the PK HC08QY4 board as the hardware debugger MCU Con
24. s main menu this is because the target has not been recognized by CodeWarrior No link to Target appears in the status bar In this case from the GDI menu choose MCU Configuration and verify that the hardware code is set correctly Stepping Execution is Slow When the Memory window is open step commands may execute slower since the Memory window contents need to be refreshed after every step Communication Lost During Debugging sure that the target microcontroller s I O bit corresponding to the PTAO line the MONOS line dedicated to the bidirectional communication is set to input by your program Make sure that your program works correctly Among other things your program must not access reserved memory locations Getting Technical Support Technical assistance is provided free to all customers For technical assistance documentation and information about products and services please refer to your local SofTec Microsystems partner SofTec Microsystems offers its customers a free technical support service at support softecmicro com Before getting in contact with us we advise you to check that you are working with the latest version of the PK HCO8QY4 system software upgrades available free of charge at http www softecmicro com Additional resources can be found our 08 online discussion forum Page 32 PK HC08QY4 User s Manual Appendix A Electrical and Physical Specifications Opera
25. stead it is possible to disable the trimming feature and therefore free the trimming FLASH location for application purposes To open the Trimming Settings dialog box choose inDART HC08 gt MCU Configuration gt Communication Settings Trimming Settings from the CodeWarrior main menu after entering a debugging session Trimming Settings Disable C DisableTrimming The device s trimming location is left free for the user program The Cancel user program may either use the location for program data storage or for storing a user calculated timming value Enable Enable Trimming The instrument automatically calculates the trimming value based on the frequency specified below and programs it into the trimming location Internal Bus Frequency Bae x ELASH Trimming Location FFCO Restore Trimming Settings Dialog Box DataBlaze Programming Utility A full featured programming utility DataBlaze is also provided with the PK HCO8QY4 Starter Kit To start the DataBlaze utility select Start gt Programs gt SofTec Microsystems gt 08 Series gt DataBlaze Programmer DataBlaze offers the following advanced features Page 28 PK HC08QY4 User s Manual Memory editing Blank check erase program verify read operations Project handling One button multiple operations programming Auto feature Automatic trimming calibration Serial numbering Note due
26. tent of FLASH program memory when the chip is already plugged on the application board The 08 interface can be implemented with a minimum number of added components and board area impact PK HCO08QYA features USB to MONOS circuitry which allows the host PC to communicate to the microcontroller through a standard USB cable Page 6 PK HC08QY4 User s Manual 080 4 Board Layout The 080 4 board has the following hardware features 1 A USB to MONOS Interface section It contains the circuitry needed to electrically and logically translate MONO8 like commands sent by the host PC through the USB cable to the MONOS interface of the microcontroller The PK HCO8QY4 board is powered by the USB bus 2 A Demo section It features a RESET push button one user push button a potentiometer and eight user LEDs 3 A MCU section It contains a soldered 16 pin MC68HC908QYA device in SOIC package with connectors to access the pins of the microcontroller for expansion prototyping A 28 MHz clock signal is provided used to generate an internal bus frequency of 7 MHz 4 Prototype section You can wire your own circuit here The prototype section features both a standard thru hole area for mounting traditional components and a SMD area for soldering SMD components in SOIC package Page 7 1 Overview user BOARD 28MHz 0 10 SEL 5 90 0 x a MC68HC
27. tics pull ups low voltage operations thresholds etc are 100 guaranteed MCU Section The MCU section contains the target microcontroller and the additional circuitry needed for the correct microcontroller startup In detail MC68HC908QY4 microcontroller together with all necessary filter capacitors jumper to select either an on board generated 28 MHz oscillator frequency or an user provided clock signal to be provided to the PTA5 OSC1 pin push button in the Demo section is directly connected to the microcontroller s reset pin PTA3 RST All of the microcontroller s pins are available on the two connectors placed near the microcontroller Page 19 3 Hardware Features USB to MONOS Interface This section contains the circuitry needed to electrically and logically translate MONO8 like commands sent by the host PC through the USB cable to the MONO8 interface of the microcontroller The USB interface is based on a Freescale MC68HC908JB16 microcontroller which features an on board low speed USB peripheral The USB bus provides the power supply for the board To protect the USB bus against short circuits that may occur during experiments the power supply circuitry features a 200 mA auto restore fuse Note even though USB specifications require low speed devices to be used only with a captive or manufacturer specific USB cable we have decided to use a standard USB cable
28. ting Voltage 4 75 to 5 0 V DC provided by the USB connection Power Consumption 200 mA max Dimensions 137 x 86 x 15 mm Weight 55g Operating Temperature 0 C to 50 C Storage Temperature 20 C to 70 C Humidity 90 without condensation Electrical and Physical Specifications Page 33 Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery amp Lifecycle Information Freescale Semiconductor PK HCO8QY4 PK HCSO8GB60

Download Pdf Manuals

image

Related Search

Related Contents

Copyright © All rights reserved.
Failed to retrieve file