Home

HC08マイコンシリーズ スタートアップガイド シリアル・モニタ編

image

Contents

1. Py P pde Ix N Py
2. gt 0 F F OFF FC Py
3. b P b
4. HOS08 5 HX HC08 oo 5 RETE EET 5 oo 5 eeeeseecececceceececccceccececcececcececceccecee 5 EE O00 EIEN NE 8 IP IU IE AE EB 15 7 DILILDIDIIDIDDP m 9 pl d 9 Pzb EIL UP er ES NS A EE 9 1 3 nnne nnne nnne hene nennen entente nentes 10 EX lH I E T 10 J Ed m 1 2 2 MELLE i AVE NE dV C ET 11 qEESASx 1110 ELLE E LLLI ILLE 12 WEO y HER AETHER 12 keare eaan E E 12 2 eMe 13 21 BIELLA 77 Hr A7 BI NFUGAR2 Henn 13 ReNMAVEnI MZ u
5. AC100V AC100V e e HCO08 e Microsoft Windows Microsoft e e
6. e e e e
7. JA FP CD ROM MD CD ROM M OX 2 0 CXftdi driver CXftdi driver H Pen L 0 rf 0
8. PC 3 1 2 SF9S08C HC08 J 1 1 3 B x U omi Ox0220 0x025F OxFCOO 0xFFFF RAM Ox0060 512Bytes
9. Q Please choose the set of languages C Q Project name LED_PICOPICO_F Q Location Set C HC08_PROGRAM LED_PICOPICO_F HC S 08 New Project Wizard Ma Please choose the set of languages to be Project name supported initially You can make multiple Device and Connection selections FTEoPcom Absolute assemi Location Add Additional Fil Relocatable ass T oXHCS080 PROGRAMELED FICOPICO F itional Files Processor Expert O C C Options PC Lint language support will be included in the roJect lt xo Efe C HOS 08Q PROGRAM amp ex E3 REG wl 3 6 CodeWarrior Project Param
10. 32 7kHz Min 25kHz Max 41 66kHz 20C 3V FEI ICS Internal Clock Source FLL Frequency Locked Loop 512 ICS 2 ICSC2 BDIV 01 2 109 CSOUT 5 ICSOUT 2 BUSCLK SF9S08C 31 25kHz
11. FEI 16MHz 8MHz SF9808C FRI 16MHZ 4MHz ESTOP T ORR STOP STOP1 STOP2 STOP3 STOP STOP Trace STOP Go HC08
12. lt P
13. E SF9S08C CTL298 SW1 SF9808C PTA2 8W1 SF9S08C 3 MM 2860 7 CTL298 MM 2860 3
14. None Device Initialization Processor Expert Device Initialization x TIGSY eve HC S 08 New Project Wizard Ma Ax n J Rapid Application Development Options Device and Connection Project Parameters Add Additional Files Processor Expert C C Options Processor Expert PG Lint e tool can generate initialization code for on chip peripherals interrupt vector table and template for interrupt vector service routines Help lt B zr wu 3 8 CodeWarrior Processor Expert HC08 22 3 C C4 Options lt
15. 30 3 D PTB6 LED1 0 Inspector Init GPIO Port Control ERY Mo Pin6 Pin6 Le EL Enabled Direction Output Output Value fiic 0 Bean Parameters dl Pins IDisabled Inspector Init GPIO Bean Parameters El Settings E Port control Entire 1 0 port He Direction Input Inspector Init GPIO Bean Parameters Device PTB lt FTB E Settings Port control Individual pins Pins Enabled No pin enabled Set one of the ava PinD Disabled XJ PTBO KBIP4 HsD ADP4 Pin1 Disabled dr _KBIP5 TsD ADP5 Pin2 Disabled DPE Pin3 Disabled DP Pin4 Disabled y E Pin5 Disabled PZ TPMCHI E55 Pin amp Disabled S PTBB SDA TAL Pin Disabled D PTB SCL EXTAL Inspector Init GPIO Bean P
16. ICS 31 25kHz CS 31 25kHz ICS 2 ICSC2 BDIV Bus freq divide 00 1 SMHz x 512 2 x BDIV BDIV 00 1 01 2 10 4 HC08 28 3 2 PTA IRQ TCLK RESET Inspector MC9S08QG8CPB Internal peripherals Vo Reset pin support Wo w ds wp Vw Les eS Disabled Enabled K H Y SOPT1 D 1521 53 CPU
17. NMVN UN F Initialization of the CPU registers in FLASH NVPROT FPS OX7F FPDIS 1 const volatile NVPROTSTR NVPROT 0x0000FFBD OxFF NVOPT KEYEN O FNORED T1 SECOT T SECOO O const volatile NVOPTSTR NVOPT 0x0000FFBF Ox E ui Initialization of the CPU registers in FLASH TNVERBOTIPFS OXJEPPDE f const volatile NVPROTSTR NVPROT 0x0000FFBD OxFF NVOPT KEYEN O FNORED 1 SECOT 1 SECOO O 7 const volatile NVOPTSTR NVOPT 0x0000FFBF OX7E 3 2 MCUinit c HC08 39 3 3 5 Project mainc itinclude hidef h7 for Enablelnterrupts macro include derivative h include peripheral declarations id MCU_initCvoid Device initialization function declaration id main void Uncomment this function call after using Device Initialization to use the g
18. 2 Delete Breakpoint File True Time Simulator Real Time Debugger View Run MONITOR HOS08 Component Source Window Help C XHCS508Q PR ce s T s z 2 e 2 MEU_init foris ir counter lsect Procedure main led blink out CAHCS08G PROGRAM LED PICOPICO F amp Sources main c if counter_1sec gt 10 ir counter de ETE ed b iiL e F 1 f if count 1 msec TRUE Ur TET T Set Breakpoint Run To Cursor Show Breakpoints Show Location Set Trigger Address Set Trigger Address B Triggers Settings gt Open Trigger Settings Dialog Trigger Module Usage 2 Set Markpoint Show Markpoints 8 Data 1 Set Program Counter Open Source File main Ej TPMSC 15 volatile TPI Copy Ctrl C 5 True Time Simulator Real Time Debugger View Run MONITOR HOS08 Component Source Window Help pisal seje 5 3 sz2 File Source C YHCS08Q PRG MEU_init forts Url counter secti if counter 1 C XHCS08Q PROGRAM SLED P
19. e PC COM E JAIE PE EQO ATAN A HD E es E Jal 51029 Jd DVD CD ROM IDE ATA ATAPI 1 4 SCSIE RAID E USB Universal Serial Bus E H pep H ETH R Ew m S9 FATA B p USB Serial Port GOMIDXDZ DJ 4 4 ERN kn p 2D E BPE COM c LPT Bits per second rr Data bits s T an TIAA Parity Non zl LECT Stop bitz hom Flow con trol Hone dl Advanced Settings tor COMTU COM Fart Humber USE Transfer Sizes Select higher setting Receive Bytezt Transmit Eyte zt Bh Options Select lower settings to correct response problems Latency Timer msect 16 Miscellaneous Options Serial Enumerator Minimum Read Timeout msec o z Serial Printer Cancel If Power Off Minimum
20. Y Administrator Internet Explorer A B D gt Micros ry Outla ok s D 9H PE EK 0 amp J 0 RRE rm uo amp NY V GE Egg TUVE FAX Py Q9 R P D 5 HP A k AS FK Outlook Today Micr THATA 7ed JELMA ARET a NIAE UNE veiei ST V AD DATTE PTT e RE PEREDE Window Upi EE Window Update riie 5cssxECEGX d PR EGV 24H Sn AJAH Em 51029 id DVD GD ROM E247 IDE ATA ATAPI amp SCSI RAD E USE Universal Serial Busi dm
21. 0 4 4 6 na nn an nn n r9 D 2 F9 FB FD FD ED AF FB F4 Word Size d 4B 9E 8C 97 87 07 F E4 Format BB BF BF F 47 1 B 83 Mode BB C5 DF DB DI B F3 B8 CE B E OB CF FF F 71 58 33 dF CB FE ED 3D F3 FB EF EF FB B FD FE E Fill 4 33 FF 3D BC D 6 3E C3 LC EA C cC nc nc 4 Address Copy mem Search Pattern Display Startup command file correctly executed STARTED RIINNTNG 4 13 CodeWarrior X 4 1 Byte Word 2 Address RK LWord Hex 1 100ms 60 100ms Memory ASCII Memory AS
22. HC08 18 3 3 3 1 LED CT 298 2 LED LEDI 0 1 LED SF9S08C IL O PTB PARALLEL INPUT OUTPUT CONTROL MODULE 0 SF9S08C 16 TPM 16BIT TIMER PWM MODULE LED1 PTB6 SW1 PTA2 LED2 PTB7 SW2 PTA3 3 1 CT 298 LED LED T 3 2 LED HC08 19 3 3 2 Windows gt Freescale CodeWarrior gt CW08 V5 1 gt CodeWarrior IDE
23. 0 Startup nterrupt vector table FFDOh ditdefine UNASSIGNED_ISR OxFFFF unassigned interrupt service routine void const _vect O 0xFFD0 Interrupt vector table U U U U U U U U U U U U U U U U isrVtpmovf NASSIGNED NASSIGNED NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR NASSIGNED ISR n cue CER Cu euo Cl xe UU CER hio 23 Vrti Cat FFDOS No 22 Reserved2 at FFD2 ho 21 Reserved3 at FFD4 ho 20 Vacmp at FFD6 18 vad at FFDB 18 Vkeyboard at FFDA 17 Mlle Cat FFDO 16 ECE Cat FFDE 19 Vscltx Cat FFEOS 7 14 Vscierr Cat FFE2 13 Vspi Cat FFEJD 12 Vmtim Cat FFE6 11 Reserved tat FPES 10 Reserved14 at FFEA 9 MeservediS tat FFEL 7 5 VtpmchO at FFF4 4 Reserved20 Cat FFF6 2 vivd tat FFFE 7 e Virq at FFFA 1 V8WI tat FFFO
24. Wizard Map PC Lint Gimpel Software PC Lint Which level of startup code ANSI startup code minimal startup code ANSI startup code Q Which memory model Small Tiny 60h FFh 60h AFh 80 AFh Small 100h 100h 14Fh 80 14Fh Q Select the froating point format None None 2
25. 12 2 2 2 1 llCodeWarrior htp wwwireescalecojp CodeWarrior gt CodeWarrior Products gt HC S O8 CodeWarrior Development Studio for HC08 Microcontrollers Special Edition 15 0 2 DD CodeWarrior for HC S08 RS08 7z
26. CT 298 4 1 CT 298 PC Project Debug i Freescale CodeWarrior File Edit View Search Project Processor Expert Device Initialization Window Help itx Noc hm85m81 5 9 1 EEE lization MC9S08QG8CPB from project LED PICOPICO F PR LED PICOPICO F mcp V Select CPU Package E Generate Code 3 Backup Restore Help D HCS0B Serial Monitor ipw g Hep Files Link Order Targets z manc JE X 0 M d Path CXHOS080 PROGRAMLED PICOPICO FSourcesimainc WELL moe BI EL 3 o EJ True Time Simulator amp Real Time Debugger 3 63 Includes Fils B derivativeh Pe rorem nai X 83 t amp T ze amp E x3 Project Settings C HCSUBQ_ PROGRAM LED_ PICOPICO_F HCSU8 Serial Monitor ini View Run Connection Component Memory Window Help Startun Code Source 0 3 an Start08 c amp g Linker Files p burner bbl B Projectprm E094 TSX B Project map E095 CLR 1 X x Generated Code E097 CLR X m AT E098 JSR OxEOD7 m Bn init EO09B BRA 4 31 abs OxEOBA E09D JSR xEOBC EDAD CPHX 0x0001 E0 3 BNE 423 jabs xEOBA EO0A5 TSX
27. SF9S08C 1C MC9S08QG8 e CT 298 PC 400MHz Pentium I AMD K6 IBM PC AT Windows 98 SE Windows 2000 Windows XP Windows XP 128MB 500MB USB1 1 2 0 CT 298 Q0 USB 0S PC OS Windows XP Professional CodeWarrior Development Studio for Freescale HC S 08 version5 1 Special Edition CodeWarrior Help gt About Freescale CodeWarrior IDE gt Installed Products
28. T x freescale sermiconauctar Heak mu mp de em ilz mes ea ee ium PS EI em 32 fg TS BSa aA cep A T z freescale semiconmmuctar ASI CodearriorBr 8 JL Ea AEL MRAM CHa a r RF Ean Mm Te giU ia posae pu Codevvarrior hise 2 M Freescale CodewvarriorBESE n GE k E mS k CodeTEST HE5 Linux Soltions ColdFire p erem HCS CodeWarrior Developer HCS12 X CASE Community Macias CodeWarrior Game k eue oro MEN MPC5xx JL TAREN E pu Design Tools H55 mobile GT CREE LrhsECODUEESN X EDD amd FAQURES OSEK REB Palm tz 28 A Return to Top HC SH8RSO0S8 Design Tools Software Tools Development Suite ID and Description Vendor i Availability CodeWarrior Development Studio for HC08 Microcontrollers 290051 Special Edition FREESCALE exe D Special Edition Versi
29. X gs e e e http www sunhayato co jp 390 95 2 Pol MO08 CodeWarrior Development Studio for Freescale HCS 08 Version 5 1 Special Edition CodeWarrior CodeWarrior HC08
30. 16 A 1 2 4 8 16 32 64 128 LED 8MHz 64 12500 1 0 0 1 100ms 8MHz 64 125 000Hz 1 125 000Hz 0 000008 0 1 0 000008 12500 0 1 HO08 34 QD 0 14 100m 3 Z lok 12499 12500 1 10 Prescaler
31. SCI Serial Communication BDC Background Debug Controller Reset 1 2 SOPT1 11010011 PowerOnReset Low voltage Reset 0111001 COP and 1101001u Reset t1 STOP enable controls u Unaffected T RSTPE Reset pin enabled T BKGDPE BKGD pin enabled STOP allowed long timeout 2 18 COPE COP off ICSC1 ICS Control T T T RDIV Divides ref clk by 1 CLKS Output of FLL is selected ICSC2 01000000 ICS Control2 EREFSTEN Ext ref disable in stop T ERCLKEN ICSERCLK inactive EREFS Ext OSC don t care T LP FLL enable Low power Low range BDIVE BDIV 1 ICSTRM 10000000 FFAF ICS Trim Register ICSSC 00000000 FFAE ICS Status amp Contorol
32. Deyvice Initialization Generate Code Device Initialization Options Generate Device Initialization MC9S08QG8CPB om project LED_ PICOPICO F C I Select CPU Package LJ Backup Restore Help dg IPTA4 AMPA E PTAA AMPA Flan laur TTY 1 IN Dae eiie Dacbareiind hada Qalact A Device Initalization Options Basic Advanced enerated File Type Relocatable Assembler After Generation Generated module name Save and add files to project Create file and do not add to proj MV Show this dialog every time before code genere X Cancel Help 3 3 23 CodeWarrior Generate Code How to use OK Device Initialization How to use the Generation Code Generated module contains function MCU init initialized registers in the FLASH interrupt vector table templates of interrupt service routines for used interrupts To use the generated code that has been added to the project please f
33. AR B dw H E DIA EB dn HOD Hgg DE ott Hf 2D ESA PONE 5 2 COM HC08 5 5 3 COM COM Q 5 2 COM COM COM Port Settings Advanced Advanced Settings in used s 510K in used
34. Preference IDE Preference Panels Editor Fonts amp Tabs Font Script OK 7 LCS Ss Freescale CodeWarrior Edit Can t Undo Can t Redo Otrl z Gtri Shift z Cut Ctrl Copy Ctrl C Paste CtrIeV Remove Delete Select All Ctrl Balance Ctrl B Shift Left Gtrh Shift Right Ctrl Get Previous Completion A t Shift Get Next Completion Alt Complete Code Alt ze Preferences ER Cand Settings Commands and Key Bindings Build Settings IDE Extras IDE Startup MS Reference Sans Serif Plugin Settings MS Reference Specialty p Shielded Folders MS Sans Serif MS Serif MS UI Gothic i Source Trees Code Completion Code Formatting H Editor Settings ext Colors i Display Settings Ls Window Settings Global Settings Factory Settines mg IDE Preferences IDE Startup Plugin Settings Shielded Folders i Source Trees 3 Editor t Code Completion Code Formatting Editor Settings ee Font amp Tabs i Text Colors S Debugger i Display Settings Window Settings Global Settings 3 3 12 CodeWarrior
35. ocessor Expert Device In E B Device Initialization MC9808QG8MFQ from project LED PICO C D HCS08 Serial Monitor 8 iw 4 a a EB Files Link Order Targets ag Includes gg Libs Project Settings Tip of the Day v Did you know Add the option NoBeep to the compiler and assembler to avoid the system beep if there was an error Mene 9 files 3 10 CodeWarrior LED PIGOPIGCO F mcp D HCS08 Serial Monitor in Files Link Order Targets main Bg derivative B MC9SO8GG8h Ibs Bg ansis lib gg Moss soGSc EEA Praject Settings Eg Startup Cade EN aM j E Eg Linker Files B burner bbl m Hj Prajectprm ERRERA Ean Bp Praject map 3 11 CodeWarrior HC08 24 3 Edit
36. 13 COM EM dr Aio Srdiit i rriena iigtin 14 COM 14 22 EEEM 15 3 1 LED ie 19 3 2 JOS I9 K HIE 20 TTT 20 Bo EARNER 25 3 3 Device Initialization 26 ELIT 26 Ke AE T EE S LT 27 oo 28 E PTB 30 E TPM 33 TPM Timer Pulse With Modulator ooo 34 eeeeeeesee RIT NR SR 36 HC08 6 3 4 2UZJV EZ Alb C amp 77 I 04EIE amp d 5 nnne nnne 38 MCUinitc mH MMMMMHHHMHMMRRRRRRRRRRRRRHMMMMMMMMMMHRHRHeRRRRHSM 38 c EAR AA ALDEA Jereeseeeeecserceccsseccccccosesccccossececcoosoeseccosescecocosescecooseeececooseseesecoseseecooese 40 Bi cGO5o NH e E S eissassiestesis sesskpesssas Neu MEN M NR RES FS Si 40 Eman AAi 2 erei n REE 40 Ei LED
37. True Time Simulator amp Real Time Debueeer C HCSDBQ_PROGRAM LED_PICOPICO_F HCS08_Serial_Monitor_ini Efx File View Run MONITOR HCS08 Component Memory Window Help DSa 3 8 3 M2 5 z z amp E Source PIE Assembly PES CAHCS08Q PROGRAMNLED PICOPICO FhSources main c ILine 1 ain include derivative h include peripheral declarations E075 LDHX 0x0150 E07E TXS E07F BSR 113 abs OxEOOE void MCU init void Device initialization function declaration E081 JMP xEOSZ E084 BRS E087 PUL E088 CMP E08A BRS EDSD BRS define LEDl PTBD PTBD6 ga E090 BRS define LED2 PTED FTBD7 fll fg0 I7frfbfqg U SLED2 E 6 c E093 LDX H Reeister C miS HX El00 SP 14F SR 63 st PC E092 BL is Memory ELE main c Auto Symb Global E TPMSC lt 1 gt volatile TPMSCSTR E PTBD lt l gt volatile PTBDSTR A Data 2 counter lsec 57490 unsigned int For Help press F1 Automatic triggers breakpoints watchpoints and trace possible MC9S08QG8 Breakpoint Z 14 5 CodeWarrior Component Fonts 1 OK True T
38. USB Serial Converter E USB Serial Port lc B p ftdiun2k ini FTLane dll CXWINDOWSXsystem32 CXWINDOWSXsystem32 r3 NGU AEE USB Serial C ce Vic dil 0 E USB Serial Port BET U USB Serial Port pco us VP Aura C ase USB Serial Port C A FOrPCHBQ4 AL J CD cu
39. ES r7 7 723 pH The ie Wizard will install HC S 08 ing Pi Compiler Patch 1 on your computer To continue click Next Leota SUC Be BRLISZqVe BS i3 CodeWarrior Updater WARNING This program is protected by copyright law and international treaties Update Check Complete The requested update actions have been completed All the selected product updates were downloaded successfully and are in the folder listed below Download Folder C Download El COM Jp DN to close the CodeWarrior Updater NUM Jj CT 298 k A PC USB Settings lt Back C rnn Jv e Finish l3 CodeWarrior for HC0S8 V5 1 InstallShield Wizard InstallShield Wizard Completed freescale semiconductor PC The InstallShield Wizard has successfully installed CodeWarrior For HCOS V5 1 Click Finish to exit the wizard CT 298 USB Serial KATIN C RAS
40. FBDOh No 16 115 14 1 FFFFh 5 nterrupt vector table void const vect DO EE ho 23 Vrti at FFDO no 22 Reserved at FFD2 ho 21 Reserved3 at FFD4 ho 20 Vacmp at FFD6 P UNASSIGNED ISR UNASSIGNED ISR UNASSIGNED ISR x4 UL Xn bM define UNASSIGNED_ISR OxFFFF unassigned interrupt service routine nterrupt vector table 19 Vadc at FFD8 18 Vkeyboard at FFDA 1 Viic Cat FFDC 18 VScltx Cat FFDES 19 Veclrx Cat FFEOD 14 Vsclerr Cat PFEZ 13 Vspi at FFE4 12 Vmtim Cat FFE6 11 Reserved13 at FFES 10 Reserved14 at FFEA 9 Reservedi5 tat FFEG 9 heservedTo at FFEE 7 7 Vtpmovf at FFF0 6 Vtpmch1 Cat FFF2 b VtpmchO at FFF4 4 Reserved20 at FFF6 3 Vvd at FFFS 2 Virq at FFFA 1 Vswi at FFFC Tus Cus 7x E xe 02x CE Come Coe O Vreset at FFFE Startup 0 Vreset at FFFE otartup h3 1 MCUinit c NVPROT NVOPT NVPROUOT NVOPT
41. d amp include derivative h include peripheral declarations 14 7 CodeWarrior 4 3 1 s True Time Simulator Real Time Debugirer C HC08_PROG File Wiew Run MONITOR HCS08 Component MAL 4 Ba irt M2 gt Source emory Window Help C MHCOS_ PROGRAMSLED PICOPICO F Sources main c include derivative h include peripheral declarations 14 8 CodeWarrior Er Single Step 1 Step Over 1 4 Step Out Be Assembly Step 1 HC08 46 4 4 4 PC CPU VS e
42. OK Wo am Inspector MC9S08QG8CPB 2 z 2 El E n Di i Di ES Yi PTA5 IRG TCLK RESET omn xy Disable Peripheral Initialization 3 16 CodeWarrior Y HC08 29 3 PTB Device Initialization IPTB Device Initialization MC9S08QG8CPB from project LED PICOPICO F SA C i Select CPU Package E Generate Code Backup Restore Help IRGModule IntFLASH Inspector Init GPIO Register Details Address Bean Parameters Init value Register Map Settings 0x0002 00 Hj i 0x0003 00 H 0x000D IE Ux1844 0x1845 Ux1846 00 H FF H 00 Hj PTBSE PTBDS z Bgm Register Map Legend Disable Peripheral Initialization a e Eu 2 m a e reserved read only DK x Cancel 3 17 CodeWarrior PTB HC08
43. MCUinit c Project MCUinitc EPA LEAD y Ctrll S Freescale Code File Edit View ri lu hi amp uw ATILE EaR xj LED PICOPICO F mcp v HCs08 Serial Monitor ow 5 Hk Description Files Link Order Targets qa Device initialization code for selected peripherals HE Code Data x EMig Sources 0 ml void MCU init void l Bl mainc 0m Mif MC9S08G8_16 Cpu init code cEx3ncludes 0 0 x PE initialization code after reset B derivativeh 0 0 x Common initialization of the write once registers B MO9S08QG8h 0 0 zi S PTI COPE 0 COPT 1 STOPE 0 BKGDPE 1 RSTPE 1 x mE Libs 12K 2K lt m SOPTI 0x53 c EgProject Settings 132 6 xi E ir 0 LVDACKz0 LYDIE 0 LVDRE 1 LVDSE 1 LVDEz 1 BGBEz0 FMSE1 dap ete 132 fs SPMSC Por 0 PPDF 0 PPDACK 0 PDC 0 PPDC 0 w 4E Linker Files m 4d snis LVDV 0 LVIIV O 7 gg burner bbl n a m MSC3
44. Inspector Init TPM Settings Clock Source Select WO V Bus rate clock TPMSC OE Bean Parameters 4 Initialization Inspector Init TPM Device TPM E Settings Bean Parameters Register Details Name Address IniLyalue v TP Clock settings L TPMCNTH 0x0041 00 H Clock source select INoclock I TPHMCNTL 0x0042 00 Hf Prescaler MOS Eas E ouaomonoce eS IE Mee E TPMMUDH 0x0043 00 H Modulo counter TPMMODL 0x0044 00 Hj el ar LI T Mm TNL OMAHI n NNa mn d Inspector Init TPM Bean Parameters Register Details Device Name Address Init v ue E Settings TPHSC 0x0040 Ha Clock settings TPMCNTH 0x0041 Clock source select TPHCNTL 00 H Prescaler Modulo counter H 3 21 CodeWarrior TPM TPM Timer Pulse With Modulator SF9S08C TPM
45. HC08 25 3 3 3 Device Initialization CodeWarrior Device Initialization CPU GUI CPU PTB PARALLEL INPUT OUTPUT CONTROL MODULE TPM 16BIT TIMER PWM MODULE Device Initialization Select CPU Package IMC9S08QG8CPB LXX Device Initialization MC98S508QGBCFO from project LED PICOPREGO F BH E Generate Code H Backup m gt Restore P Help MOOSSOGSCGDN MCOSOSOUSCDT MCBGHBGIGBGFF MCOSOBGCOSC FG MOBssoiscPE 3 13 CodeWarrior Device Initializatlion HC08 26 3 CPU CPU Device Initialization CPU Device Initialization MC9
46. 100mseci HE Project Settings 132 6 x i 14 17 CodeWarrior HC08 29 5 5 5 1 SF9S08C CT 298 SW1 USB SW1 USB COM COM PC COM 52 COM COM COM Monitor Setup Monitor Communication Vector Table Mirroring Load Options HOST Serial Communication Port Please select in this ini the serial communication port used
47. 64 108 0E Modulo Counter Radix Button D 10 gt DE TPMSC 12499 TPMMODH 130 TPMMODL D3 TPM TOKI Inspector Init TPM Bean Parameters Register Details Device TPM I Name Address Initvalue Settings Hi Clock settings TPMCNTH 0x0041 00 Hf Clock source select Bus rate clock L 0x0042 00 H Prescaler 1 0x0043 00 Hj ie Modulo counter 1 0x0044 00 Hj Period TPMCOSC 0x0045 00 H Aligned 9 TPHCOYH 0x0046 00 Hj EE Channels 16 TPMCOYL 0x0047 00 Hj E Pins 32 TPMCISC 0x0048 00 H Interrupts r PUES TPMC1VH 0x0049 00 H eoo Initialization TPMCIVL 0x004A 00 Hj Inspector Init TPM Bean Parameters Device Register Details Name Address IniLyalue
48. CodeWarrior USB USB PC HC08 14 2 Next i CodeWarrior for HC08 V5 1 InstallShield Wizard 2 2 Welcome tn the InstallShield Wizard for E 2 freescale CodeWarrior for HC08 V5 1 CodeWarrior CWOS8 V5 Lexe The InstallShield R Wizard will install CodeWarrior For HC08 V5 1 on your computer To continue click Next WARNING This program is protected by copyright law and international treaties CWUB_V5 exe OXDownloadXFreeScale v License Agreement I EI ESSO LPS RE accept the terms of the license agreement
49. oo 41 TPM ooo 41 3 6 REED 42 4 ooo 4 1 CodeWarrior ooo 43 42 e e n nn nnn hhhnnnnhhhnnnhhhnneehhnnnehnnneehhnnnehnnnneeennneene G 43 AT y JRT Beceeceeeeen nennen eene eene erento teet eset etes sese testes sete sess eone 4G 44 707210889857 FLACESESB d een n nn nnn enhn nhnnnnhnnneehhnnne enne 47 45 on nn n nnne nnne nennen 48 48 QD LIII IM 49 50 E JUE23 1 L RRRIMDIEDEOEO s 51 A7 7H Z7r72FbKBHU 6e e HHHseeeeeece eene rr hh nhrhhhnnnhrhhhnnnnhhhhhnnnhnhhhnnnneehhnneeteoonoe 52 4 8 ZOS IY KARIE eeeeseeeseeeccseececcssesoceccoseccecooosesoecososeccecoseccecoooseccecosoccosecososccecoosseceeoooeeeeo 52 5 1 MJAUDERA L Rd a a E RR AER I CR NI 54 oo 54 COMI 954 I NN RS 54 COM ee IIR nennen 54 5 2 COM K
50. b 0 nu d Path CXHCS08Q PROGRAMXLED PICOPICO F Sources v File Code Data M Gg Sources 0 mA include derivat ive h include peripheral declarations g gp main c 0 0 m E Eg Includes i o 0 x void MCU init void Device initialization function declai Bl derivativeh 0 0 x void led blink out void gg MCSS08QGSh 0 0 x int count l msec void Cg Libs 12K Kem EE Project Settings 0 0 m pe n tart ef ine FALS z jer pono AE def ine LEDI PTBD PTBDB 0 6 LED1 W Eg Linker Files D mH def ine LED PTBD PTBD 7 0 7 LED2 gl bumerbbl n a n a m E Projectprm n a n a m void main void Ri Project map n a n a zi T Eg Generated Code 0 0 m unsigned char counter_lsec 0 1 RM MCU init init B iaj xd if count_100msec TRUE LED_PICOPICO_F mcp counter_1sec v HCSI8 Serial Monitor M if counter 1sec 10 counter sec Files Link Order Targets led blink out 2 LEDeBBBSTO A JV le File Code Data i g Sources 56 D m m 56 0 m cludes 0 0 x W PDD ARSE Bl derivativeh D 0 z int count l msec void 9g MCBSH8GG8h n n zi CHE mE Libs 12K 2K e m if TPMSC TOFzz1 ho
51. float is IEEE32 double is IEEE32 gt IEEE32 Hoat double float is IEEE32 double is IEEE64 IEEE32 Hoat IEEE64 double HC S 08 New Project Wizard Map Which level of startup code do you want to use is will perform an ANSI compliant Select minimal startup code for best code density tartup code it initializes elobal Device and Connection ariables objects and calls the application C minimal startup I main routine Project Parameters f Add Additional Files Which memory model shall be used Processor Expert C Tin C C Options E Sman PC Lint Select the floating point format supported Select None for best code density C float is IEEES2 double is IEEE32 float is IEEE32 double is IEEE64 ES see 3 9 CodeWarrior C C Options HC08 29 3 Project Device Initialization Project Messages Tips of the Day Project Messages Unable to replace macro
52. E Settings Clock settings TPHCNTH 0x0041 00 Hj Clock source select Bus rate clock TPMCNTL 0x0042 00 H Prescaler B4 li v Modulo counter Li Period TPHMODH 0x0043 00 H TPMMUDL 0x0044 00 H TPMCOSC 0x0045 00 H Aligned TPMCOYH 0x0046 00 Hj E Channels Inspector Init TPM Bean Parameters TPMCOYL 0x0047 00 H Register Detalls O Settings TPMSC Clock settings TPMCNTH 0x0041 v Clock source select Bus rate clock TPMCNTL 0x0042 Prescaler B4 Modulo counter Address aue E 00 H NH 7 0x0040 Li Period TPHCOSC 0x0045 DU H v Aligned Left TPHC UVH 0x0046 00 H E Channels 0 j i TPHCOYL 0x0047 00 Hj E Pins TPHCISC 0x0048 00 H Interrupts TPMC1YH 0x0049 00 H Initialization TPHCIVL x004A 00 H SUPT2 0x1803 00 GC Disable Peripheral Initialization e 2l 3 22 CodeWarrior Register Map d 0 undefined reserved read only HC08 35 3
53. K RE IMEEEEEEEE LBLnm s 55 5 3 COM K S LIIIDE Ke4lllbbl lb lllbl lb b 2 21 0 T 56 PPY P PP HC08 7 1 1 1 1 HC08 COM FTDI B CodeWarrior CodeWarrior GUI CITIES T I FTD COM USB IC FT232R PC COM CodeWarrior C C Compiler
54. Paar CAT C INe 2 Next 7 T Ma 13 CodeWarrior for HCUB V5 1 InstallShield Wizard License Agreement E CodeWarrior for HC0S8 V5 1 InstallShield Wizard Please read the Following license agreement carefully Welcome to the InstallShield Wizard for CodeWarrior for HCO8 V5 1 The InstallShield Wizard TM will help install CodeWarrior For HCO8 V5 1 on your computer To continue click Next FREESCALE SOFTWARE LICENSE AGREEMENT Thin imn ma eed ctm le md orm vems Pel mam mv A e eee 9 s INext 7 13 CodeWarrior for HCUS V5 1 InstallShield Wizard E CodeWarrior for HC0S8 V5 1 InstallShield Wizard Product Release Notes Please read the product release notes tooetios to Sav Files Welcome to CodeWarrior Development Studio for Where would you like to save your files HC S 08 RS08 Microcontrollers v5 1 Please enter the Folder where you want these files saved If the Folder does not LEE VETETVTTLILILTELETETLTITTETELIEITAV TTE ETETE EErEE ELTELT TEET TECT exist it will be created For you To continue
55. defaultpe LED PICOPICO F 1 iPE CjLED PIOCOPICO F Data 4 HCS08 Serial Monitorini E LED PICOPICO F 2iPE prm LED PICOPICOFGC Ej LED PICOPICO F _3iPE B Sources LED PICOPICO F iPE LED PICOPICO F 4 iPE C Layout hwl MISES SEXE LED PICOPICO F 5 iPE lt M Freescale C Eile Edt Viegfarch Project De LEDPIORIOFmop 0 n p a eg AI Files lt sevew LED PICOPICO F mcp Dy HOSU8 Serial Monitor iN Files Link Order Targets w m m Gna rear 14 16 CodeWarrior HC08 22 4 CodeWarrior Project Freescale CodeWarrior File Edit View Search Project Processor Expert Device Initialization Window Help LE E A EEFE LEERS EA ET EE p a OCP B from project LED PICOPICO_ SEIECTLPU Package T E Benerate Code f Backup Bestore z i B main c LED PICOPIGO F 2 mcp D HCS08 Serial Monitor m o Files Link Order Targets
56. 2007 02 23 11 02 owe vs 1 GP GT SP exe 99 KB 2007 02 23 11 02 9 ows V5 1 GTI6A SP exe 2935 KB 2007 02 23 11 01 CW08 V5 1 JB8 SP exe 96KB 2007 02 23 11 03 CWO Vs 1 JRI2 SPexe 2637 KB 2007 02 23 11 02 g Cwo8 vs 1 JW32 SP exe 98 KB 2007 02 23 11 02 E lcwos vs 1 PE V2 99 SP EXE 143217 KB 2007 02 23 11 10 9 CW08 V5 1 QD4 SP exe 1565KB 2007 02 23 11 02 V5 1 QY4A SP 111 KB 2007 02 23 11 01 IHCO8 V8 1 Compiler Patch 1 exe 19228 KB 2007 02 23 11 02 WIHCUBV5 1 OSBDM SP exe 17230KB 2007 02 23 11 04 HC08 17 2 EAO ATA Dl aa AiE HF
57. Sunhayato HC08 2007 4 15 REV 1 10 956043220 170 0005 3 40 1 03 3984 7791 FAX 03 3971 0535 http www sunhayato co jp e
58. 1 asm i na Set Breakpoint w Run To Cursor Show Breakpoints Show Location n TF Delete Trigger Address Set Trigger Address B riggers Settings Open Trigger Settings Dialog Trigger Module Usage 2 True Iime Simulator Real Time Debugger C HCS08Q_PROGRAMY LE File View Run MONITOR HOS08 Component Source Window Help MAL Ra 25 z ze91s Source CAHCS08Q PROGRAM LED PICOPICO F amp Sources main c a de 1 w intAcount_100msec ynid a main led blink out A it CTPMSC TUF T 100msec I tii a TPHSC n Ld ft Lu mm HOM Run To Cursor Show Breakpoints Show Location Procedure f Daia rasar DONO A Trigger Module Settings E3 Delete Irigger Address B main Triggers Settings d Expert triggers General settings led blink out Open Trigger Settings Dialog Trigger Module Usage Instruction at Address then at Address B was executed Automatic triggers breakpoints watchpoints and trace possible Expert triggers through Expert triggers property page trace possible Disabled manual use of on chip trig
59. E0A6 INC 1 X EJ Register pang Executing Command File E o Procedure SP 14F Status VHINZC executing HOSU8 Serial Monitor startup cmd 1005 1 E T Memory Global E 00000080 00000088 00000090 a Data 1 uto Symb 14 2 CodeWarrior PC HC08 43 4 Set Derivative MC9S08QG8 OK Se Set Derivative MCOS9s08QG8 The MGUID of this derivative is 0x1019 The PARTID returned by the connected derivative matches with multiple derivatives Please select in this dialog the connected derivative Cancel Help 34 3 CodeWarrior Set Derivative Monitor Setup Enable Vector Mirroring Auto Detect OK Monitor Setup Monitor Communication Vector T
60. HC08_V5 1 Compile APERET TT r Patch_1 exe MC9S08QG8 USB lt gt Serial 2 HCO8 V5 1 Compiler Patch l exe EEUU ALLES C CD DX yg FE CE SAANA Y AFH o 27 jo lo 7295 l CE XxX 9 EE P ELAD O OXDownload 120 KB 2007 02 23 11 02 LV5_1_ SP 100 KB 2007 02 23 11 03 9 CWo8 VS 1 EYI6A SP exe 1 813 KB
61. Il Qx02 1F 0x0220 0x025F L _ OxE000 FlashROM 8KB OxFBCF OxFBDO OxFBFF OxFCOO OxFFFF Flash ROM 100 000 25C 1 8 3 6V 1 3 HC08 10 1 SCI Serial Communication Interface SWI Software Interrupt gt COP 0xFFD0 OxFFFF OxFBD0 8SCI
62. CodeWarrior an Freescale In Circuit Emulator Base Ww MSN CodeWarrior IDE le Outlook Express Er CodeWarrior Updater E M68HC08 Libraries 4B Internet Explorer O M68HCO8 Quickstart 2 P 1 9 M68HC08 Release Notes overview gy 2 E Welcome to CW for HC08 V51 m ta Outlool Ej Catalyst Control Center 3 3 3 CodeWarrior CodeWarrior main Startup Create New Project Load Example Project Load Previous Project Run Getting Started Tutorial Start Using
63. Write Timeout msec o B Event On Surprise Ramannal Set ETS On Clase 45 3 COM HC08 56 ROI a hene ue Z WU ho 2006 06 05 06 05 5 15 18 Version5 0 Version5 1 JB ES CodeWarrior Version5 0 Version5 1 hsc08 ini 13 Freescale COM EET 2007 04 15 HC08 2007 04 H 15 H Rev1 10 170 0005 3 40 1 2006 Sunhayato Corp All rights reserved SG043220
64. click Next IMPORTANT NOTES Save files in Folder 1 In order to register this product please follow the instructions included on the registration card that you received Alternatively when downloading the product from the web you may contact us via email Back Cancel HC08 15 2 Next im CodeWarrior for HCUS8 V5 1 InstallShield Wizard Destination Folder Click Next to install to this Folder or click Change to install to another Folder freescale A Install CodeWarrior For HCOS V5 1 to C XProgram FilesKFreescaleCode Warrior For HCOS V5 1X C Next im CodeWarrior for HCU8B V5 1 InstallShield Wizard Ready to Install the Program The wizard is ready to begin installation Click Install to begin the installation If you want to review or change any of your installation settings click Back Click Cancel to exit the wizard iE CodeWarrior for HCUS8 V5 1 InstallShield Wizard Installing CodeWarrior for HC08 V5 1 The pr
65. for HCO8 Assembler for HCO8 gt gt AA abs PC CT 298 1 1 CodeWarrior HC08 8 1 1 2 int CT298 SF9808C USB PC BDM SR9S080 PO SEF9S08C
66. to connect to the hardwar HOST Serial Communication Port Communication protocol Show Monitor TX RX 15 1 COM COM COM 9 3 COM 5 5 3 COM COM HC08 54 5 2 COM COM D Windows B Z COM LPT COM COM
67. 5 LED PICOPICO F mcp zn D HOS08 Serial Monitor mov 6 s e inchi Files Link Order Targets void void pg Sources zi M m main c 0 E void r amp ygIncludes 0 0 z B derivativeh 0 0 m MCL B MOSSUBQGSh 0 0 Zi D ci amp gLibs 12K 2K m for a ansiis lib 12410 2018 zi E MC9S08QG8C 0 85 m if Project Settings 132 6 e m 5 amp g Startup Code 132 6 e m B Start08c 132 6 e m HE Linker Files 0 z 1 BA burnerbbl n a n a xi Ji Projectprm n a n a m B Project map n a n a m EER Generated Code 134 05 m 1 E MGUinitc 134 0 m B MCUinith D 0 x void i p 14 15 CodeWarrior 4 8 File Open Open mcp Freescale CodeWarrior Edit View Search Project Deb Startup Dialog New Text File Ctrl N New Ctrl Shift N Open Gtri 0O Find and Open File Ctrl D Glose Ctr Ww Save Otrl s Save All Otrl Shift S lt Save s Save Copy As 0 C LED PICOPICO F e amp er E3 Reyert bin Default mem LED PIGOPICO F D iPE cmd
68. C EE Project Settings 5 amp g Startup Code J StartD8 c HE Linker Files B burner bbl B Projectprm B Project map g x Generated Code k g p MCUinith 3 25 Device Initialization Project Wizard Device Initialization start08 c void Startup void main c void main void MCUinit c void MCUinit void asm jmp main CPU CLI Enable Interrupt 3 26 HC08 37 3 3 4 Device Initialization Device Initialization
69. CI Fl BitReverse Periodical Address 2C 00 ES CO 00 00 00 00 1F 00 00 00 OO oo on 00 oD 00 2C 10 00 00 FF 00 00 0400 AQ 00 10 00 00 00 8E 00 00 00 60 EF A AF 2A EF C2 EB 33 25 Es DF BE BF 37 5D F n EF 9P 70 Q1 CC CC CD 314 14 CodeWarrior 00 00 00 O0 00 OO oo oD 00 00 oo OO QU OO oo 00 04 00 00 20 00 00 00 OD 00 00 oo 00 on 0O OO OU 00 00 0O 00 0O 0O OO OU A2 AU 26 20 40 43 46 06 00 22 06 04 OE 80 20 11 n4 o1 C 1 O 14 5n n aC n HC08 4 4 7 Progect x OK Freescale CodeWarrior File Edit View Search Project Debug Processor Expert Device Inpiz mt xHNHocxhe227ns4
70. CodeWarrior freescale v Display on Startup 3 4 CodeWarrior HC08 20 3 Device and Connection Q Select the derivative HCS08 gt HCS08QG Family gt MC9S08QG8 Connections HCS08 Serial Monitor HC S 08 New Project Wizard Ma n x Select the derivative you would like to use Choose your default connection HC08 Connections HCS08 Full Chip Simulation Prajac Forameiess HOS08A Family P amp E Multilink Cyclone Pro T HOS08G Family SofTec HCSH8 fv Additional La HCS08Q Family HCS08 Serial Monitor Processor Expert MOSS08QG4 MOOSUBSQGS HGSU8R Family RS08 onnect to a board through Freescale HOSUS erial Monitor Freescale HOSO08 Serial Monitor must be on the board before connecting LT 3 5 CodeWarrior Device and Connection Project Parameters C
71. D2 3 6 1 LED mainc TPM TPM TOF IPMO TOF TPMSC IPM 10F 0 Pm HC08 41 3 3 6 Project Make x Expert Device Initialieation Window Help E s IBI FT T Device Initialization MC9508QG8CPB from project LED PICOPICO_F main c y E b 1l n Path CXHO
72. HC08 40 3 1 LED LED include derivative h include peripheral declarations void MCU init void Device initialization function declaration void led blink out void int count 100msec void itdefine TRUE 1 itdefine FALSE 0 itdefine LED1 PTBD_PTBD6 0 6 LED1 itdefine LED2 PTBD_PTBD7 0 7 LED2 void main void unsigned int counter 1sec 0 MCU initO for if Ccount 100msecO TRUE counter_1sec if counter_1sec gt 10 counter_1sec 0 led blink outO LED 1 int count_100msec void if CTPMSC_TOF 1 100msec Ida TPMSC TPMSC TPMSC_TOF 0 97 SI return TRUE return FALSE LED void led blink out void LED1 LED1 LEDI EER LED2 LED2 LE
73. ICOPICO FhSources main c if count l msec TRUE cs Disable Breakpoint Run To Cursor Show Breakpoints Show Location Trigger Module Usage Set Trigger Address Set Trigger Address B Triggers Settings Open Trigger Settings Dialog Set Markpoint Show Markpoints Set Program Counter 34 10 CodeWarrior Ninan Qai roa Fila HC08 48 4 fT A B A B 2 True Iime Simulator Real Time Debugger C HCS08Q_PROGRAM LE File View Run MONITOR HOS08 Component Source Window Help c m g e laleli S Source IC AHCS08Q_PROGRAMSLED_PICOPICO_F Sourceshmain c af 7W EAD HRE intAcount_100msec woid B TPMSC TOF 100msec
74. S if counter 1sec 10 E0 amp 3 IN Url E0A4 LD counter lsec EET omn E0AS CM m Set Breakpoint SINE Run To Cursor Show Breakpoints maj i v Show Location ee gt HCS08 Set Trigger Address 0 Set Trigger Address B HX E100 Je ae ug D Procedure Triggers Settings 2 SR 63 Open Trigger Settings Dialog PC E032 Trigger Module Usage b main led blink out Set Markpoint Show Markpoints Set Program Counter amp Data 1 Open Source File JB X Cl Memo main c an I uo Symb Gloal f TPMSC 1 volatile TPMSC 0080 B9 2l E PTBD 41 volatile PTBDS GoTo Line Otrl G 0030 FE Bl nnan nr ni 4 9 CodeWarrior HC08 47 4 4 5 T Set Breakpoint
75. SD8QG8CPB from project LED_PICOPICO_F af Bewee Cos gcke gt Bowe f Ho Inspector MC9S08QG8CPB H H H H z H H 1C H J0 Hi ni Hi JH H nl ue H ule FF H H FH E H 3 14 CodeWarrior CPU HC08 2 3 D 8MHz BDIV Inspector MC9S08QG8CPB Clock settings Internal oscillator frequency kHz 31 25 Bus freq divider 1 ICSC2 40 00 SQGSCPB Bean Parameters interrupts enabled Clock settings Initialization interrupt priority i Internal peripherals H CPU interrupts Inspector MC9S08QG8CPB Be z Register Details ke pc Clock settings CONPFTITZ Init value L
76. SUBO PROGRAMELED PIGOPIGO FgSources main c llinclude derivative h Gode Data E s d 58 0 m d void CU init vold L Errors eius void lad blink autivaid T E int count 100msectvaid El 0 Errors and warnings Al al D D zm def ine TRUE 1 IW Error E2801 missing zi E FALSE l 2K OK def ine LED PTBD PTEDE TRIN 152 B define LED PTBD PTBD MA a 132 6 D Error Compile failed E la maintvaid al n a n a zi unsigned int counter lsec Y n a n a zm Path CX HOSO0BG PROGRAMXELED PIGOPIC main n a n a m MEU_init 0 n ul i 1 manc 4 134 m E counter lsectt 134 m Mi m if counter 1sec2 10 7 counter lzec l ed blink eut k LED RBESTID L wy if count T msect 377 TR counter lsectt if teounter lsecs 10 counter lsec l ed Blink outi Line 30 Gol 1 313 28 CodeWarrior Make F2 y amp Errors amp Warnings HC08 42 4 4 CodeWarrior 4 1 CodeWarrior CT 298 SW1 PC USB
77. SWI FFFF FFxx R11 RTI OxFBDOOXFBD J O ACMP OxFBD6 0xFBD7 Z OxFFD8 0xFFD9 AD OxFBD8OxFBDO9 KBI _OxFBDA OxFBDB gt OXFFDCOxFFDD IC OxFBDCOxFBDD O OxFFE40xFFES SPI T OxFpE4OxFBES O OO MTIM FEsoxfsE7 O TPM oxFBFOOxFBFT OxFFF2 0xFFFS TPM 1 OxFBEBOXFBEB U OxFFF4OxFFFS TPM 0 OxFBFAoxFBES OxFFF8 0xFFF9 LVD EHE OxFBFBOxFBFO RO BEAZ LOxFBFAOXFBEB 0xFFFE 0xFFFF Rest OxFBFE OxFBFF FFxx HC08 1 1 1 aL 7 3 UEOBIBR
78. able Mirroring Load Options r vector Table Mirrorme Setup Vector Table amp ddress hex FFDO Analyze the FLASH content and find the parameters below The user section of the FLASH will be erased Vectors reserved by Monitor iT p uto Detect Monitor Setup Monitor Communication Vector Table Mirroring Load Options Analyze the FLASH content and find the parameters below The user section of the FLASH will be erased Vectors reserved by Monitor Comma seperated list 1716152 Fcon Monitor Start Address hex v Enable Vector Table Mirrorine 4 4 CodeWarrior Monitor Setup EI o0 U PC HC08 44 4 PC start08 c main
79. amp unsigned char 0x30 B Projectpr n a mM 7 System clock initialization gi Project nd Es n de 3L runs Herd char far xFFAF Initialize ICSTRM register from a non volatile memory G ted Co 124 D w unsigned char far xFFAE Initialize ICSSC register from a non volatile memory v Egg Gererated Cog m fr loser CLKS 0 RDIV D IREFS 1 IRCLKEN 0 IREFSTEN 0 v B MCUn 134 om 0x04 Initialization of the ICS control register 1 B MOUinith 0 0 zi Ww escas BDIV 0 RANGE 0 HG0 0 LP 0 EREFS 0 ERCLKEN 0 EREFSTEN 0 sx ICSC2 0x00 Initialization of the ICS control register 2 Fi Common initial ization of the CPU registers ik PTASF PTASFA 1 PTASF4 1 PTASF3 1 PTASF 1 PTASF1 1 PTASFN 1 7 13 27 CodeWarrior 7 HC08 38 3 SF9S086C SOHOSUSL FFCOh FFFFh FC00 FFFFh 0 T CT 298 FBD0Oh FBFFh
80. arameters Register Details Address 0x0002 0x000D IPTB Init value Settings Port control Individual pins Pins Enabled El KBIPE Pin Disabled PTB KBIP4 RxD ADP4 PTBPE 0x1844 Pin1 Disabled PTB1 KBIP5 T D ADP5 PTBSE 0x1845 FF H Pin2 Disabled FTB2_KBIPE_SFSCK_ADFE PTBDS 0x1846 00 Hj Pin3 Disabled Pin4 Disabled Pin5 Disabled Enabled appen KBIP 7 MOSI ADP 7 p Ed Ed E Ed E E v Direction Dutput value Pull resistor z Inspector Init GPIO Bean Parameters Register Details Port control Individual pins Pins Enabled 0x000D 00 Hj Pin0 Disabled PTBO KBIP4 HsD ADP4 0x1844 00 Hj Pin1 Disabled FTB1_KBIP5 T D ADP5 0x1845 FF Hj Pin2 Disabled PTB2 KBIP amp SPSCK ADPB PTBDS 0x1846 00 Hj Pin3 Disabled PTB3_KBIP7_MOSI_ADP7 Pin4 Disabled PTB4_MISO Pin5 Disabl amp JJFTB5 TPMCH1 5S 0 ME ATT PTB amp SDA XTAL v Direction Dutput value 3 18 CodeWarrior PTB6 HC08 1 3 2 PTB7 LED2 1 Pin7
81. available for FTDI devices For D2XX Direct drivers please click here Installation quides are available from the Installation Guides page of the Documents section of t gt VCP Drivers Virtual COM port VCP drivers cause the USB device to appear as an additional COM port ava standard COM port Operating System FT232R FT2458s Windows XP x54 FT245BM FT8U232AMI Windows XP Windows Server 2003 Windows 2000 FT232R FT245R FT2232C FT232BM FT245BM FT8U232AM FTGU245AM eod FT232R FT245R FT232BM INANE UNSERE FT245BM FTBU232AM FTBU245AM Windows 2000 i Windows 98 FT232R FT245R FT232BM Windows ME FT245BM FTBU232AM FTBU245AM 2 2 COM COM CT 298 FTDI USB IC COM PC USB USB d Us
82. eWarrior Updater The following information was found about your products Select which updates you wish receive You can read a short description of the updates in the text box below E CodeWarrior Updater Version 3 0 E Ow for ColdFire 6 31 pl CodeWarrior for HO08 V5 1 E ows v5 1 GTI6A Service Pack Ed CWO8 v51 QY4A Service Pack Ed C08 v51 Compiler Patch 1 Ed CWO8 v51 QD4 Service Pack EA AWA VE1 Ma Carviee Pank m Description This is your currently installed version of the product There are 13 updates found for this product Settings Back wx Cancel CO XDownload REESE Select the folder vau wish tn save the updates selected for download in H Documents and Settings a aee ftdi driver E HC0B PROGRAM H 5 HCS080_ PROGRAM a i386 e junk H D MSOCache H E MyWeb H NECTOOLS32 x 2 HC S 08 RS08 V5 1 Compiler Patch 1 InstallShield Wizard Welcome to the InstallShield Wizard for Open downloaded folder on exit Z freescale ons vsa compler Pateh 1 jd Finish p
83. enerated code Enablelnterrupts enable interrupts include your code here forC _ RESET WATCHDOGQ feeds the dog loop forever 3 4 main mam LED itinclude derivative h include peripheral declarations void MCU init void Device initialization function declaration void led blink out void int count 100msec void define TRUE 1 define FALSE 0 itdefine LED1 PTBD PTBD6 0 6 LED1 itdefine LED2 PTBD_PTBD7 0 7 LED2 void main void 1 unsigned int counter 1sec 0 1 MCU initO forC2 if Ccount_100msecO TRUE counter_1sec if counter_1sec gt 10 counter 1sec O0 led blink outO LED loop forever 3 5 LED
84. eters HC08 21 3 Add Additional Files main BjZ Create main c main asm file S Vis HC S 08 New Project Wizard Ma ES Add existing files to the project Device and Connection Project Files Project Parameters 3 Processor Expert C C Options PLint c3 FreeScale D V Create main c main asm file e Mu m D Iv Copy files to project elect files to be added to the new project and press amp o copy the added files to the project folder select Copy Files to Project E o have the wizard generate default main c and or main asm files select Create mainc mainasm CERO xr 3 7 CodeWarrior Add Additional Files Processor Expert
85. ger module with trace possible Memory access at Address Memory access at Address A or at Address B Memory access inside Address Address B range Memory access at Address A then memory access at Address B Memory access at Address A and value on data bus match Memory access at Address A and value on data bus mismatch Capture the read write values at Address B Capture r write values at Address B after access at Address A seen 34 11 CodeWarrior HC08 49 4 Read Write 1 PTBD B Address 2 Size 1 main c Ej PTBDD lt 1 gt volati le PTBDDSTR g Open Module Add Expression Read Write access Set Trigger Address et rigger Address B Triggers Settings Open Trigger Settings Dialog Trigger Module Usage b Set Watchpoint Show Watchpoints 314 12 CodeWarrior HC08
86. ime Simulator Real Time Debugger HCUB PROC File View Run MONITOR HOSO08 Meita Memory Window Help 5 ar X 8 Open Set Connection Fonts C AHCO08 PROGRAM tmp 5 1ONLED PI include derivative h include peripheral declaf ation void MCU init void Device initialization functkon de void led blink out void void main void 0 242 FG AB OO MS Jv 5 A MS Serif i s UI pothc i ms CEU OX 314 6 CodeWarrior HC08 45 4 4 2 Start Continue j main 2 LED Hat CT 298 s Irue Time Simulator Real Tinie Debugger LOS 3E 0621 E PROG File View Run MONITOR HOS08 Go nponent Memory ndow Help cse le v 5 e z e 5 CAHC08 PROGRAM LED PICOPICO F Sources main c
87. ock setis 1 Source CPU clock Internal Clog BENE 251 31 25 kHz IESC1 0x0038 D4 H ICSC2 Ox0033 El Internal clock E Internal oscillator egay kHz 31 25 ICSTRM Ox003A Initialize trim ya yes ICSSC 0x0038B SRS 0x1800 7777070 El Bus freq divider Auto selected prescaler f SED E 00 M Internal bus clock m selected prescaler s SDIDL 0x1807 09H SS lg m spust oiea ma Fixed regn PUE E 5525 MHz E SPHSC2 Ux1 00 H E FLL mode mode E SPMSC3 _0x180C 00 H Inspector MC9SU8QG8CPB Bean Parameters Register Details Tiue me ejsid Gisc moas o We Source CPU clock Internal Clock v 31 2p kHz IESC1 0x0038 04 H El Internal clock E H Intemal oscillator frequency kHz 34 kHz BU Hf ICSSC 0x003B 00 H E SUPT1 0x1802 EE H 1 7 E Initialize trim value Trim value address E SDIDH x1806 00 H 2 0 MHz SDIDL 0x1807 09 Hj SPHSCT 0x1809 1C H Fine trim value address 0 015625 MHz SPHSC2 x180A no Hj SPHSC3 x180C 00 H El Bus freq divider v Internal bus clock Fixed freq clock clk src v Fixed frequency clo E FLL mode 3 15 CodeWarrior SF9S08C FEI FLL Engaged InternaD
88. ogram Features you selected are being installed Please wait while the InstallShield Wizard installs CodeWarrior For HCOS V5 1 This may take several minutes Status Validating install ooo HC08 16 Question 2 J You would like to launch the CodeWarrior Updater to check for any available updates to this product at this time Nert cod caa i9 CodeWarrior Updater Welcome to CodeWarrior Updater The following installed applications listed can be checked for product updates Product Name CodeWarrior Updater Version 3 0 CodeWarrior for HO08 v5 1 CodeWarrior for HO08 Version 5 0 Update Status Awaiting update check ELT to PANT iz aedi E process Settings Nw Cancel d a QE HD WEE dc we 9 B Next i3 Cod
89. ollow the steps below 1 Open the Project prm file in the rojecf Seffing gt Linker Files foldes 2 Comment out the VECTOR 0 Startup line of code by placing in front of the statement Save the changes to the Project prm file 3 Open the main c file Remove the comment symbols and from the MCU init line of code Save the changes to the main c file 4 You are now ready to use the generated code Notes The generated code can be configured in the Generate Code Dialog box gt Advanced Tab gt Options panel The generated MCU init function contains an initialization of the CPU core and selected peripherals This function is intended to be called by the user and is usually invoked after the reset User modifications of the generated code are not recommended because changes to the generated files are not maintained during the code generation The user code is preserved only inside interrupt vector service routines Moe 3 3 24 CodeWarrior How to use HC08 36 3 Project LED_PICOPICO_F mcp iw HCS08 Serial Monitor 4g im Files Link Order Targets Eea Sources E amp gIncludes B derivativeh B MCS9S08QGSh zi amp yLibs B ansiis lib iE MCSS08QGS
90. on Cade Size Restriction 166 o 12 1 CodeWarrior HC08 13 2 COM FTDI FTDI http www ftdichipcom gt Drivers gt VCP gt FT232R OS PC ET FTDI ibi E Chip 4 zs Home Home Products Welcome to F with our ready Products DTE Drivers Documents YCP Our team of 1 Resources D2XX Pro acis manufacturers Support Documents Knowledgebase Resources Sales Network Web Shop Projects Seasons Gre FTDI would lik Support Design Services Knowledgebase Sales Network Web Shop Corporate FTDI Newsletter The FTDI UK Contact Design Services FTDI Taiwan 5 Corporate FTDI USA wil FTDI Newsletter Contact All enquiries New Produc FTDI are prou The FT232R i reset generati mm ram i ff FTDI Chip 3rd Party Drivers Future Technology Devices International Ltd USB Device Solutions ASIC Design gt Virtual COM Port Drivers This page contains the VCP drivers currently
91. pu Set Program Counter 7 Vli True Time Simulator amp Real Time Debugger C HCS08Q0_PROGRAMY LED_PICOPICO_ F HCSUdB Serial Monitor_ini File View Run MONITOR HOCS08 Component Source Window Help nsa Se N Lle Source C HCS08Q_PROGRAMSLED_PICOPICO_F Sources main c MCU init Re E094 CLR X F E095 JSR xEDCA E098 BRA wt21 abs xEDAD E03A JSR OxEQAF E09D CPHX 0x0001 if count l msec TRUE Ur counter lsect EDa BNE 313 sabs xEOAD EDA TSX if counter 1sec 10 E0 INC X E0A4 LDA QA counter lsec ll E0 CHP 10x04 ed_blink_out H FES Jp E0A BCS 4 13 sabs xEUSA Reeister 1 IHCS08 nT Procedure HX El 0 SP 14F SR 63 Status VHINZC PC BA main led blink out True Time Simulator amp Real Time Debugger C HCS08Q_ PROGRAMY LED_PICOPICO F HGSOD8S Serial Monitor_ini File Wiew Run MONITOR HCSUB Component Source Window Help D ja T gt gt 2 e amp S Source Pef A rem CSHCS08Q PROGRAMNLED PICOPICO FiSources main c Line 18 main MEU_init A S E033 TS for E034 CL F E095 JS E038 BR if count 1 msec TRUE 3 E03A JS Url E E09D CP counter lsectt E0A0 BN EDA2 T
92. t4 Pino Direction Output Output Value 1 noL PTBD 80 iz PTBDD I TO PTB IOK Inspector Init GPIO ETTITIIT H 33 19 CodeWarrior PTB7 HC08 22 3 TPM Device Initialization TPM Device Initialization MC9S0U8QG8CPB from project LED PICOPICO_F C AE Select CPU Package By Generate Code Backup Bestore Het Inspector Init TPM Due IIT EERIITIIITI He IMIIIIIII EEMIIIIIII H r 3 3 20 CodeWarrior TPM HC08 33 3 D TPM

Download Pdf Manuals

image

Related Search

Related Contents

"取扱説明書"  Geschirrspüler - KKT KOLBE Küchentechnik  Manual de instalación  

Copyright © All rights reserved.
Failed to retrieve file