Home
AP08079 - Infineon
Contents
1. AILIYN AYIA JAIAJOXO X ODOJAOXO X dYH TUT 10I8TMMTSA18489 X 1104 SpnTOuI 99 sa3 g TST tpasn TIUIIMO sey ATWTT 22T1S 2p0 2249 8502 YATM UOTSIDA D3321433589H yyy AB 1 18489 X 1104 Dot MZ 31UT1 22139 Spo5 yata BHutuuny ouas nn Be gf E au E 00x0 62293899 8c 2010u2 ano O6FO0S cLlF 00x0 BurxurTd Cd ESAIT rr 11x0 JJO d SOT NO d 8131 T 00 0 00x0 qr 30x0 00x0 sss NO Ed SUIT see VP90X0O raatoya MOA IZXO la m F UrXurTd Cd SqT3 men 440 d suit NO d Sit 00 0 sss PTIOM OTTSU sey ATM SEX JJ9T H IOBALSOX uorsia zz PTIOM OTTSU sey ATM ASBY JA9T HTILSLSOX uorsia a0x0 00x0 00x0 00x0 H0 UIXUITd d SJIT Xi 440 d S411 SOXO NO d Sq31 qpxo eox0 sss PTAOM OTTSY sss ITA ASST JAGT NTOSL8OX uorsia TX Luvn UOISIAN H et FaN V2 0 2008 09 Application Note infir AP08079 In fi neon XC878 Easy Kit Cookery Book Note By activating clicking the UART 1 window you can then type 1 2 or 3 and see the result in the Parallel Port 3 window Now we close our simulator session Debug Stop Running Debug Start Stop Debug Session Now we close our project and u Vision 3 Project Close Project File Exit Application Note 110 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Note Since our program runs as expected in the simulator we can now use real hardw
2. U SPY Receive File Edit View Config Tools Window F cow v s wu leis ele S 3 4 fe Connect to COM Port i y U SPY Receive File Edit View Config Tools Window Help com BS m amp ES B Gr zl E COM Window Enabled Note U SPY is now ready for serial communication Application Note 125 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Go back to u Vision 1 click M XC87 3 uVision3 C 1XC8781MAIN C Project Workspace x 249 USER CODE BEGIN MAIN Main 3 2 3 Target 1 20 while RS232 wait 2 3 Dave Files 251 USER CODE END 3 START XC ab5l 252 MAIN C 253 while l BIO C E 9 UART C 26 USER CODE BEGIN MAIN Main 4 s 9 TO1 C 257 printf menu amp User Files 258 select input 5 5 Simulator Files 253 3 simulator ini cm Ee 262 case 1 blinking OFF P3 DATA LED ON printf messagel break 263 case 2 blinking OFF P3 DATA LED OFF printf message2 break 264 case 3 blinking 0N printf message3 break 265 266 USER CODE END 267 268 269 2201 End of function main g 271 pot o5H ISER CODE BEGIN MATIN Generali h ES X Build target Target 1 p assembling START XC a51 compiling MAIN C compiling IO C compiling UART C compiling TO1 C linking Program Size
3. Double click UART C Insert code into the UART vInit function to start printf TI 1 NU XC878 uVision3 C XC878 UART C E Die Edit View Project Debug Flash Peripherals Tools SVCS Window Help A e x asugi eloo A3 8 o aj am ee 4 amp dy E m B E ES X Target 1 jan e PEPA in Mode 1 8 bit data 1 start bit 1 stop bit variable baud rate f Target 1 139 BRG is selected for baudrate generation Dave Files 140 START XC a51 14 SFR PAGE pp2 noSsT switch to page 2 without saving d 33 MAIN C 142 Pl ALTSELO amp ubyte 0x02 configure alternate function register 0 ge 143 Pl ALTSEL1 l ubyte 0x02 configure alternate function register 1 T 4 10 C 144 SFR PAGE pp0 noSST switch to page 0 without saving i3 UART C 145 P1 DIR ubyte 0x02 set output direction 5 8 TOLC 146 E User Files 147 148 MODPISEL ubyte 0x01 configure peripheral input select register 149 BCON 0x00 reset baudrate timer reload register 150 SCON 0x50 load serial channel control register 151 152 Kd AAA AAA a uam cen e imu eiie 153 Baudrate generator settings MEE ee 155 input clock fPCLK 156 Fractional divider is enabled 157 baudrate 9 6004 kbaud 158 159 FDSTEP OxD5 load fractional divider reload register 180 BG 0x81 load baudrate timer reload register 161 FDCON 0x01 load Fraction
4. RO IDATALEN 1 A RO A RO IDATALOOP 317 ENDIF 318 319 IF XC878 CHIP 16FF lt gt 0 320 MOV MEX3 xlF 321 ENDIF 322 323 IF XDATALEN lt gt 0 324 MOV DPTR XDATASTART 325 MOV R7 LOW XDATALEN 326 IF LOW XDATALEN lt gt OU 327 MOY 328 ELSE 329 MOY d ENDIF Text Editor Configuration Wizard Application Note 61 R6 HIGH XDATALEN R6 HIGH XDATALEN V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Output tick Y Create HEX File Options for Target Target 1 E xX Device Target Output Listing User c51 4x51 Lx51 Locate Get Misc Debug Utilities Select Folder for Objects Name of Executable cere Create Executable VCs 738 i Debug Information Browse Information Mergeszis Hertie IV Create HEX File HEX Format HEX 80 Offset C Create Library VXCS 8 LIB WU Batch File Note The HEX File could be used while working with the program XC800_FLOAD for OnChip Flash Programming via RS232 interface Bootstrap Loader BSL Mode via UART Application Note 62 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Listing C Compiler Listing tick v Assembly Code Listing Linker Listing tick Y Linker Code Listing cod Options for Target Target 1 J EM Device Target Output Listing User c51 4x51 Lx51 Locate Lx51 Misc Debug Utilities isti Pa e Widt
5. case 1 blinking OFF P3 DATAZLED ON printf messagel break case 2 blinking OFF P3 DATAZLED OFF printf message2 break case 3 blinking ON printf message3 break M XC878 uVision3 C XC878 MAIN C ENS ls B File Edit View Project Debug Flash Peripherals Tools SVCS Window Help E e x ASE EG 356 2c E A 3 EECH y Ian e gt 0139 q G 8 Hen a alar jaa e IAEA zap 3 43 Target 1 241 void main void 5 5 Dave Files 2425 8 START XC a51 243 USER CODE BEGIN MAIN Main 2 244 al MAIN C 245 USER CODE END e IO C SS s UART C 27 MAIN vInit a Ja TO1 C 248 amp User Files 249 USER CODE BEGIN MAIN Main 3 250 while RS232 wait 251 USER CODE END 252 253 while l 254 1 255 256 USER CODE BEGIN MAIN Main 4 257 printf menu 258 select input 259 260 switch select 261 1 262 case 1 blinking OFF P3 DATA LED ON printf messagel break 263 case 2 blinking OFF P3 DATA LED OFF printf message2 break 264 case 3 blinking 0N printf message3 break 265 266 USER CODE END 267 268 269 2701 End of function main 271 292 273H USER CODE BEGIN MAIN General l0 274 275 USER CODE END 276 ww gt bMS a Q Q j Build ee A q _ AA Application Note 76 V2 0 2008 09 e t AP08079
6. if blinking P3 DATA P3 DATA OxFF Elle Edit View Project Debug Flash Peripherals Tools SVCS Window Help Ch e x rua iaa loc ls or ane y 48 44 oam e a aa emm eH ee w B Target jan a Project Workspace 192 o Target 1 193 Dave Files 194 You have two choices for interrupt type select in Project Settings Page START XC a51 195 under Global Settings Section o a MAIN C 196 If you select CHOICE 1 then ISR will be generated with push and pop 192 If you select CHOICE 2 then ISR will be generated without push and pop T 410 C 1988 Default choice is CHOICE 2 s UART C 198 Current selection is CHOICE 2 a 200 amp User Files 201 USER CODE BEGIN T01 IsrTmr0 1 202 203 USER CODE END 204 205 void TOl viTmr void interrupt TOINT 206E 1 207 208 USER CODE BEGIN T01 IsrTmr0 2 209 Timer 0 interrupt counter 210 211 if RS232 wait 212 RS232 wait 183 Timer overflow 183 5461 333 ps 0 9994 213 214 if Timer_0 interrupt counter 183 183 Timer 0 overflow 183 5461 333ns 215 216 Timer 0 interrupt_counter 0 217 if blinking 218 219 P3 DATA P3 DATA OxFF 220 221 222 USER CODE END 223 2241 End of function T01 viTmr0 225 225 227E USER CODE BEGIN T01 General l0 228 229 USER CODE END 230 20 gt n S W or Br MAIN C E
7. e t AP08079 In fi neon XC878 Easy Kit Cookery Book Double click Main h and insert include files include lt stdio h gt include lt ctype h gt J XC878 pVision3 C XC878 MAIN H Fille Edit View Project Debug Flash Peripherals Tools SVCS Window Help SI ERE EE y e am olli aer m 5g ex Target Ana CEA 2 23 Target 1 769 USER CODE END 3 8 Dave Files 770 i START XC a51 771 D 3 MAIN C 772 ff Pv v v v v ok ok ok ok v o o ob ok ok ok o o v o ok ok ok o ok o o ooo 73 8Project Includes A main h 774 ff 7 A ek ek ok b ok ok o v o ob ok o ok o v v ob ok ok ok o ok o o o o ok ob ok o oe t intrins h 775 ts io h 776 A uart h in A tO1 h 778 ifdef Col __ 2 8 IO C 779 include lt intrins h gt ee 780 fendi f a UART C n s TO1 C 72 include IO H E User Files 783 include UART H 784 include TO1 H 785 786 787 788 Fifdef SDCC 789 790 ISR prototype declaration for SDCC 791 792 void T01 viTmr 0 void interrupt 1 793 794 fendif SDCC 795 796 797 798 USER CODE BEGIN MAIN Header 11 799 include lt stdio h gt 800 include lt ctype h gt 801 USER CODE END 802 803 801 tendif ifndef MAIN H 805 y W r Sr MAIN C B MAIN H Simulation Application Note 79 V2 0 2008 09 e tt AP08079 In fi neon XC878 Easy Kit Cookery Book
8. i EE E Trusted sites E Note The DAS Server must be installed on your host computer The goal of the DAS software 1s to provide one single interface for all types of tools The USB Device driver communicates with the XC878 Easy Kit when connected to the host computer The USB Device driver for the XC878 Easy Kit USB interface is included in the DAS software A virtual COM port driver is also included Application Note 12 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Download The latest release version for download DAS Edition v2 6 4 E al Saving das edition 264 zip from wew Infineon cor Estimated time left Not known Opened so far 600 EE Download to das edition v64 zip Transfer rate 300 KB sec I Close this dialog box when download completes pen Open Folder Unzip das_edition_v264 zip and Application Note 13 V2 0 2008 09 et AP08079 In fi neon XC878 Easy Kit Cookery Book execute DAS v264 setup exe to install the DAS Server InstallShield Wizard Preparing to Install DAS Setup is preparing the InstallShield Wizard which will guide you through the program setup process Please wait Configuring Windows Installer Cancel i DAS InstallShield Wizard E X Welcome to the InstallShield Wizard for DAS The Install amp nielatR Wizard will install DAS on your computer To continue click Next DAS any tool Tm WARNI
9. 3 FFFF 3 0000 2 EE 2 FECO 2 FE00 2 FC004 2 F000 2 E000 2 C0004 2 0000 FFFFa 1 0000 0 FFFF D 0000 Memory Extension Stack Pointer MEXSP Extension Stack RAM 92 Indirect Direct Address Address FF Intemal RAM Special Function Registers 804 TFH Intemal RAM 004 CS y Intemal Data Space V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book NU xC878 pVision3 Text1 E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help DEER BEE Ce CEET GEET E KlTargetr Meas E MAP X 0xOFF000 X 0xOFFBFF READ WRITE EE TO1 C fa User Files 4 MAIN C B VARTOIE TOT C B MAIN H E START Text Build target Target 1 assembling START XC as51l compiling MAIN C compiling IO C compiling UART C compiling TO01 C linking Program Size data 35 2 xdata 0 const 202 code 1487 creating hex file from COTO mACOIG O Error s DO Warnindiz DEED GE ut indica Application Note 93 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book File Save As M XC878 uVision3 Text1 Bi ile Edit View Project Debug Flash Perip Bl New STRG N Open STRG 0 i4 Proj HM sa Close al Save S TRG S Save As File name insert simulator ini Ea xc878 8 E TO1 H IXC878 hex Stot 8 TO1
10. In fi neon XC878 Easy Kit Cookery Book Double click Main h and insert the following Defines define OFF 0 define ON 1 Zdefine LED ON OxFF define LED OFF 0x00 lU XC878 uVision3 C XC878 MAIN H E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help A x Asg tea 2a FE 4 78 Xe Sa v a e 0l 8d E E m E E ex Target jan e WEE aal Please ensure that SCH PAGE is switched to Page 1 before using these macros s5 Target 1 042 define MAIN vUnlockProtecReg PASSWD Ox9B Dave Files 043 define MAIN vlockProtecReg PASSWD OxAB H START XC a51 3 A MAIN C p RENE 046 USER CODE BEGIN MAIN Header 3 047 i intrins h 048 USER CODE END 3 io h 049 i uart h 050 A tO1 h 051 E f FR Y v vk o o ok o ok ook o v o o o ob ok ok ok ook o o o o o o ok o ok o ok o o o o o ob ok o ok ook ove o o o o o ok ook veo ve o ve o oe e oe ve oe ve o ve oe oe o oe e 510 0 02 Defines i 053 Df PY vk o s ok s ok ke ok e v v v ok ok ok o ok oe ee e ve ee ee oe ve oe ve ve ak oe oe k oe e E UART C 054 TOLC 055 USER CODE BEGIN MAIN Header 4 E User Files 056 define OFF 0 057 define ON 1 058 define LED ON OxFF 059 define LED OFF 0x00 061 USER CODE END 063 define bool bit 064 define ulong unsigned long 065 define uword unsigned int 066 define ubyte unsigned
11. MAIN H B UART C E TOI C Simulation h Application Note 82 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Generate your application program Project Rebuild all target files Vu XC878 uVision3 FileWEdit View Project Debug F t E EUER 3 Target 1 Win v XC878 pVision3 C XC878 MAIN C E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help nal x Hg ee ee oe ee o raja gt a safe sere EHESS Target jan e at Ini CA 21 void main void f Target 1 2425 4 53 8 Dave Files 243 USER CODE BEGIN MAIN Main 2 3 START XC a51l 244 A MAIN C SE USER CODE END j 4 IO C 247 MAIN viInit UART C 248 s 8 TO1 C 24 USER CODE BEGIN MAIN Main 3 amp User Files 250 while RS232 wait 251 USER CODE END 252 253 while l 254 255 256 USER CODE BEGIN MAIN Main 4 257 printf menu 258 select input 259 260 switch select 261 262 case 1 blinking OFF P3 DATA LED ON printf messagel break 263 case 2 blinking OFF P3 DATA LED OFF printf message2 break 264 case 3 blinking 0N printf message3 break 265 266 USER CODE END 267 268 269 2701 End of function main y a Files Regs D Books eS Funct S8 Templ MAIN C X Build target Target 1 Pd assembling START XC as51 compiling
12. Options for Target Target ME Xc878 pVision3 MYA XCO78 pVision3 File Edit View Project Debug Flash Peripheral File Edit Yikyy Project Debug Flash P mug Rao E a eee a alnn vjes sua Nec EEEa P A Target 1 s Msuva Eilac Application Note 114 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Options for Target Target Utilities Configure Flash Menu Command check click 9 Use Target Driver for Flash Programming Options for Target Targetl Utilities Configure Flash Menu Command check select Infineon DAS Client for XC800 Options for Target Target 1 Device Target Output Listing User c51 Ax51 151 Locate Lx51 Misc Debug Utilities Configure Flash Menu Command f Use Target Driver for Flash Programming Settings T Update Target before Debugging E Edit Cou EPM Emulator Proarammer Init File IST uPSD ULINK Driver Infineon xXUSOO LILIMK Driver ADI Monitor Driver C Use Extern O S UE MP LPOCOEx ILINK Driver oie a a ae e Arguments zm f A1 Run Independent Cancel Defaults Application Note 115 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Options for Target Targetl Utilities Configure Flash Menu Command click Settings XC878 pVision3 C XC878 MAIN C E File Edit View Project Debug Flash Peripherals Tools SVCS Wiklow Help ee eo eee a4 M u amp
13. T is enabled only while pin EXINT1 is high GATE1 C Mode 3 Timer holds its count Turn on timer TR1 Timer Registers Ahi 0x00 5 bit prescaler TL 1 Interrupt Control 8 bit timer TH1 0x00 r Gagn interrupt of timer Timer overflow us TF1 682 667 XC878CLM new project AL Application Note 41 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Interrupts do nothing File View Options Add Ins Windows n Dau fus o 5 E 3 Priority O Priority1 Priority2 Priority 3 t be changed t De S gt 2 A ETE E gt e Se XC878CLM new project Interrupt of Timer_0 1s enabled ETO 1 w Note Source User s Manual An interrupt that 1s currently being serviced can only be interrupted by a higher priority interrupt but not by another interrupt of the same or lower priority Hence an interrupt of the highest priority cannot be interrupted by any other interrupt request If two or more requests of different priority levels are received simultaneously the request with the highest priority 1s serviced first If requests of the same priority are received simultaneously an internal polling sequence determines which request is serviced first Thus within each priority level there is a second priority structure determined by a polling sequence
14. Add Ins Windows n Deu fus Port Function Port Direction Push Pull Open Drain Output Value Drive Strength Use P3 0 as GPIO C In Out T Open drain T High iv Strong 7 Use P3 1 as GPIO C In Out T Open drain T High iv Strong Use P32 as GPIO C In Out I Open drain High iv Strong Use P3 3 as GPIO C In Out I Open drain I High iv Strong Use P3 4 as GPIO C In Out T Open drain I High iv Strong Use P3 5 as GPIO C In Out Open drain T High iv Strong Use P3 6 as GPIO C In Out M Open drain High iv Strong Use P3 7 as GPIO C In Out Open drain I High iv Strong XC878CLM new project E Application Note 47 V2 0 2008 09 See AP08079 In fi neon XC878 Easy Kit Cookery Book Pull Device do nothing File View Options Add Ins Windows de Dau fus Pull Device P3 0 pull device Tristate sl P3 1 pull device Tristate vw P3 2 pull device Tristate sl P3 3 pull device Tristate sl P3 4 pull device Tristate _w P3 5 pull device Tristate v P3 6 pull device Tristate v P3 7 pull device Tristate v XC878CLM IC STERNEN NO E I NEU UNUM Oy Application Note 48 V2 0 2008 09 See AP08079 In fi neon XC878 Easy Kit Cookery Book Parameters do nothing File View Options Add Ins Windows de Dau fus 4M DAvE XC878CLM Release v1 1 Parameters P3_0 EE P3 2 P3 3 P3 4 P3 P3 6 P3 7 XC878CLM O O Notes If you wish you can insert your
15. Kbyte XRAM is mapped to both the external data memory area and the program memory area It can be accessed using both MOV X and MOVC instructions The bank where the memories resides must also be selected with the 4 bit XRAM Bank pointer in MEX3 MX XRAM bank or the 4 bit Current Bank pointer in MEX1 CB current bank depending on bit MXM MEX3 Memory Extension Register 3 Reset Value 00 7 6 5 4 3 2 1 0 MCB19 0 MXB 19 MXM MXB 18 16 rw rw rw rw rw Field Bits Type Description MXB 19 16 4 rw XRAM Bank Number 2 0 MXM 3 rw XRAM Bank Selector 0 MOVX access data In the current bank 1 MOVX access data in the Memory XRAM bank MCB19 f rw Memory Constant Bank Number MSB 0 6 5 rw Reserved Returns 0 If read should be written with 0 Application Note 60 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book Additional information Memory Map Source START XC a51 E C 1XC8781START_XC a51 15 2 N 36 lt l4 gt N 40 15 2 N 48 4 MHz NDIV XC88x EQU lt e gt Device XC878 XC8 78 CHIP 16FF EQU XC878 CHIP 13FF EQU NDIV XC878 PLL CON NDIV XC878 PLL CON1 NR XC878 OD XC878 lt fe gt XTAL 9 default 9 default 70 PLL CON NDIV lt lt 2 PLL CONI NDIV lt lt 5 CMCON KDIV lt lt 6 Text Editor Configuration Wizard Ej C XC878 START_XC a51 311 312 IF IDATALEN lt gt 0 313 MOV 314 CLR 95 IDATALOOP MOV 316 DJNZ
16. LST lXC878 HTM B210 LST 1TO1 0BJ 1XC878 Inp lod 1TO OBJ UART C 5XC878 M51 Desktop MAIN C UART H S8 XC878 MAP Ee MAIN H UART LST 1XC878 0pt Mes MAIN LST IUART OBJ 1XC878 plg ical 3 MAIN OBJ 1XC878 1XC878 rtf TEM BSTART VC AS 1XC878 asm 3XC878 SBR JASTART_XC LST 9XC878 COD 3lXC878 Uv2 ma START XC OBJ XC878 dav 1XC878_Opt Bak My Network Pla TOLC XC878 dpt XC878 Uv2 Bak simulator ini h Save as type AI Files ve caca File name Click Save Application Note 94 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Mouse position Project Window Targetl click right mouse button click Manage Components Y 7 XC878 pVision3 C XC878 simulator ini E le Edit View Project Debug Flash Peripherals Tools SVCS Window Help Ear Rc Eg 7s X SH lala sm e el enpe 3 3 Target la A QR EL ee ae LT MAP XIDORDFFODO EX Ux FFBPFF READ WRITE R Da Options for Target Target 1 m a Open XXC878 Map New Group Include Dependencies drip DS S nr r MAIN C B UART CIE TOT C E MAIN H IBI START El simulat Build target Target 1 assembling START 2C asl compiling MAIN c compiling 10 compiling UiRT C compiling TO1 C linking Program Size data 35 2 xdata 0 const 02 code 1467 creating hex file from CATO Coo O Error s O Warning s E s 3 Bui
17. Microsoft NET Framework 1 1 Wizards DMicrosoft NET Framework 2 0 Konfiguration Manages disks and P Microsoft NET Framework Configuration provides access to Microsoft NET Framework Wizards other tools to V Performance manage local and Services remote computers Telnet Server Administration Modified 12 11 2007 18 21 Size 1 52 KB Attributes normal 4 Sie Type Modified 1KB Shortcut 08 05 2008 10 26 2 KB Shortcut 12 11 2007 18 21 2 KB Shortcut 12 11 2007 13 40 2 KB Shortcut 12 11 2007 13 40 2 KB Shortcut 12 11 2007 13 40 1KB Shortcut 12 11 2007 14 58 1KB Shortcut 12 11 2007 14 58 2KB Shortcut 20 11 2007 16 30 1KB Shortcut 12 11 2007 14 56 1KB Shortcut 12 11 2007 14 56 2 KB Shortcut 08 05 2008 10 26 2 KB Shortcut 12 11 2007 13 40 2 KB Shortcut 12 11 2007 13 40 Manages disks and provides access to other tools to manage local and remote computers 1 52 KB E My Computer Application Note 21 V2 0 2008 09 oT t AP08079 In fi neon XC878 Easy Kit Cookery Book Click Device Manager Computer Management Action View ps Tree Computer Management Local Mig Biometric G Storage Y Disk Defragmenter Computer Services and Applications CJ Disk drives Display adapters anie drives Mj Human Interface Devices ES IDE ATA ATAPI controllers 4 KG IEEE 1394 Bus host controllers GER Keyboards xMice and other pointing devices
18. Peripheral Bus y Vater ACSTECLM Application Note 6 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book XC878 Block Diagram Source User s Manual Internal Bus 8 Kbyte LNM I 49 ER Boot ROM m P0 0 PO XC800 Core 256 byte RAM TMS f e T04 T1 UART MBC 64 byte monitor ry HI P1 7 TM ides e Jk Vese 52 64 Kbyte AN E PN YS p40 P47 T k d i WY XTAL1 Clock Generator M OCDS MuliCAN KAY XTAL2 4 Mhz On chip OSC IK PL VV Timer 2 Capture NI Timer 21 CH 1 Includes 1 Kbyte monitor ROM Flash Mer m 52KIGAK x 8 On Chip Debug Support 550 gt 8 bit Digital VO Boot ROM Capture Compare Unit DR x 8 8 bit Digital VO v XC800 Core Compare Unit 16 bit V amp bit Digital VO Timer 2 Capture AK Compare Unit l D 8 bit Digital VO 16 bit Ve Timer 21 16 bit ADC ik 10 bit EN gt 8 hit Digital VO 8 channel y v Watchdog Timer CORDIC MultiCAN 8 bit Analog Input Note Just by comparing the different sources of block diagrams you should be able to get a complete picture of the product and to answer some of your initial questions Application Note 7 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book i Cookery book For your first programming example for the XC878 Easy Kit Your program gt U SPY COM Window Enabled File Edit View Config Tools Window Help s gmjmjmm GEx J El co
19. a ala erm m e d e ex W ranset jan e Project Workspace TX 227 char input void 3 Target 1 228 Dave Files 229 char in 3 START XC i MAIN C IO Device Target Output Listing User c51 Ax51 xs ocate LX51 Misc Debug Utilities 3 UART C 8 TO1 C Configure Flash Menu Command Options for Target Target 1 ER E E gt E User Files amp Use Target Driver for Flash Programming 5 8 Simulator Files 3 simulator ir Infineon DAS Client for xXC800 l Update Target before Debugging nit Fie Zi Edit C Use External Tool for Flash Programming Command c800_FLOAD EXE E Jone uu ui TI Run Independent B Ip S X Build target Target 1 assembling START XC a51 compiling MAIN C compiling IO C compiling UART C compiling TO1 C linking Program Size data 35 2 xdata 0 const 202 code 1467 creating hex file from XcC878 XC878 0 Error s O Warning s Command Find in Files ES Emias UU Output Window Application Note 116 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Infineon XC800 DAS Driver Setup DAS Client Setup DAS Server select JTAG over USB Chip DAS Client Setup USCALE Device select check XC800 Family Flash Download Options check 9 Erase Used Sectors Flash Download Options check tick NM Program Flash Download Options check tick M Verify Flash Download Options
20. char 069 ifdef C51 070 define KEIL not really necessary to define since _ C51 is created by KEIL 071 endif 074 E f A ko ok ok ok ok o v o p o ob ok ok ok ook o o o v o ok ok ob ok o ok o o o ob o ob ok o ok ook ve o o ob o o ok e ok veo ve oe oe o oe e oe se oe ve o ve ak oe oe eoe oe 055 Prototypes Of Global Functions 076 E SOON oo ww ZZ IICRD COANE Der IMAN Ladders P e AS er Sr MAIN C B MAIN H Simulation Application Note 17 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Double click Main h and insert extern declarations Global Variables extern bit blinking extern volatile int RS232 wait Vid xC878 uVision3 C 1XC8781MAIN H E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help Gi e x sug mmeoc ccswe gw Cr la e ulala lea serm e 5 ge x v AfTargeti jan e Project Workspace E ff 9C Hv o s v ok e 2 ok v pk ok v o ok ok o o ok o o ok v o ok o ob ok v o o o o oe ok o o ok v v ok o o ok ve oe ve e oe o e o oe ve v oe ve e oe ve e oe ve e o oe ok o oe k ok ak amp 3 Target 1 Dave Files 739 USER CODE BEGIN MAIN Header 7 START XC a5l 749 5 8 MAIN C 741 USER CODE END A main h i A intrins h 744 Jf SOS SN ok v pk ok v ok ok o o o ok o o ok v p ok v o ok o o ok o o oe o oe o ok oe o ok ve v o ve oe ve e o ve e o oe ve v oe ve e oe ve ve oe oe
21. check tick M Reset and Run E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help E 4 79 X Gl y 41 44 gt 01018 a ala ev m Project Workspace x 27 char input void a Target 1 22850 5 5 Dave Files 228 char in H START XC 3 MAIN C P 4 10 Device Target Output Listing User c1 Ax51 LX51 Locate LX51 Misc Debug Utilities o UART C TO1 C Configure Flash Menu Command Options for Target Target 1 E ER El E User Files e Use Target Driver for Flash Programming 5 5 Simulator Files a simulator ir Infineon DAS Client for xXC800 Settings T Update Target before Debugging i Infineon XC800 DAS Driver Setup C Use Extern m DAG Client Setup Command Host Computer localhost Automatic Start Stop M Start with Debugger Arguments iv Stop with Debugger Device pXC800 Family USCALE Device None v Target Debug Options Flash Download Options LORD F4 C Erase Full Chip Iv Program PG Erase Used Sectors Iv Verify IST amp mo Ier C Do not Erase Iv Reset and Run X Build target Target 1 assembling START XC a51 compiling MAIN C compiling IO C compiling UART C compiling TO1 C linking Program Size data 35 2 xdata 0 const 202 Cancel creating hex file from XcC878 XCO78 O Error s O Warning s Command j Find in Files mE TE EEUU Click OK Clic
22. data 35 2 xdata 0 const 202 code 1467 creating hex file from XC878 XCO78 O Error s O Warning s Load C 11XC87811XC878 Searching for D S Server JT G over USB Chip DAS Server JT G over USB Chip is installed DAS Server JT G over USB Chip is not started yet Trying to start it now DAS Server JT G over USB Chip has been started successfully Erase Done Programming Done Verify Done Application running Iw 0r Br E START MAIN C UART C B T01 C B simulat B MAIN H t Window 3 14 4 gt gt Build Command j Find in Files 41 Rn E a a Su OE Ready Application Note 126 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Go back to U SPY and see the result gt U SPY COM Window Enabled File Edit View Config Tools Window Help com 08881868 i E COM Window Enabled Version XC878CLM 16FF Easy Kit xxx hello world xxx LEDs P3 ON LEDs P3 OFF LEDs P3 blinking your choice _ Name Sequence Ready Application Note 127 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Tick M 1 ke Transmit S pe Edit View Conte cow 8 8 e em SE Ei com Window Enabled See the result Application Note 128 V2 0 2008 09 See AP08079 In fi neon XC878 Easy Kit Cookery Book y U SPY Transmit File Ed
23. e o oe 2k ak oe k ok k 3 io h 5 Global Variables 3 uart h 746 ff FR v v o ok ok ok kk e v o o o o ok ok ve o v o o o ok ok veo ve o ve ee oe ve oe ve ve eo oe e oe ok ok i t01 h 747 748 USER CODE BEGIN MAIN Header 8 a 749 extern bit blinking 3 UART C 750 extern volatile int RS232 wait 2 8 TO1 C 751 USER CODE END E User Files 752 754 ESOO ok ok ok ok o ok 2k ok ok vk ok ok ok ok ok ok ok ok ok ok o ok ok o ok ak o ok ok ob ok ok ob o ok ok o ok ok ob ok vb ob ok v b ok oe oe ob oe ok o oe ok ok ok 755 Prototypes Of Global Functions 756 Df 7 PE A v v p ok s ok ok ve v v v v ob ok o ok ook ve o eo 758 USER CODE BEGIN MAIN Header 9 700 USER CODE END 763 E f FR v p o ok ok e v v v o ob ok ok ok o ok ve v v v o o ok o ok ook ve v v v o o ok o ok oe o ve o ve v ve o o e oe veo ve ve ve X ve e oe vec ve ve ak ve ak oe k oe k ok 764 GInterrupt Vectors 765 Jf f A v v v s ok ok ok ok e p o o o o ok ok ok o ok o do 767 USER CODE BEGIN MAIN Header 10 703 USER CODE END 71 772 Df A e o ok ok ok ok ok o p 2 o o ok ok ok o ok o o o o ok o ok ok ok ook o o o o o ob ok o ok ook ve o o v o o ok ook veo ve o ve o oe e oe e oe ve o ve oe e oe e oe e ok 773 GProject Includes 774 Jf f PE PE v v v ok o ok ok e v v v o p ok o ok e ode sl B o pr S MAIN C MAIN H Simulation 77 Application Note 78 V2 0 2008 09
24. of the microcontroller and the tool chain Additionally the hello world example can easily be expanded to suit your needs You can connect either a part of or your entire application to the XC878 Easy Kit You are also able to benchmark any of your algorithms to find out if the selected microcontroller fulfils all the required functions within the time frame needed Note The style used in this document focuses on working through this material as fast and easily as possible That means there are full screenshots instead of dialog window screenshots extensive use of colours and page breaks and listed source code is not formatted to ease copy amp paste Have fun and enjoy the XC878 Easy Kit Application Note 4 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book ELLE LHEEEEEELELELELEL ELTE UU Hbi i n a o p w wg TT ITU Hiliiitii Application Note 5 V2 0 2008 09 ME AP08079 In fi neon XC878 Easy Kit Cookery Book Used selected microcontroller XC878 Block Diagram Source Product Marketing Program amp Peripheral Bus a SSC 52 64 KB Flash MultiCAN Serial Interfaces 256 Byte RAM UART 64 Byte Monitor RAM Timer 2 Timer 21 3 KB XRAM CCU6 Ports o Boot ROM ADC System Control Unit T ft eer Watchdog Timer EVR POR Brownout Debug amp JTAG OSC amp PLL Program and Data Memory Bus interrupt A Unit Cordic
25. you try to access unexpected locations RESOLUTI ON Enable memory regions for absolute memory accesses using the MAP debugger command or the Debug Memory Map dialog Define all the memory ranges that your program is permitted to access Ensure that you set the permissions read write execute for each range to match your actual hardware You may put the required MAP commands into a debugger INI file that can be entered under Project gt Options for Target gt Debug gt Initialization file For example the content of such a file may be MAP OxF800 OxF8FF READ WRITE allow R W access to IO space MORE INFORMATI ON a Refer to MAP in the uVision User s Guide Application Note 89 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Cinfineon MAP Syntax Description MAP Displays the current memory map MAP start end READ WRITE EXEC VNM Maps the specified memory range start end accesses as specified MAP start end CLEAR Clears a mapped memory range Target programs you debug with uVision3 access and use memory u Vision3 uses the symbol information in your target program to automatically setup the memory map for most applications The MAP command lets you specify the memory areas your program uses that are not automatically detected by uVision3 When you run your target program u Vision3 checks each memory access to determine if it is outside the memory map If an invalid access is made u Vision3 rep
26. 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Generate Code File Generate Code DAVE will show you all the files he has generated File Viewer opens automatically Application Note 52 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Gd DAVE Generated Files in CCS E o pa li File View Options Add Ins Windows E X da Osa A Ow We amp 2 DAvE s Project Documentation Project ACS8 8 dav Controller AC8 8CM 16FF Compiler Keil Memory Model SMALL Date 04 09 2008 16 58 30 Please read this document carefully and note the red colored hints If you miss a file in the generated files list maybe you have forgotten to select the initialisation function of the related module Generated Files MAIN H MAIN C START XC A51 IO H IOC UART H UART C T01 H T01 C XC878 ASM ww 4 d AC8 8CLM C AXCD XXCD 8 dav E File Exit Save changes dick Y eS Application Note 93 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book Install the Tool chain 4 Using the KEIL u Vision 3 Development Tools You can download the Keil Development Tools http www keil com demo eval c51 htm EC C51 Version 8 16a Evaluation Software Request Infineon File Edit View Favorites Tools Help Back y gt 9 3 2 Search Folders Favorites A 2 Ze 4v SS X Rs ER Address la https www keil com demo eval c51 htm y Go Li
27. 1 Varning s Output Window 4 Build Command j Find in Files Note This step generates a makefile and shows the include files Application Note 96 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Configure Compiler Assembler Linker Locater Hex Converter Build Control Simulator Debugger and Utilities mouse position Project Workspace Files or click Target click right mouse button Options for Target Target Vc pVision3 W XC278 uVision3 File Edit View Project Debug Flash Peripheral us PANN NSN File Edit Vi amp v Project Debug Flash P auge 0 8 8 amp 4 a Tangeti amp E CS A DN Options for Target Target 1 Options for Target Target 1 Device check XC878 16FF Options for Target Target 1 Device tick Y Use Extended Linker LX51 Options for Target Target 1 Device tick Y Use Extended Assembler AX51 Options for Target Target 1 Device Target Output Listing User c51 4x51 L51 Locate Get Misc Debug Utilities Database Generic CPU Data Base vendor Infineon Device XUCS SCM TGFF Use Extended Linker L517 instead of BLS1 Toolset Col Use Extended Assembler Ax51 j instead of A51 fa TLE 7826 5051 compatible microcontroller with dual DPTR d XIC884 1 FRI 14 interrupt sources 4 priority levels CI XICSBB 1FR 8 channel 10 bit A D Converter O XC866 2FR suu eos S CapturefCampar
28. 2 Boot ROM 8 KByte Code Space Application Note Use On chip ROM Ox0 OxEFFF OxFOO0 OxF FFF Use On chip XRAM OxF000 0xFBFF FFF A GEF 6 0000 5 FFFFa 5 0000 4 EE 4 0000 3 FEF 3 0000 2 FFFFa 2 FEC0 2 FE00 2 FCOO 2 F000 2 E000 2 C000 2 0000 TEE 1 0000 0 FFFF D F0004 D 0000 a F FFFF4 F FCOO H F0004 6 FEFFs 6 0000 5 FFFFa 5 0000 4 FFF 4 0000 3 FFFFa 3 0000 2 FFFFa 2 FECO 2 FE00 2 FC004 2 F000 2 E000 2 C000 2 0000 TEE 1 0000 0 FFFF 4 0 0000 MEX3 Memory Extension Stack Pointer MEXSP Extension Stack RAM 99 Indirect Direct Address Address FF Intemal RAM Special Function Registers 80 TF Intemal RAM 004 _ A _ gt aual Internal Data Space V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Cinfineon Additional information Memory Map Source User s Manual Note Source User s Manual The standard amount of addressable program or external data memory or a Bank in an 8051 system is 64 Kbytes The XC800 core supports memory expansion of up to 1 Mbyte and this is enabled by the availability of a Memory Management Unit MMU and a Memory Extension Stack The MMU adds a set of Memory Extension registers MEX1 MEX2 and MEX3 to control access to the extended memory space by different addressing modes External Data Memory The 3
29. 3 DATA LED OFF printf message2 break 264 case 3 blinking 0N printf message3 break 265 266 USER CODE END 267 268 mexsp Ox f 269 states 5 694 2701 End of function main sec 0 00045510 971 H DSW 0x00 272 273E USER CODE BEGIN MAIN General i0 274 275 USER CODE END 276 277 v El fies Regs Q Books Funct S8 Templ 4 gt MAIN C E UART CIB 101 C B MAIN H B START E simulat M AS x Running with Code Size Limit 2K A jme Se TERN ug Load C 11XC87811XC878 Filter Execution All v Restricted Version with 2048 Byte Code Size Limit Frame Address Opcode in ttt Currently used 1813 Bytes 589 Include C 11XC87811simulator ini MAP X OxOFFOOO X O0xOFFBFF READ WRITE E n ASM ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet BreakAccess COVERAGE DEFINE DIR Display Enter v f e D e a lt lt gt T Build Command Find in Files DD y Ready Simulation ti 0 0004 Note No more ERROR 65 Application Note 107 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Start program execution Debug Run View Serial Window UART 1 Peripherals I O Ports Port3 Peripherals Timer TimerO Application Note 108 V2 0 2008 09 AP08079 Cookery Book XC878 Easy K neon f Infi I v uognoex3 ye nuuis El
30. 95 096 087 098 099 Bole Qa or er Application Note USER CODE BEGIN MAIN General 6 USER CODE END Jf f C AR ek ke e p o v v vb ok o o ob ok v o o o ve o ok ve o o eo ve oe ve o ve eoe ve e oe ve o ve aE oe ve t oe kk Global Variables Jf f C v v s ok p ok ook v o ok o o ok o ok ob o ok o o v o ok v o ok ok USER CODE BEGIN MAIN General code char menu n n n Version XC878CLM 16FF Easy Kit hello world n TA Ul s LEDS P3 Ein 2 aa LEDS P3 SR US ewe LEDS PS Blinkingin TT Aims code char question your choice code char messagel An LEDs P3 ON VXn code char message2 An LEDs P3 OFF n code char message3 Xn LEDs P3 BLINKING n volatile int RS232 wait 183 183 Timer 0 overflow 183 5461 333 ps 0 9994 s bit blinking 0N char select USER CODE END ISSO External Prototypes B MAING EL gt h Build Command Find in Files Bo KE L Simulation Z 73 V2 0 2008 09 AP08079 in fi neon XC878 Easy Kit Cookery Book Double click MAIN C and insert the function input char input void char in do printf question while RI RIZO in SBUF while in z 1 amp amp in 2 2 amp amp in 3 return in M XC878 pVision3 C XC878 MAIN C B File Edit View Project Debug Flash Peripherals Tools SVCS Wind
31. A TSO Pa U M A A A DUDU T T 8889X 903 ejeg 9 ISVI SEZ OIpn3S ensiA NYOZN C T SAH FAV AAV g00z edoun3 usijbu3 yola b13A 18320 eo1nosdey4 UEIUULIDEIN Joje n5 e5 IDIS AJUILMA MIA G Old dous uled Lr y y diti Serie e E p es jeoiunuluo pas eui 00 YOSOJA juloQgJeMogd Je x3 POM 7 A ox oe i MI 5 i gt Cc O JS BId Jalo dx3 S3JB ld T saun I BIDS SMOPUIAA jeujequ oonno Ja 0 dx3 e JOJN AN Jejnduio AN O i pa ei v PD ESI Ey o Gh GO a A o GE ml See AP08079 In fi neon XC878 Easy Kit Cookery Book Now start U SPY gt U SPY COM Window Enabled File Edit View Config Tools Window Help cow s Se ee 8 E 8 Bm COM Window Enabled ai Co Name Sequence quence Ready Application Note 120 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Config U SPY Config y U SPY COM Window Enabled File Edit View Config Tools Window Help Transmit Receive Editor Application Note 121 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book COM Port check insert COM7 Baudrate check insert 9600 Flow Control check insert Off Stop Bits check insert 1 Data Bit check insert 8 Parity check insert None U SPY Configuration COM Port COM Stop Bits f Y Baudrate 9600 Bps Data Bit la y Flow Control lor Y Parity None Y Data Auto Save Auto Save Every l
32. Add Files to Group Simulator Files M XC878 pVision3 C 1XC8781simulator ini E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help AsE EG ta BR QFE A ECH ea e a 4 aa a Si xj gg X 3 Target e l e El MAP X 0xOFF000 X 0x0FFBFF READ WRITE 8 START XC a51 bs A MAIN C 1 a9 TO1 C E User Piles _ Options for Group Simulator Files New Group Add Files to Group Simulator Files N amp Manage Components EE e Build targ assembling d Remove Group Simulator Files and its Files compiling compiling compiling linking Program Si creating n LU Include Dependencies rca ra put Window 3 Build Build Command Find in Files Find in Files Add Files to current Project Group Application Note 100 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Files of type select All files Click simulator ini Add Files to Group Simulator Look in er TO C SSTART XC LST XC878 1XC878 Opt amp TO H START XC OBJ 3XC878 asm s1XC878 plg STO LST 8I TO1 C 3XC878 COD 1XC878 rtf 1TO OBJ EI TO1 H s1XC878 dav 3XC878 SBR MAIN C S TO1 LST 3lXC878 dpt 31XC878 Uv2 MAIN H 1T01 0BJ 1XC878 hex slIXC878 Opt Bak S MAIN LST 8 UART C 1XC878 HTM slIXC878 Uv2 Bak IMAIN OBJ UART H s1XC878 Inp STET B IUART LST 1XC878 M51 sSISTART XC A51 I
33. Application Note V2 0 September 2008 AP08079 XC8 8CM 16FF XC878 Easy Kit Cookery Book for a hello world application using the KEIC tool chain Microcontrollers gt Infineon Never stop thinking Edition 2008 10 13 Published by Infineon Technologies AG 81726 M nchen Germany O Infineon Technologies AG 2008 All Rights Reserved LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND INCLUDING WITHOUT LIMITATION WARRANTIES OF NON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE Information For further information on technology delivery terms and conditions and prices please contact your nearest Infineon Technologies Office www infineon com Warnings Due to technical requirements components may contain dangerous substances For information on the types in question please contact your nearest Infineon Technologies Office Infineon Technologies Components may only be used in life support devices o
34. ETO File View Options Add Ins Windows on 002103 2 m a 2 Timer 0 Timer 1 Interrupts Functions Parameters Notes Timer Mode TMOD TOM Timer Options C ide 0 8 bit timer THO with a divide by 32 prescaler l Enable counter operation on C Pin P4 4 TO 0 Mode 1 16 bit timer THO TLO C Pin P1 1 TO 1 Mode 2 8 bit timer TLO with 8 bit auto reload Enable Gating Control Timer 0 THO F is enabled only while pin RN RR EXINTO is high GATEO c Mode 3 8 bit timer TLO and second 8 bit timer THO Turn on timer TRO Timer Registers hu 0x00 Lower byte of 16 bit timer TLO Interrupt Control Higher byte of 16 bit timer THO 0x00 dione interrupt of timer Timer overflow us TF0 461 333 XC878CLM new project A Note We need 183 Timer 0 overflows to achieve an approximate 1 second delay This will be handled in the Timer 0 interrupt function 183 5461 333 us 0 9994 s Application Note 40 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Timerl do nothing not used ed DAVE File View Options Add Ins Windows da DE 1 us METER Ia ota 2 Timer Mode TMOD T1M Timer Options e ER 0 8 bit timer TH1 with a divide by 32 prescaler T Enable counter operation on Pin P455 T1 0 C Mode 1 16 bit timer TH1 TL 1 Pin P15 T1 1 gt Mode 2 8 bit timer TL 1 with 8 bit auto reload Enable Gating Control Timer 1 TH1
35. Easy Kit Cookery Book C51 Code Optimization click W Linker Code Packing max AJMP ACALL Options for Target Target 1 Device Target Output Listing User C51 4x51 Lx51 Locate LxS1 Misc Debug Utilities Preprocessor Symbols Define Undefine Code Optimization Warnings Warninglevel 2 Y Level amp Reuse Common Entry Code k Bits to round for float compare 3 Emphasis Favor s eed y T Global Register Colorin is i Iv Interrupt vectors at address 00000 II Linker Code Packing max AIMP f ACALL E d Keep variables in order Don t use absolute register accesses J Ww Enable ANSI integer promotion rules Include Paths Misc Contrals Compiler JOBJECTADVANCED BROWSE DEBUG CODE contral string Cancel Defaults Application Note 65 V2 0 2008 09 et AP08079 In fi neon XC878 Easy Kit Cookery Book AX51 do nothing Options for Target Target 1 Device Target Output Listing User cst Asp Lx51 Locate x1 Misc Debug Utilities Conditional Assembly Control Symbols Set Reset Macro processor M Standard T MPL Case sensitive symbols Include Paths Misc Contrals Assembler SET SMALL DEBUG EP contral string Cancel Defaults Application Note 66 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book LX51 Locate do nothing Options
36. MAIN C compiling IO C compiling UART C compiling TO1 C linking Program Size data 35 2 xdata 0 const 202 code 1467 creating hex file from XC878 XCO78 D Error s O Varning s ww 8 4 Build Command Find in Files Ready BE Simulation Z Application Note 83 V2 0 2008 09 Cinfineon AP08079 XC878 Easy Kit Cookery Book Now we close our project and u Vision 3 Project Close Project File Exit Application Note 84 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book 5 Using the Simulator first we will test our program with the Simulator Start Keil u Vision and open our Keil Project If you see an open project close it Project Close Project Project Open Project Select Project File Look in choose CAXC878 1 Select Project File Files of type select Project Files uv2 2 Click XC878 Uv2 3 Click Open Select Project File History ue Desktop My Documents E My Computer n m rr My Network Pla Files of type Project Files uv2 mpw Cancel E Note From now on just open your u Vision project not the DAVE project u Vision will automatically recognise if there has been a code regeneration done by DAvE Application Note 85 V2 0 2008 09 AP08079 in fi neon XC878 Easy Kit Cookery Book Check the configuration of the u Vision simulator mou
37. Modems Monitors BI Network adapters PCMCIA adapters Ports COM amp LPT JB secure Digital host controllers Me Smart card readers GE sound video and game controllers System devices Universal Serial Bus controllers Application Note 22 V2 0 2008 09 ME AP08079 In fi neon XC878 Easy Kit Cookery Book Expand Ports COM amp LPT Expand Universal Serial Bus controllers Ci Computer Management S Action View e 9 E Tree z al Managemer a 7 ip Keyboards i mar bp BE 7 Mice and other pointing devices Sa Services and Annlicl a Modems E um Monitors BJ Network adapters E a PCMCIA adapters E a Ports COM amp LPT m E Communications Port COM1 _ Y Infineon XC800 USB COM Port COM7 Jg Printer Port LPT1 I Secure Digital host controllers d Smart card readers de Sound video and game controllers E Ul System devices E Universal Serial Bus controllers wem Generic USB Hub oe Infineon XC800 USB COM Port sim Infineon XC800 USB Debug vm Intel R ICH8 Family USB Universal Host Controller 2830 m Intel R ICH8 Family USB Universal Host Controller 2831 ve Intel R ICH8 Family USB Universal Host Controller 2832 GE Intel R ICH8 Family USB Universal Host Controller 2834 ped Intel R ICH8 Family USB Universal Host Controller 2835 eum Intel R ICH8 Family USB2 Enhanced Host Controller 2836 v Inte
38. NG This program is protected by copyright law and a ny wire international reaties any device 2 Cancel Application Note 14 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book amp DAS InstallShield Wizard q Es InstallShield Wizard Completed The Installshield Wizard has successfully installed DAS Click Finish to exit the wizard Cancel Click Finish Application Note 15 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Connect the XC878 Easy Kit to the host computer n TT NBA mit ti A eee TT mm I S x Ls SS D USB Connection lS RRA SS M A LA USB Connection used for UART communication the UART RS232 serial interface 1s available via USB as a virtual COM port of the second USB channel of the FTDI FT2232 Dual USB to UART JTAG interface used for On Chip Flash Programming and Debugging first USB channel of the FTDI FT2232 Dual USB to UART JT AG interface the USB connection works also as the power supply Application Note 16 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book do LAN USB to UART mii USB to JTAG Application Note 17 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Found New Hardware DAS JT AG over USB aCe ys ER Note A USB driver is installed the first time while
39. R CODE END If you wish to change DAvE s generated code or add code outside these USER CODE sections you will have to insert modify your changes each time after letting DAvE regenerate code Application Note 71 V2 0 2008 09 AP08079 Jur In fi neon XC878 Easy Kit Cookery Book Double click MAIN C and insert Global Variables code char menu Aninin Version XCS78CLM 16FF Easy Kit hello world n An 1 LEDs P3 ON n 2 LEDs P3 OFF n 3 LEDs P3 blinking Ma code char question your choice code char messagel An LEDs P3 ON Ap code char message2 An LEDs P3 OFF n code char message3 An LEDs P3 BLINKING n volatile int RS232_wait 183 183 Timer O overflow 183 5461 333 us 0 9994 s bit blinking ON char select Application Note 72 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book NU xC878 pVision3 C XC878 MAIN C B File Edit View Project Debug Flash Peripherals Tools SVCS Window Help iE 4 79 e a laan lt gt 01018610 ua aer m A Target 1 weld uu SETE Bele Shines Project Workspace M o Target 1 Dave Files E START_XC a51 s MAIN C 2 8 IO C s B UART C 2 8 TO1 C t3 User Files 066 06 068 069 070 071 072 073 074 075 076 077 078 073 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 0
40. UART OBJ 3XC878 MAP File name simulator in Files of type A files Close Z Click Add Get Filetype for simulator ini Type select Text Document file Click OK Click Close Application Note 101 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Y y XC878 pVision3 C 1XC8781 simulator ini E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help ES vial zm 4 pial amp om MAP E 0x FPFDOUD H OxXUFFBFF READ WRITE ER SE 2s 4 S um Ier r simulat lIBuild target e Target 1 assembling START ZC as5l compiling MAIHNH cC compiling 10 compiling UART c compiling TO01 cC linking Program Size data 35 2 xdata 0 const 202 code 1457 creating hex file from COTO COTTO O Error isa O Warning s tout Window 8 4 gt gt h Build Ready Application Note 102 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book mouse position Project Workspace Files or click Target click right mouse button Options for Target Targetl KA XC 78 pVision3 File Edit View Project Debug Flash Peripheral So a BA oe ee 7s X a File Edit Y w Project Debug Flash P emmuexiWwa egti ola Besig Nelncle nz A Target 1 ns Options for Target Options for Target Targetl Debug click Options for Target Target 1 Device Targ
41. View Project Debug Flash Peripherals Tools SVCS Window Help asugi EEE viaje lt gt alsa ala aer m G E eX Target ar Project Workspace x 224 Jf f T v v ok ok e p o ok v ob ok o o o o ok v o ok o o v ob ok o o ok ook tae 3 Target 1 225 3 5 Dave Files 226 USER CODE BEGIN MAIN Main 1 3 START XC a51 227 char input void E oe char in 8IOC 230 do UART C 231 TO1 C 232 printf question E User Files 233 while RI 234 RI 0 235 in SBUF 236 while in 1 amp amp in 2 amp amp in 3 237 return in 238 233 USER CODE END 240 241 void main void 2428 243 USER CODE BEGIN MAIN Main 2 244 245 USER CODE END 246 247 MAIN vInit 248 249 USER CODE BEGIN MAIN Main 3 while RS232 wait uum 251 USER CODE END 252 253 while l 254 1 255 256 USER CODE BEGIN MAIN Main 4 257 258 USER CODE END 259 260 261 22 End of function main 263 v 4 gt L B S Tu Ier 115 MAINC NUN E E c pi E ety d x Z lt 141 gt gt Build Command Find in Files D D Simulation A Application Note 75 V2 0 2008 09 ME AP08079 In fi neon XC878 Easy Kit Cookery Book Double click MAIN C and insert the following code in the main function into the while 1 loop printf menu select input switch select
42. al Divider control register 182 BCON l 0x01 load baud rate control register 153 154 165 USER CODE BEGIN UART Init 3 166 TI 1 167 USER CODE END 158 1691 End of function UART vInit 170 TRI 1728 USER CODE BEGIN UART General 10 173 174 USER CODE END 175 TAB B Je ro ne r MAIN C B MAIN H El UART C ETT uita 4 n D E EE Application Note 80 V2 0 2008 09 e tt AP08079 In fi neon XC878 Easy Kit Cookery Book Double click TO1 C Insert the following global variable unsigned char Timer 0 interrupt counter O0 I XC878 pVision3 C XC878 T01 C E EFile Edit View Project Debug Flash Peripherals Tools SVCS Window Help ell ERT IECH ze Es v va m a mm zap e 5 ge ex Target jan e x Project Workspace X 053 3 13 Target 1 054 E f PE P vk ok e o ok ok ok o o o ok ok o v o ok o ok v o ok ob o ooo e 3 3 Dave Files 05 GTypedefs START XC a51 056 ff TC v v ok ok o o ok o ok ok ok o o ok o ok o ok o o ok vk o o ok o o o ok o o ok vk o o ok o o ok ok o o ok ov o o ok o o ok ok o o o v ob oe oe 2 oe oe ve ak oe ve ok ok oe ok ok ak k E MAIN C 057 BOC 058 USER CODE BEGIN T01 General 5 malen 053 e 8 UART C o60 USER CODE END 3 TOLC 061 User Files 062 063 E OOO ooo 064 Imported Global Variables 065 E f 7 v vk ok vk
43. are Application Note 111 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book 6 Using real hardware OnChipFlash Programming Make sure that the XC878 Easy Kit 1s still connected to the host computer USB Connection used for UART communication the UART RS232 serial interface is available via USB as a virtual COM port of the second USB channel of the FTDI FT2232 Dual USB to UART JTAG interface used for On Chip Flash Programming and Debugging first USB channel of the FTDI FT2232 Dual USB to UART JT AG interface the USB connection works also as the power supply Application Note 112 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Start Keil u Vision and open our Keil Project If you see an open project close it Project Close Project Project Open Project Select Project File Look in choose CAXC878 1 Select Project File Files of type select Project Files uv2 2 Click XC878 Uv2 3 Click Open Select Project File History a De ktop My Documents My Computer Sc RK My Network Pla Files of type Project Files uv2 mpw Cancel Zo Application Note 113 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Check configure the configuration of the Flash Programming Utility mouse position Project Workspace Files or click Target click right mouse button
44. as shown in the User s Manual and above Application Note 42 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Functions Initialization Function tick v TOI vInit ed DAVE File View Options Add Ins Windows da DE 1 us Gd Timer 0 1 E GER Initialization Function Source File v TO1_vinit TO1 vinit File name TO1 C Function Library F TO1 vStartTmr fron vstatTm T TO1 vStopImr TO1_vStopTmr T TO1 vClearTmr Dm vCleaTmr M TO1 ReadTmr TO1_ReadTmr T TO1 vLoadTmr TO1_vLoadTmr E TOI viTmr Dm viTmO F T01 viTmri ivi F 01 vStartTmri Dm vstatTm M T01 vStopTmr1 TO1_vStopTmrt XC878CLM new project AL Parameters do nothing Notes If you wish you can insert your comments here Exit this dialog now by clicking Kai the close button Application Note 43 V2 0 2008 09 ur AP08079 In fi neon XC878 Easy Kit Cookery Book Configure Port 3 to Output Fi 3 rieg sb an i CP pr Es e E La 4 A i SE eine EE m P id 7 Ge lt i 4 e SH ll sm Keser Inc 1 Des e As ced 2 d Tt XC878CLM new project Note The User LEDs red are connected to Port 3 V2 0 2008 09 44 Application Note etc AP08079 In fi neon XC878 Easy Kit Cookery Book Additional information Parallel Ports General Structure Source User s Manual Px PUDSEL W P
45. ata9 JUART_vSend Data9 Multiprocessor Communication M UART_vSendAddr UART_vSendAddr F UART_bOwnAddress UART_bOwnAddress F UART wWakeUp UART_vWakeUp FT UART_vGotoSleep UART_vGotoSleep XC878CLM new project A Note You can change function names e g UART_vInit and file names e g UART C anytime Application Note 37 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Parameters do nothing File View Options Add Ins Windows n Dau fios E DAVE XC878CLM Release v Si UART Serial Interface KR a 2 XC878CLM new project E Notes If you wish you can insert your comments here Exit and Save this dialog now by clicking E the close button Application Note 38 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Configure Timer TO File o Add Ins Windows ta EE NOE Foe tul TENA mee le ES i FAA Exa r 3 net XC878CLM new project 4 Note The LEDs on Port_3 will be blinking if selected in the main menu with a frequency of about second done in the Timer_O Interrupt Service Routine Therefore we have to configure Timer_0 Application Note 39 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book TimerO Timer Mode click Mode 1 16 bit timer Timer0 Timer Options tick v Turn on timer TRO Timero0 Interrupt Control tick Y Enable interrupt of timer
46. comments here Exit this dialog now by clicking ba the close button Application Note 49 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Functions Initialization Functions tick v IO vlInit Functions Function Library tick v IO vSetPin Functions Function Library tick v IO vResetPin Functions Function Library tick v IO vTogglePin File View Options Add Ins Windows Je Dum f us e DAvE XC878CLM Release v1 1 da 2 Initialization Function Source File IO vlnit IO vinit File Name Function Library T IO ubReadPin IO ubReadPin IO vSetPin IO vSetPin IO vResetPin IO vResetPin F IO ubReadPort O ubReadPot M 10_wWritePort O vwrtePot T IO vSetlnput lO_vSetnput T IO vSetOutput O vSetOupu IO vTogglePin IO vTeggePin XC878CLM new project A Parameters do nothing Notes If you wish you can insert your comments here Exit this dialog now by clicking Bai the close button Application Note 90 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Save the project File Save Save project Save in C XC878 create new directory I Create New Folder 1 File name XC878 2 Save project Save In E Histo ry JN De e kt op My Documents IE baak My Computer My Network Pla File name Save as type DAVE project file dav Save Application Note o1 V2 0 2008
47. connecting the XC878 Easy Kit via USB to your host computer Note A default virtual COM Port is generated Application Note 18 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Using a Windows 2000 operating system we are now going to search for the virtual COM Port which was generated after connecting our XC878 Easy Kit Start Settings Control Panel E s E oO P Mo e My Computer My Network File Explorer Outlook Internet Windows Media iTunes Nero Burning PowerDVD Places plorer Player Rom m xx val e o Tb Word Excel PowerPoint Microsoft Office Gina Start Defrag Communicat gt v m m 9 Paint Shop Pro 5 i view WinMerge Calculator Macmillan MapSource tei Vergleich English Europe 2008 772 Install Remove W Le is mm a e Office Applications U2CAN Visual Studio EasyCASE C Docklight XC888 v1 1 2005 file explorer 5 WinZip mn Ee e 3l 2 G El e E explorer exe UDE 2 02 03 DAS Server DAS Basic Client REMOVE DAS Show Delete Control Panel COMs Network and Dial up Connections amp Printers 2 Taskbar amp Start Menu Ce gS E HiTOP52 U CA XC164CM CAN CCleaner Profile Space Recycle Bin Monitor at 1 Cleaner SB Paint Sh CN 23 5 1D IP S CI ex Edu J 13 49 Application Note 19 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book Double click Administrative Tools amp Control Panel File Edit V
48. e Debug Session Settings Restore Debug Session Settings I Breakpoints v Toolbox I Watcnpaints amp PA Breakpoints I Toolbox Mo M atchpoints M Memory Display Ww Memory Display CPU DLL Parameter Driver DLL Parameter 58051 DLL bro EA MES 58051 DLL Dialog DLL Parameter Dialog DLL Parameter cores DLL boren rosen DLL Iren Cancel Defaults Note First we are going to use the simulator we will use the debugger later Application Note 69 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Utilities do nothing Options for Target Target 1 e x Device Target Output Listing User c51 Ax51 x51 Locate Lx51 Misc Debug Utilities Configure Flash Menu Command C Use Target Driver for Flash Programming v Settings Update Target betore Debugging Init Fie B Edit e Use External Tool for Flash Programming Command C800 FLOAD EXE E Arguments pen I T Run Independent Cancel Defaults Click OK Note First we are going to use the simulator we will do the flash programming later Application Note 70 V2 0 2008 09 ur AP08079 In fi neon XC878 Easy Kit Cookery Book Insert your application specific program Note DAVE doesn t change code which is inserted between USER CODE BEGIN and 4 USER CODE END Therefore whenever adding code to DAvE s generated code write it between A USER CODE BEGIN and USE
49. e Unit tor HAM CCUG A NA 4 TimersiCounters Watchdog Timer SOS C tel AER MOL AN with 2 nodes and 32 message objects M CAN Multiplication Divis 256 byte on chip RAM 30 72 byte on chip XRAM d xC866L 4FR 8KB Boot ROM 60 Kbyte on chip Program Flash d XC878 13FF 4 Kbyte on chip Data Flash 2 X38 78 1 6FF On chip Debug Support OCDS via JTAG fa XC8 78 9FF Ed XC878C 13FF ER XC878C 16FF ER X8 GCM T3FF Ex XE 86M T6FF Cancel Defaults Application Note 57 V2 0 2008 09 et AP08079 In fi neon XC878 Easy Kit Cookery Book Target tick v Use On chip ROM amp Target tick v Use On chip XRAM Options for Target Target 1 Device Target Output Listing User c51 4x51 Lx51 Locate Lx51 Misc Debug Utilities Infineon XC878CM 16FF tal MHz i 44 0 Use On chip ROM Oxo OxEFFF xFOOO OxFFFF Memory Model Small variables in DATA Code Rom Size Large 64K program y Use On chip XRAM 0xF000 0xFBFF Operating system Nome T Use multiple DPTR registers Off chip Code memory Off chip data memory Eust Ham Ham Ham Size I Code Banking Start End far memory type support Banks 2 v Bank Area pxo000 OxFFFF Save address extension SFR in interrupts Cancel Defaults Application Note 98 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book Additional information Memory Map Source User s Manual Bank
50. et Output Listing User c51 4x51 Lx51 Locate Lx51 Mise Debug Utilities Use Simulator Settings C Use y Settings Limit Speed to RealTime v Load Application at Startup M Run t main v Load Application at Startup T Run to main Initialization File Initialization File BEbe4dl E Restore Debug Session Settings Restore Debug Session Settings M Breakpoints Ww Toolbox v Watcnpaints amp PA M Breakpoints kW Toolbox iv M atchpoints Ww Memory Display Ww Memory Display PU DEE Parameter Driver DLL Parameter 58051 DLL m8051 EA MEX 58051 DLL Dialog DLL Parameter Dialog DLL Parameter cores DLL boren rosen dE boren Application Note 103 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Click select simulator ini Select Simulator Initialization File De s ktop 1 My Documents My Network Pla File nare simulator ini Y Files of type Ini Files ini Cancel Open as read only Z Click Open Application Note 104 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Options for Target Target 1 B wl Device Target Output Listing User c51 4x51 Lx51 Locate Lx51 Mise Debug Utilities Use Simulator Settings Use y Settings Limit Speed to RealTime v Load Application at Startup Ww Run to main M Load Application at Startup T Run te main Initial
51. for Target Target 1 Device Target Output Listing User c51 Ax51 UX 1 Locate Lx51 Misc Debug Utilities i Use Memory Layout from Target Dialog Reserve C XDATA lt OxFO000 lt 0xXFBFF HDATA 0xFO00 X OxF BFF classes ECODE C 0x0 C OxXFFFF HCONST C 0x0 C OxFFFF User classes User PA Segments Linker control sting CODE TO XCa8 fa Cancel Defaults Application Note 67 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book LX51 Misc do nothing Options for Target Target 1 Device Target Output Listing User c51 4x51 Lx51 Locate 151 Misc Debug Utilities Warnings Level 2 y disable Warning Numbers use linker control file Create Browse Edit IT Create relocatable output file LINKONLY Case sensitive symbols ASSIGN P w A E Overlay Misc contrals Linker TO xC878 contral sting CODE h Cancel Defaults Application Note 68 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Debug do nothing Options for Target Target 1 E X Device Target Output Listing User c51 4x51 Lx51 Locate Lx51 Mise Debug Utilities Limit Speed to m se Simulator Settings C Use y Settings v Load Application at Startup Ww Run to main M Load Application at Startup T Run to main Initialization File Initialization File Restor
52. get rid of error 65 we should look at either http www keil com support docs 814 htm or the next two pages to better understand the problem Application Note 88 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Infineon HVISION DEBUGGER ERROR 65 ACCESS VIOLATION Information in this article applies to n uVision All Versions n Cx51 All Versions SYMPTOMS My project includes a variable that access using an absolute memory address The uVision Debugger generates the following error whenever I try to write to the variable xxx Error 65 Access violation at 0x00000004 No write permission have specified this memory area to the linker but still receive this error CAUSE When the uVision Debugger loads an executable program it creates a memory map using the program and data segments from the program Code segments are marked as executable while data segments are marked as read write All other memory is unmapped and is therefore not marked for any type of access The uVision Debugger checks that all memory accesses are made to objects that are defined in your C program For any access that is outside of a defined C object the Ju Vision debugger generates an error 65 access violation message By default the debugger allows only memory accesses to valid data objects This is useful for finding uninitialized or incorrectly initialized pointers for example Usually there is a programming error when
53. gt Never stop thinking Get Product information Y Selecta Category X co Home gt Microcontrollers gt Development Tools Software and Training gt XC800 Development Tools and Software S Print Page Send Page gt Starter Kits Evaluation Boards and Application Kits gt Easy Kit XC878 Download Service XC878 Easy Kit CD 1 0 for download zip 185 72 MB MCU Derivatives SAX XC878CM 185FF A CPU Clock 24 MHz On Chip Memory 3 kByte RAM 52 64 kByte Flash incl up to 4kByte data flash Interfaces USB Connector for power supply UART communication and flash downloading LIN via Header CANOM via Header and via 9 Pin male D Sub JTAG via Header or via USB with built in mini yiggler Includings USB Cable CD Evaluation Board Technical Documentation e g user manuals CD Free unlimited source code debugger CD Evaluation Versions of development Tools e a Compiler Debugger D amp vE CD Examples with Tutorial Notes Order Hr KIT XC878 EK vi Price 99 EUR How to order To order your kit please click here TN S al aen It fi Documents Contact us Document Types v Downloads Title Date Version Size Downloads e XC878 Easy Kit CD Version 1 0 for download XC878 easykit CD Vi D zip 05 Jun 2008 v1 0 185 7 MB Home Company Investor Press Careers Infineon worldwide 2 1999 2008 Infineon Techn
54. h 120 E Page Length es ES Select Folder tor Listings d al d d SS I E Compiler Listing lei I Conditional T Symbols RBinclude Files Assembly Code Bi c Preprocessor Usting 4 Assembler Listing st Ww Conditional m Symbols Macros Final expansion only w TC Cross Reference Linker Listing AxXCs S map I Memory Map Public Symbols lM Line Numbers Cross Reference Iv Local Symbols v Comment Records Ww Generated Symbols Linker Code Listing cod Ww Library Symbols Cancel Defaults Note With the cod file you can do the following 1 position the mouse on the source code you are interested in 2 click right mouse button and select Open Linker COD File 3 see the result Assembler Code of your C Source Code Application Note 63 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book User do nothing Options for Target Target 1 Device Target Output Listing User leen 4x51 Lx51 Locate x1 Misc Debug Utilities Run User Programs Before Compilation of a C File IT Run 1 EIN nS Io r Rund IT DOSI amp Run User Programs Before Build Rebuild Run 41 o El PIE Ie Run z zT ipsis Run User Programs After Buila Rebuild NEUE os Ll D T Run 2 B Ml T Start Debugging Ww Beep when Complete OK Cancel Defaults Application Note 64 V2 0 2008 09 et AP08079 In fi neon XC878
55. ical memory mapped You may simulate such I O devices with the Memory Window provided in the u Vision debugger Since the C user program does not contain any variable declarations for such memory regions it 1s required that you map this memory with the MAP command MAP 0x100000 0x100FFF READ WRITE MAP memory for I O area Application Note 90 V2 0 2008 09 Cinfineon ry Book XC878 Easy Kit Cookery Book Debug Start Stop Debug Session Vi XC878 pVision3 C XC878 START_XC a51 C File Edit View Project Debug Flash Peripherals Tools SVCS Window Help cwcug mm E Start Stop Debug Session STRG FS 2 x gt mim emm Start Stop Debug Session File New M XC878 uVision3 C XC8 BiFile Edit View Project Debug Flash Per dei New STRG N Application Note 91 V2 0 2008 09 Infineon Insert AP08079 XC878 Easy Kit Cookery Book MAP X 0xOFF000 X 0x0FFBFF READ WRITE BankF A XA Bank E Bank D Bank C Bank B Bank A Bank 9 Bank 8 Bank 7 Bank 6 Bank 5 Bank 4 Bank 3 Bank 2 AAA Boot ROM 8 KByte Bank 0 HA l Code Space Application Note PFE 6 0000 5 FFFFa 5 00004 4 EE 4 0000 EE 3 0000 2 FEF 2 FECOs 2 FE00 2 FCOO 2 F000 2 E000 2 C000 2 00004 TEE 1 0000 0 FFFF D F0004 D 0000 Ve Lg Data Space F FFn F FCOO F F000 F 0000 E FFEF E 0000 D FFFF 4 0000
56. iew Favorites Tools Help Back v amp Search Folders A 4 X Dw el a Address Control Panel v Go E 112 Pe a ie S B Y YN 2 Accessibility Add Remove Administrative Automatic Date Time Display Fax Folder Options Fonts Gaming Options Control Panel Options Hardware Programs Tools Updates Use the settings in Control Panel to ec S S eh kk gt personalize your MY gd LA 5 E e 2 4 computer Internet Options Java Keyboard Mail Mouse Nero BumRights Network and NVIDIA nView Phoneand Power Options Printers Dial up Co Desktop Ma Modem Options view its description GE 9 J 9 sg a 8 e Windows 2000 Ki gt Support QuickTime Regional SAP SAPConsole Scanners and Scheduled Tasks Sounds and Speech System Text Services ThinkPad Options Configuration Administrator Cameras Multimedia Configuration ThinkVantage Users and Wireless Link Active Prot Passwords i 36 object s ied My Computer Application Note 20 V2 0 2008 09 Infineon AP08079 XC878 Easy Kit Cookery Book Double click Computer Management t Administrative Tools File Edit View Favorites Tools Help Back v 3i Search Folders 4 US Ze Address Administrative Tools a Tools Computer Management Shortcut Name Component Services Computer Management Administrative Data Sources ODBC Event Viewer S Local Security Policy B Microsoft MET Framework 1 1 Configuration
57. it View Config Tools Window Help cow z uw s e amp E amp d El COM Window Enabled your choice 16 03 20 733 TX gt 1 16 03 20 795 RX gt xxx LEDs P3 ON xxx Version XC878CLM 16FF Easy Kit xxx hello world xxx LEDs P3 ON LEDs P3 OFF LEDs P3 blinking your choice Ready And also check the result on your XC878 Easy Kit Application Note 129 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Conclusion In this step by step book you have learned how to use the XC878 Easy Kit together with the Keil tool chain Now you can easily expand our hello world program to suit your needs You can connect either a part of or your entire application to the XC878 Easy Kit You are also able to benchmark any of your algorithms to find out if the selected microcontroller fulfils all the required functions within the time frame needed Have fun and enjoy working with the XC878 Easy Kit Note There are step by step books for 8 bit microcontrollers e g XC866 and XC88x 16 bit microcontrollers e g Cl6x XC16x XE16x and 32 bit microcontrollers e g TC1796 and TC1130 All these step by step books use the same microcontroller resources and the same example code This means configuration steps function names and variable names are identical This should give you a good opportunity to get in touch with another Infineon microcontroller family or tool chain There a
58. ization File Initialization File be Jo Restore Debug session settings Restore Debug Session Settings I Breakpoints i Toolbox Iv Watcnpaints amp PA Breakpoints I Toolbox v MW atchpoints Ww Memory Display Ww Memory Display CPU DLL Parameter Driver DLL Parameter 58057 DLL bro EA MES 58051 DLL Dialog DLL Parameter Dialog DLL Parameter cores EME boren rosen DLL boren OK Cancel Defaults Click OK Application Note 105 V2 0 2008 09 AP08079 SC re In fi neon XC878 Easy Kit Cookery Book Start the u Vision Simulator again Debug Start Stop Debug Session AN EVALUATION MODE Running with Code Size Limit 2K OK Application Note 106 V2 0 2008 09 e AP08079 In fi neon XC878 Easy Kit Cookery Book NU E XC878 pVision3 C XC878 MAIN C _ olx B File Edit View Project Debug Flash Peripherals Tools SVCS Window Help n e x asuug EEA a ja e gt sana aer m AER moo venere sema E Register Value pd Ge T Lugo 24 USER CODE BEGIN MAIN Main 3 de Se 20 while RS232 wait a pd i USER CODE END r2 0x00 252 r3 Geck 253 while 1 r4 0x00 254 255 256 USER CODE BEGIN MAIN Main 4 257 printf menu 258 select input 259 260 switch select 261 262 case 1 blinking OFF P3 DATA LED ON printf messagel break 263 case 2 blinking OFF P
59. k OK Application Note 117 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book Install U SPY Note Now we need a terminal program which is able to handle our virtual COM port COM 7 As an example of any terminal program we are going to use U SPY U SPY can be found either on the XC878 Easy Kit CD USPY_install exe ed unautnoriz T gerni d u ed doy m ROM E d Nos E a L oo WW Ors L P QU e Za k T j E c nfineon d gt Never Stop thinking XC878 Easy Kit Microcontroller A Development Kit CD Version V1 0 USB Powered Onboard All r Docum p Evaluation Board FERE Debug Interface quired Software 4 entation soft copy d or on your microcontroller DVD To install U SPY execute USPY_install exe Application Note 118 V2 0 2008 09 AP08079 Xx O O D gt o mr i x Se A T a PAP O e gt Jauea U uig p v y eoeds e yoJg Jeuea 22 u E e re 60 O Sai eultjo gt lt squswinsog AN 03 3n2110uS 2 L G SWOD eje sq ous d d AdS N 3ubippog beyag E Woy Buluing ey CAGIaMod Infineon PE rez V2 0 2008 09 8L80X FAY us qed Zo80dV x ues pl T Je JOJUO A TIO A TIE ZA DISSEJO NVO INOFOTOX VI MZSdOLIH XA 10341 303 210941 FH G CL BA SICCA XA 99TO SE 9979 TE 9A 999 d d w A US IOnuO T SV SAOWSY 4481 9 seg Sya JeAl9es SV LU c0 c AGN e9T8A TSO ST8 TSO 97T8
60. l R ICH8 Family USB2 Enhanced Host Controller 283A E BE USB 2 0 Root Hub Application Note 23 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book 2 DAvE Installation for XC878 microcontrollers Install DAvE mothersystem Download the DAVE mothersystem setup exe O http www infineon com DAvE Title Version Tool Package DAVE Mothersystem latest version US Feb 2007 W21 r24 DAVE Mothersystem 04 Jul 2006 421123 and execute setup exe to install DAVE Note Abort the installation of Acrobat Reader Application Note 24 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Install the XC878 microcontroller support update XC878 DIP file 1 Download the DAvE update file DIP for the required microcontroller http www infineon com DAvE Title Version Size Development Tools CA ACaacLM DIP file for DAME Microcontroller Configuration Toolj latest version DG Jul 2008 v1 1 ACOFOCLM Zip Unzip the zip file X C878CLM zip and save XC878CLM DIP e g DADAvE1YXC878 2008 09 04AXC878 dip Application Note 25 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book 3 View Setup Wizard Default e Installation Forward Select e I want to install products from the DAvE s web site Forward Select D DAVE XC878 2008 09 04 Forward gt Select Available Products click w XC878CLM Forward gt Ins
61. ld Command 4 Find in Files Setup File Extensions Books and Environment Application Note 95 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Components Environment and Books User Files Application Note 96 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Project Components Groups click New Insert Components Environment anu Books xX Froject Components Folders Extensions Books Project Targets NX A Groups in Files x44 Dave Files RT XO abl User Files Set as Current Target Add Files cancel Application Note 97 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Insert Simulator Files Components Environment and Books Project Components Folders Extensions Books Project Targets QUY Groups 21 14 Files AF Dave Files User Files Simulator Files Set as Current Target Add Files Click OK Application Note 98 V2 0 2008 09 AP08079 Jur In fi neon XC878 Easy Kit Cookery Book NV y uVision3 B File Edit View Project Debt ELA 3m noe e 5E ex iw x Tageti Project Workspace X A MAIN C A IO C LIART C MES TOLC 3 User Files E Simulator Files Application Note 99 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Mouse position Project Window Simulator Files click right mouse button Click
62. m window Enabled LEDs P3 ON LEDs P3 OFF LEDs P3 blinking your choice Step DAS Installation Connecting the XC878 Easy Kit e Ne ON Nn I LA N DAVE program generator DAvE Installation mothersystem DAvE Update Installation XC878 DIP for XC878 Using DAVE Microcontroller initialization for your programming example Using the KEIL Development Tools C Compiler Programming of your application X C878 with the KEIL tool chain uVision3 V8 16a Using the simulator Using real hardware OnChipFlash Programmin Thanks To amp Feedback 7 Thanks To 8 Feedback Application Note 8 V2 0 2008 09 ME AP08079 In fi neon XC878 Easy Kit Cookery Book 1 DAS Installation Connecting the XC878 Easy Kit gt HELLE ELLE LLL UL ITT ITT berita rr d HHH Application Note 9 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Screenshot of the XC878 Easy Kit homepage http www 1nfineon com cms en product channel html channel2db3a304319c6f18c01 19ebe345f15 325 E Easy Kit XC878 Infineon Technologies Infineon Technologies File Edit View Favorites Tools Help Back v gt 914 ASearch Folders Favorites A H Bw Se 35 DM n Address e http www infineon com cms en product channel html channel 2db3a304319c6f18c0119ebe345f15325 Gnfineon Home Sitemap Select Language Login About Infineon
63. n fi neon XC878 Easy Kit Cookery Book MZ XC878 pVision3 C XC878 START_XC a51 E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help 2 el x aggies Y a lt gt 0 ala mal erm w aO h FP 5 Ht OF ams c gt o 33 IF XDATALEN lt gt 0 Besser Jas da MOV DPTR XDATASTART n MOV R7 4LOW XDATALEN j Ge IF LOW XDATALEN 0 e MOV R6 HIGH XDATALEN 1 r2 Ox00 GER ELSE S MOV R6 HIGH XDATALEN r4 Ox00 Ge ENDIF e 2 CLR A XDATALOOP MOVX ADPTR A INC DPTR DJNZ R7 XDATALOOP DJNZ R6 XDATALOOP gd sp 0x07 ENDIF sp max 0x07 3 v PC C 0x037B gt dosel 0x00 y Files Regs D Books DI Funct E Templ Text Editor Configuration Wizard I amp MAIN C B UART CIB 701 0 IB MAIN H START Running with Code Size Limit Load C 11XC87811XC878 2k Stack Fram Filter Execution Al E tal Restricted Version with 2048 Byte Code Size Limit Currently used 1813 Bytes 88 error 65 access violation at X 0xDFFOOO no write permission gt ASM ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet 4 gt gt i Build Command For Help press F1 Output Window Call Stack Note error 65 access violation at X OxOFFOOO no write permission To
64. nks Evaluation Software Home Products Events Support Product Informatio Software amp Hardware Pre Why Buy Tools From Kei Contact Ordering Instructions Product Information Reque Pricing Information Request Product Brochures Newsletters Device Database Device List what is the Device Databas why isn t a Device Listed Adding to the Device Datak Searching the Device Da Search by Architecture Search by vendor Parametric Search Problem Report Feedback Evaluation Softwar Overview Requirements Limitations CD ROM Request Downloads ARM Evaluation Software C166 Evaluation Software C251 Evaluation Software C51 Evaluation Software Compliance Testing ISO ANSI Compliance Validation and Verificatic Distributors Overview DJKEIL Search Keil com for C51 Evaluation Software Development tools for Classic and Extended 8051 Microcontrollers Version 8 16a The Keil C51 Evaluation Kit allows you to create programs for all 8051 derivatives m Review the hardware requirements before installing this software Note the limitations of the evaluation tools To install the Keil evaluation tools m Right click on C51V816A EXE and save it to your computer PDF files may be opened with Acrobat Reader ZIP files may be opened with PKZIP or WINZIP Be sure to request a quote for the full version of the tools El Are Wo 7 Execute C51V816A EXE or any higher version Applicati
65. nothing File View Options Add Ins Windows oo Oe Bl 803 2 r i e a I si DAVE XC878CLM Release v1 1 Ne a Clock Source Control C Direct Drive PLL Bypass Mode PLL Mode Clock System fSYS fOSC x NF NR x OD NR P 2 y NF N 72 y ob x 1 y Clock Output Control TI Use Pin P0 0 as CLKOUT T Use Pin P0 7 as CLKOUT SG CLKOUT fOSC C CLKOUT fPCLK C CLKOUT is Selected by COREL and TLEN bits Clock Divider fSYS 3 e ENESES ADEI A rT Enable Toggle Latch COCON TLEN Ci KAI ITTRAH 1 n a XC878CLM new project Note CPU clock is 24 MHz Application Note OnChip OSC C External OSC fOSC MHz 400 System Frequency fSYS fSYS ThAH 71 144 00 Clock Management Clock divider iChMCON CI K DEI PCLK SCLK CCLK MHz FCLK MHz for kA ANI FCLK MHz for CCUG FCLK MHz for T2CCU f5YS 6 v 29 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book e i A A nfineo do not change configuration File View Options Add Ins Windows on Dau fus si DAvE XC878CLM Release v1 1 Project Settings es ta 2 General System Clock Global Interrupt Enable Interrupt Structure 2 Mode Select e z iv Enable global interrupt IENO EA gue a C IMODE 1 Interrupt Service Routine Type Select C CHOICE1 ISRs Push and Pop SYSCON to prevent register mapping RMAP pr
66. o Line Logfilename Browse Timeout Read Interval Timeout Read Total Timeout Multiplier Read Total Timeout Constant Hardware Flow Control I5 Output Control I DS Output Control RTS Control Disable DIR Control Disable y Software Flow Control F XON AOFI Output Control AON AOFF Input Control Continue Sending after OFF sent XON Limit lo AUFF Limit lo NON Char Ox loo XOFF Char Ox joo Set Configuration Cancel Click Set Configuration Application Note 122 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book View select ASCII U SPY COM Window Enabled File Edit View Config Tools Window Help EIE Y Toolbar EB Y Status Bar i COM ASCII Ctrl A V HEI Ctrl H y U SPY COM Window Enabled File Edit View Config Tools Window Help Y Toolbar wo v Status Bar Ie Y ASCII Ctrl A HEX Ctrl H Application Note 123 V2 0 2008 09 See AP08079 In fi neon XC878 Easy Kit Cookery Book Config Transmit Receive Editor U SPY COM Window Enabled File Edit View Config Tools Window Help 8 H U SPY Config B COM Wind Transmit Receive Editor With the Transmit Receive Editor configure the Transmit Window so that it appears like the Transmit window below Application Note 124 V2 0 2008 09 AP08079 Jur In fi neon XC878 Easy Kit Cookery Book
67. oblems CHOICE2 Global Interrupts EA are disabled in Functions Macros that modify RMAP to avoid mapping issue Shared Interrupt Message Box Enable iv Enable shared interrupt message box XC878CLM new project Application Note 30 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Notes If you wish you can insert your comments here Exit and Save this dialog now by clicking Eai the close button Project 5 Application Note 31 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book Configuration of the UART Ble View Options Add Ins Windows ds 0em s Alam DAVE XC878CLM Re T eag Ar t ada gli ar rm A a 7 ACS 78 CLM new project 4 Application Note 32 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book UART Transmitter click Use pin P1 1 TXD 0 UART Receiver click Use pin P1 0 RXD 0 UART Receiver Enable tick v Enable receiver REN UART Mode Control click 9 Mode 1 8 bit shift UART variable baud rate see BRG or Timerl File View Options Add Ins Windows dun nau fus Transmitter Receiver Receiver Enable C No pins are selected C No pins are selected Use pin P1 1 TXD 0 Use pin P1 0 RXD 0 C Use pin PO2 TXD 1 C Use pin P0 1 RXD 1 Enable receiver REN C Use pin P5 3 TXD 2 C Use pin P5 2 RXD 2 Baudrate Source Mode Control SMO SM1 BRG C Mode 0 8 bit
68. ok o ok o o ok ok o o ok o o o ok o o ok ok o o ok o o o ok o o ok ok o o ok o o o ok o o ok o o o ok v o ok v o o ok ve oe oe ve ok ve ake o oe ve e ok oe ve ok ok ok 066 067 USER CODE BEGIN T01 General 6 068 069 USER CODE END 070 071 072 E SOON ooo 073 Global Variables 074 ff X9 e vk ok o sk NN oo 075 0785 USER CODE BEGIN T01 General 7 077 unsigned char Timer D interrupt counter 0 073 USER CODE END 079 080 081 ESOO ooo 062 External Prototypes 083 E T9 e v ok ok o o ok o ok ok ee ee o o ok o o ee o o ee ke o ok v ee ok o o ok ov o ok ee ok ov o o ok ee ee o o ok ve oe ee oe ve ake o oe ve ok ok ke ok ok ok oe 084 085 USER CODE BEGIN T01 General 8 086 007 USER CODE END 068 089 090 E 7 PE A kk Ok 2 ke aE 2 ke ke o v o ok oo ve o o ook ve o o o ve o ve oe ve o ve e oe ve o ve e oe ve ok oe ok on ok om 1 Prototypes Of Local Functions buf A BA B G ew r MAIN C B MAIN H B UART C EB T01 C lt gt gt Buitd K E NU DIM amine Application Note 81 V2 0 2008 09 ME AP08079 In fi neon XC878 Easy Kit Cookery Book Double click TO1 C Insert code for TO interrupt service routine Timer_0_interrupt_counter if RS232 wait RS232_wait 183 Timer_0 overflow 183 5461 333 us 0 9994 if Timer_O_interrupt_counter 183 183 Timer_0 overflow 183 5461 333us 0 9994s Timer_0_interrupt_counter 0
69. ologies amp G Usage of this website is subject to our Usage Terms Imprint Contact Privacy Polic e Application Note 10 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Note For further information please refer to the XC878 Easy Kit Board Manual V1 0 April 2008 Application Note 11 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Install the Infineon DAS DeviceAccessServer Server Go to www nfineon com DAS E DAS Tool Interface Infineon Technologies Infineon Technologi O EX File Edit View Favorites Tools Help Back v 9 3 2 QSearch Folders Favorites 2 Gl tv Se Saw amp dy i Address http www infineon com cms en product promopages das index html M Go e M Links ue Our Products Infineon Never stop thinking DAS Product Brief 3 Print Page Send Page Latest release version for download DAS Edition v2 6 4 Latest LPT server for download JTAG JDR LPT Server v2 4 0 Note Please use always the latest DAS release Download Service Please report problems with the latest DAS release to das support infin on com das product brief pdf 132 KB DAS Edition v2 5 4 zip 7 36 MB JTAG JDR Y LPT Server v2 4 0 zip 4 01 MB Home Comp to Press Careers nfineon vvorldwide 1999 2008 Infineon Technologies 46 Usage of this website is subject to our Usage Terms Imprint Contact Privacy Polic ww
70. on Note 54 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Start Keil u Vision3 and open the DAVE Project If you see an open project close it Project Close Project Project Open Project Select Project File Look in choose CAXC878 1 Select Project File Files of type select Dave Project Files 2 Choose click XC878 dpt 3 Select Project File Look in Love wi History Desktop My Documents My Computer ao My Network Pla File name C878 dpt m Files of type Dave Project Files dpt Cancel Zo Click Open Application Note 55 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Project Rebuild all target files Vi XC878 uVision3 FileWEdit View Project Debug F I XC878 pVision3 File Edit View Project Debug Flash Peripherals Tools SVCS Window Help asugi rejce Fa 2A wl y A lt gt 4810 Bao ere eames Rllager zl se Project Workspace X BSTART XC a51 D amp MAIN C D BIO C D amp UART C EF B TO1 C E User Files E files S ur pn Bre XiBuild target Target 1 assembling START XC as5l compiling MAIN C compiling IO C compiling UART C compiling TO1 C linking WARNING L16 UNCALLED SEGMENT IGNORED FOR OVERLAY PROCESS SEGMENT PR MAIN MAIN Program Size data 9 0 xdata 0 code 142 XCOo785 O Error s
71. orts an access violation error This helps you locate and correct memory problems in your program If your program uses memory mapped I O devices or dynamically accesses memory through pointers you may need to make changes to the memory map You specify an address range with the MAP command along with the accesses allowed for that range Read READ write WRITE and execution EXEC accesses or any combination may be specified The memory map supports 1 byte granularity The VNM option identifies the specified memory range as von Neumann memory When VMN is specified with an address range u Vision3 overlaps external data memory XDATA and code memory Write accesses to external data memory also change code memory Memory ranges specified with VNM may not be a range from the code area and may not cross a 64K boundary The address range specified must be from the external data area The MAP command when entered with no other parameters displays the current memory map for your target program This lets you check your memory map settings The CLEAR option lets you remove an address range previously specified with the MAP command When u Vision3 loads the following memory maps are defined CPU Address Range Access 8051 Family 0x000000 0x00FFFF DATA READ WRITE 0x010000 0x01FFFF XDATA READ WRITE OxFF0000 0xFFFFFF CODE EXEC READ u Vision3 supports up to 16MB of memory simulate external I O Devices External I O devices are typ
72. ow Help d e x E 6 a viaje lt gt alala ala erm acu sme oc s 8 E E X e A Target 1 D I a e Project Workspace ANA 224 Jf SOS p o o ok v o ok o o o ok v o ok o o o o ok o o ok ook o ob ok v ob o o ok o v ok o o v o ok ve o ok oe ve o oe ve o oe ve oe ve e oe ve o oe ve oe ve k oe ae 423 Target 1 225 2 5 Dave Files 226 USER CODE BEGIN MAIN Main 1 START XC a51 227 char input void gt 2 O af char in BIO C 230 do UART C 931 2 3 TO1 C 232 printf question E User Files 233 while RI 234 RI 0 235 in SBUF 236 while in 1 amp amp in l 2 amp amp in 3 237 return in 238 239 USER CODE END 240 24 void main void 242H 1 243 USER CODE BEGIN MAIN Main 2 244 245 USER CODE END 246 247 MAIN vInit 248 249 USER CODE BEGIN MAIN Main 3 250 251 USER CODE END 252 253 while l 254 1 255 256 USER CODE BEGIN MAIN Main 4 257 258 USER CODE END 259 260 261 22 End of function main 263 v 4 BL 0 we e ET Build Command Find in Files D Simulation Application Note 74 V2 0 2008 09 AP08079 SC re In fi neon XC878 Easy Kit Cookery Book Double click MAIN C and insert the following code in the main function while RS232 wait Mi XC878 pVision3 C XC878 MAIN C B File Edit
73. r systems with the express written approval of Infineon Technologies if a failure of such components can reasonably be expected to cause the failure of that life support device or system or to affect the safety or effectiveness of that device or system Life support devices or systems are intended to be implanted in the human body or to support and or maintain and sustain and or protect human life If they fail it is reasonable to assume that the health of the user or other persons may be endangered etc AP08079 In fi neon XC878 Easy Kit Cookery Book AP08048 Revision History 2008 09 V2 0 Previous Version none Page Subjects major changes since last revision We Listen to Your Comments Any information within this document that you feel is wrong unclear or missing at all Your feedback will help us to continuously improve the quality of this document Please send your proposal including a reference to this document to mcdocu comments infineon com Application Note 3 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Table of Contents Page Note Table of Contents see page 8 Introduction This Appnote is a Hands On Training Cookery Book step by step book It will help inexperienced users to get the XC878 Easy Kit up and running With this step by step book you should be able to get your first useful program in less than 2 hours The purpose of this document is to gain know how
74. re even more programming examples using the same style available e g ADC examples CAPCOM6 examples e g BLDC Motor playing music Simulator examples C examples based on these step by step books Application Note 130 V2 0 2008 09 e AP08079 In fi neon XC878 Easy Kit Cookery Book 7 Thanks To Reinhard and Maureen for their support Application Note 131 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book 8 Feedback X C878 Easy Kit Keil tools Your opinion suggestions and or criticisms Contact Details this section may remain blank should you wish to offer feedback anonymously If you have any suggestions please send this sheet back to email mcdocu comments Oinfineon com FAX 43 0 4242 3020 5783 Your suggestions Application Note 132 V2 0 2008 09
75. se position Project Workspace Files or click Target click right mouse button Options for Target Target VC pVision3 M XC 78 pVision3 File Edit View Project Debug Flash Peripheral File Edit Vi a SH Flash P o ug m c A E D LL o A Options for Target Target1 Debug check Use Simulator Options for Target Target 1 a xX Device Target Output Listing User c51 4x51 Lx51 Locate Lx51 Mise Debug Utilities f Use Simulator Settings C Use y Settings Limit Speed to RealTime v Load Application at Startup Ww Run to maint v Load Application at Startup T Run to main Initialization File Initialization File Restore Debug Session Settings Restore Debug Session Settings M Breakpoints Ww Toolbox Iv Watcnpaints amp PA M Breakpoints kW Toolbox iv Watcnpaints M Memory Display w Memory Display CPU OLL Parameter Driver DLL Parameter 58051 DLL m8051 EA MEX 58051 DLL Dialog DLL Parameter Dialog DLL Parameter cores DLL boren rosen E boren Cancel Defaults OK Application Note 86 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Start the u Vision Simulator or click a Debug Start Stop Debug Session BEEN CX a pa m am E m Start Stop Debug Session Debug Session AN EVALUATION MODE Running with Code Size Limit 2K OK Application Note 87 V2 0 2008 09 AP08079 i
76. shift register fixed baud rate fPCL K 2 C Timer 1 Mode 1 8 bit shift UART variable baud rate see BRG or Timer1 Mode 2 9 bit shitt UAR I tixed baud rate IPCLK 32 or Interrupts fPCI K 641 m Enable interrupt ES C Mode 3 9 bit shift UART variable baud rate see BRG or Timer1 Receive interrupt will only be I activated if a valid stop bit was received SM2 Options RXDO Pin Selection Double baud rate SMOD No pins are selected Multiprocessor Ului Only in iuda 2 Use pin P1 5 RXDO 0 e Enable multiprocessor Use pin P0 0 RXDO 1 communication 5M2 C Use pin P5 4 RXDO_2 XC878CLM new project E Note The RS232 serial interface UART pins P1 0 and P1 1 is available via the USB port as virtual COM port e g COM7 which converts the TTL UART signals to USB signals Application Note 33 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book BRG BRG Run Control check tick v Enable BRG BRG Fractional Divider Control tick v Enable Fractional Divider BRG BRG Settings Required baud rate kbaud insert 9 600 ENTER File View Options Add Ins Windows dt Os fus BRG Run Control Fractional Divider Control Enable BRG BCON R Enable Fractional Divider FDCON FDEN BRG Settings Prescaler BRPRE ON fPCLK y STEP Value De Required baud rate 9 6000 Actual baud rate bam kbaud kbaud Min baud rate p2 8882 Percentage of p o038 baud de
77. tall End 4 DAVE 1s now ready to generate code for the XC878 microcontroller Application Note 26 V2 0 2008 09 etc AP08079 In fi neon XC878 Easy Kit Cookery Book 3 DAvE Microcontroller Initialization after Power On Start the program generator DAVE and select the XC878 microcontroller File New 8 B1t Microcontrollers select XC878CLM Create Gd DAVE New Project 32 Bit Microcontrollers 16 Bit Microcontrollers 9 Bit Microcontrollers D XC866 w XCS87SCLM 8 XC888CLM Create Cancel jl Help Application Note 27 V2 0 2008 09 AP08079 XC878 Easy Kit Cookery Book a Choose the Project Settings as you can see in the following screenshots Controller Details Device check select XC878CM 16FF neral For the KEIL Compiler check choose Keil in the Compiler Settings File View Options Add Ins Windows dns fus AvE XC878CL pt EECH ww Controller Details Device XC878CM 16FF y Device Type FLASH Flash Memory par Size Max System Clock au MHz ROM Size Frequency Main Source File Main Header File File name MAIN C File name MAIN H Compiler Settings Elkeil iv Enable Startup File Generation Memory Model SMALL y C asking C SDCC C AR XC878CLM new project Application Note 28 V2 0 2008 09 e e Ma Fr 8 LJ LJ n i C U n AP08079 XC878 Easy Kit Cookery Book do
78. ul up Pul down Select Register rtamal Bus Px PUDEN Pul ugp Pul down Enable Register Px OD Open Dram Control Register Px DIR Directon Register Px ALTSELO H A ernate Select Register Px ALTSEL1 Aternate Select Register 1 Px Data Data Register AkDatalr Pul Down Dewce Application Note 45 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Ports click Configure Port 3 NS File View Options Add Ins Windows je Du m 4 003 gi DAvE XC878CLM Release v1 1 e GPIO lifa C W 2 Ports Functions Parameters Notes Configure Port 0 Configure Port 1 Configure Port 4 Configure Port 5 XC878CLM new project AL Application Note 46 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Port 3 Port Function tick v Use P3 0 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 1 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 2 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 3 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 4 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 5 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 6 as GPIO Port Direction click Out Port 3 Port Function tick v Use P3 7 as GPIO Port Direction click Out File View Options
79. upt priorities These priorities with 6 beeing the highest are as follows Interrupt Priority Y NM A Interrupt Priority 3_ _ Interrupt Priority 2_ _ Interrupt Priority 1_ _ Interrupt Priority O 1 an Main refers to routines that run prior to any interrupt and can be interrupted by any interrupt Each interrupt source can be programmed to any of the four interrupt priorities 0 3 An interrupt that 1s currently being serviced can only be interrupted by a higher priority interrupt but not by another interrupt of the same or lower priority Hence an interrupt of the highest priority cannot be interrupted by any other interrupt request In any case the NMI always has the highest priority above level 3 and its priority cannot be programmed Application Note 36 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Functions Initialization Function tick v UART_vInit File View Options Add Ins Windows n Deng fus Initialization Function Source File UART_vinit JUART_vinit File name JUART C Miscellaneous Functions 8 Bit Data Units M UART_vilsr UART vilsr M UART ubGetData8 UART_ubGetDatag T UART vRxEnable UART_vRxEnable M UART vSendDats8 UART vSendDate M UART vRxDisable UART vRxDisable M UART bRxReady UART bR Ready p Bit Data Units M UART bTxReady UART bTxReady E UART uwGetDate9 UART_uwGetData9 I UART_vSendD
80. viation Max baud rate 747 0703 Reload Value 0x81 kbaud BG XC878CLM new project E Note Validate each alphanumeric entry by pressing ENTER Application Note 34 V2 0 2008 09 e t AP08079 In fi neon XC878 Easy Kit Cookery Book Interrupts do nothing File View Options Add Ins Windows 6n Deal fus DAvE XC878CLM Release Si UART Serial Interface ta 2 Non Maskable Interrupt NMI Highest Priority can t be changed Level 2 Timer 0 Interrupt E m Level 3 Level 4 Level 5 Level 6 Level 7 7 External Interrupt 1 Timer 1 Interrupt UART Interrupt 12 I2CCU BRG MCAN SRN 0 ADC MCAN SRN 1 and SRN2 Level 8 SSC Interrupt Level 9 External 2 T21 UART1 BRG1 Intrpts Level 10 External 6 3 T2CCU 5 0 MCAN SRN Level 11 CCU6 Node 0 MCAN SRN A Level 12 CCU6 Node 1 MCAN SRN 5 Level 13 CCU6 Node 2 MCAN SRN 6 Level 14 CCUG Node 3 MCAN SRN 7 parta e bea ala ato 2 da cdm ue eer de cm c Dm XC878CLM new project E Note For the serial communication with a terminal program running on your host computer the printf function is used The printf function uses Software Polling Mode therefore we do not need to configure any interrupts Application Note 35 V2 0 2008 09 infir AP08079 In fi neon XC878 Easy Kit Cookery Book Interrupt Priorities Note Source Application Note APO8053 There could be six interr
Download Pdf Manuals
Related Search
Related Contents
Pegasus 67106-8004 Instructions / Assembly Nettoyant spécial pour l`industrie du cuir RCA DRD455RH Satellite TV System User Manual Coffee Maker Senseo HD7810/10 /C R&S®SMU200A Release Note Version 2.20 Comment pairer mon SuperTooth Disco avec mon téléphone Copyright © All rights reserved.
Failed to retrieve file