Home

HOT505CA_1

image

Contents

1. Mode 3 Timer 0 becomes 2 separate 8 bit timers counters with individual interrupts on overflow if desired Timer 1 becomes a 16 bit timer that can be started and stopped at any time but cannot cause an interrupt B Useful when an extra timer is needed Dec 2000 Page 46 nfineon Dec 2000 Page 47 Timer Courter and 1 Operating Modes P3 4 TO or ROo TRI Gate P3 22NTO P3 3INT1 P3 4 T0 9n C T TROorTR1 Interrupt Gate P3 2 INTO or P3 3INT1 nfineon Timer Courter and 1 Operating Modes cort MO 1 Dec 2000 Page 48 Exercise _1 Periodic Asynchronous Serial Data Transmission Description Infineon Objective Send asynchronous serial data periodically using the USART and Timer 0 Period 1 overflow of Timer 0 in mode 0 3 072 ms with a 16 MHz crystal Data Send constant data 0x55 at a baud rate of 9600 Use USART mode 1 8 data bits 1 start bit 1 stop bit variable baud rate Dec 2000 Page 49 Infineon Dec 2000 Page 50 Exercise 5URT_1 DAVE Configurations Start DAVE 2 1 D B Select Create a new project from the Startup Dialog or click Dd B Select the 8 Bit microcontroller C505CA and click Create if this microcontroller is not on the list you need to re install it from the DAvE 2 1 CD ROM B DAVE will create the project Save your project by selecting F
2. 6 i 7FFCH Dec 2000 Page 141
3. 2 and CCL2 B Use the capture ISR to toggle pin P1 4 B KitCON 505C Configurations Connect pin P1 1 CC1 connector X3 pin 89 with pin P1 2 CC2 connector X3 pin 86 PET Cer PI2 CC2 Signal Output Sigal Detection pin 89 pin 86 Dec 2000 Page 83 Infineon Dec 2000 Page 84 Exercise 5T2 2 DAE Configurations Start DAVE 2 1 B Select Create new project from the Startup Dialog or click Select 8 Bit microcontroller 505 and click Create if this microcontroller is not on the list you need to re install it from the DAVE 21 CD ROM B DAVE will create the project Save your project by selecting File Save or press ll Browse to directory c hot505CA 1572 2V Enter project name 5T2 2 Click Save You will see the C505CA block diagram and the Project Settings Window configuration see next slide To get back to the Project Settings window in case you close it Select File Project Settings Infineon Exerdse 572 2 DAVE Configurations cont B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board Close Dec 2000 Page 85 Infineon Exerdse 572 2 DAVE Configurations cont Configure Timer 2 Timer 2 Mode T211 210 Timer Function Reload Mode T2R1 T2R0 Mode 0 auto reload upon
4. Infineon Dec 2000 Page 1 5 5 _1 Hands On Introduction to the C505CA using DAVE 2 1 C505CA Starter Kit Keil uVision2 and an oscilloscope y i D np _ QNT RE Eu 07 24 Virtual v UD Wim S hgineer RE rue Integration IDE for This progam is protected by U S and copyright Lass ES Infineon A Contents 1 B introduction Introduction to HOT505CA 1 Short Introduction to DAvE 2 1 Short Introduction to Keil HVision2 Dec 2000 Page 2 Infineon Contents ID B C500 Architectural Overview 8 bit Products Product Numbering Scheme C505CA Block Diagram C500 CPU Core Internal amp External Memory nterrupt System C505CA Peripheral Overview Dec 2000 Page 3 Infineon Contents B C505CA Hands On Peripheral Training Exercise Overview How to set up the Hardware and Software Files to build a program Hints regarding DAvE 2 1 and the Exercises Peripherals in Detail Exercises Dec 2000 Page 4 Infineon Introduction to HOT5O5CA 1 B HOT505CA 1 is a Hands On Training material created for the C505CA using the KitCON 505C Starter Kit the Keil uVision2 development environment including the C51 compiler A51 Assembler BL51 Linker Locator Debugge
5. System Setup Directory Structure Create a subdirectory on your hard drive c hotC505CA 1 B Create the following subdirectories on you hard drive to store the project and code for each of the exercises CAhot505CA 1WURT 1 c not505CA_1 5URT_2 c hot505CA_1 5T2_1 CAhot505CA 1 5T2 2 c not505CA_1 5ADC_1 c not505CA_1 5CAN_1 Tool Project Flow Dec 2000 Page 32 Infineon Dec 2000 Page 33 System Setup kKItCON 505C Hardwere Setup sure that all jumpers are in their default positions as described the KitCON 505C Hardware Manual Make sure that jumper JP11 1 open Attach only an unregulated power supply with 8V to 12V 500 mA to X2 on the KitCON 505C Double check the correct polarity B Connect your Starter Kit board to your IBM compatible PC using a serial cable connector 4 to X4 1 the connector closest to the RESET button on the board NOTE These examples assume that the KitCON 505C is equipped with a 16 MHz crystal Earlier editions of the board may have slower crystals This will effect the timing of periodic interrupts and some of the settings in DAVE System Setup KtCON 505C Hardware Setup cont Infineon B The Keil Monitor Program MUST be programmed into the Flash of the kitCON 505C The Keil Monitor is programmed into the Flash on all boards by default If the flash is erased or re programmed the Monitor will need to be re programm
6. cont B Configure 10 bit ADC Control Input Selection Use P1 0 for ADC channel 0 Conversion Options Continuous conversion ADM Interrupt Control Enable A D interrupt EADC Functions ADC vinit m ADC vStart B ADC_ubRead8BitConv Close Generate Code B DAVvE will show you all the files that he has generated File Viewer is opened automatically Dec 2000 Page 100 Infineon Dec 2000 Page 101 Exercise 5ADC_1 UVision Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hots05CA_1 5ADC_1 5ADC_1 dpt Exercise 5ADC 1 Vision Configurations cont B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0xFC00 0xFFFF Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 B Off chip Xdata memory no external RAM needed Debug B Use Keil Monitor 51 Driver select B oad Application at Startup check Click OK Use the tree to open all c files Dec 2000 Page 102 Infineon Exercise 5ADC 1 Add User Code Edit MAIN C start A D converte
7. 1 B Channel 1 Mode Compare enabled B Channel 1 Compare Register value CCH1 CCL1 2 OxFF37 at 16 MHz for 7596 duty cycle Dec 2000 Page 76 Infineon Exerdse 5T2_1 DAVE Configurations cont Channel 2 3 Channel 2 Mode Compare enabled Channel 2 Compare Register value CCH2 CCL2 OxFF99 at 8 MHz for 50 duty cycle Functions B T2 vinit Close Generate Code B DAVE will show you all the files that he has generated File Viewer is opened automatically Dec 2000 Page 77 Infineon Dec 2000 Page 78 Exercise 5T2_1 UVision2 Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hot505CA 15T2 1 5T2 1 dpt Exercise 572 1 UVision2 Configurations cont B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0 00 Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 B Off chip Xdata memory no external RAM needed Debug B Use Keil Monitor 51 Driver select B oad Application at Startup check Click OK Use the tree to
8. 2 Add User Code B Edit MAIN C include endless loop in main USER CODE BEGIN Main 2 ble dL 40 USER CODE END B Edit T01 C transmit serial data when the Timer 1 ISR TO1 vilsrTmr1 is executed USER CODE BEGIN 01 IsrTmr1 1 USART vSendData 0xAA USER CODE END B Build All This will compile and link the project and create an object file and hex file Infineon Dec 2000 Page 66 Exercise 2 Run the Code Make sure the evaluation board is powered and connected to 1 Connect the Oscilloscope to P3 1 TxD connector 97 and P3 0 RxD connector pin 93 Press the Reset Button on the board Start the Debugger Press Run You should see signals similar to those on the next slide To stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work V V 10 8 6 4 10 2 8 0 6 p 2 JR DE 4 4 2 Vu aa fa pl E CT 6 0 8 2 10 _ 4 P3 1 TxD Shift Clock Top P3 0 RxD Data Bottom Example 5URT_2 Infineon Tiner 2 with 4 Channel Capture Con pare Unit B 16 bit Timer Counter In Timer mode the timer increments at fosc 6 or fosc 12 In Counter mode the timer increments every falling edge of P1 7 T2 In Gated Timer mode the timer increments at fosc 6 or fosc
9. CC1 50 Duty Cycle P1 4 Bottom Example 5T2_2 Dec 2000 94 Infineon Analog to Digital Converter 8 channel multiplexed input Programmable conversion time 10 bit resolution 6 usec minimum conversion time Internal Capture and Hold circuit Single or Continuous conversion modes Busy Flag End of Conversion interrupt Analog to Digital Converter Infineon Functional Diagram V AREF V AGND ADCONO amp ADCON1 ADCONO Port 1 Single Continuous Mode B ADDATH Conversion Clock f Start of Conversion dummy byte x 2 MHz max ADCLi ADCLO ADCONO ADCON 1 IRCON Conversion Complete Interrupt Dec 2000 Page 95 Exercise 5 1 Control the Pulse PVM signal with an ADC Value Description B Objective Control the Pulse Width of Timer 2 channel 1 from approximately 0 to 100 with an ADC Value from the ADC channel 0 ADC will be placed in Continuous Conversion Mode B ADC ISR will update the PWM duty cycle B KitCON 505C Configuration Connect Varer and Vienp to and GND respectively connect pin 1 to pin 61 connect X3 pin 3 to X3 pin 62 Connect a potentiometer to A D channel 0 pin P1 0 connector X3 pin 69 GND Vcc e g X3 pin 3 e g X3 pin 1 or X3 pin 4 or X3 pin 2 AND input channel O P1 0 ANO pin 69 or 85 Dec 2000 Page 96 Infineon Dec 2000 Page 9
10. CODE END B Edit T01 C transmit serial data when the Timer 0 ISR TO1 vilsrTmrO is executed USER CODE BEGIN 01 IsrTmrO 1 USART vSendData 0x55 4 This is an USER CODE END ASCII U B Build All This will compile and link the project and create an object file and hex file Infineon Dec 2000 Page 57 Exercise 5URT_1 the Code Make sure the evaluation board is powered and connected to 1 Press the Reset Button on the board Start the Debugger e View Serial Window 1 Press Run You should see many U s being written in the Serial window This is data sent by the C505CA to the PC via the USART B stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work NOTE If you see strange characters in the serial window it is because the debugger or the USART are not set to 9600 baud Double check the debugger options or the DAVE settings Exercise 2 Periodic Synchronous Serial Data Transmission Description Infineon B Objective Send synchronous serial data periodically using the USART and Timer 1 Period 16 Timer 1 counts B Timer 1 in mode 2 Reload value of OxFO overflow of Timer 1 in mode 0 6 us with a 16 MHz crystal Data Send constant data 0xAA Use USART mode 0 B 8 data bits B Fixed Baud Rate 1 6 external oscillator frequency 2 666 Mb s 16 MHz De
11. it overflows age Infineon Exercise 2 DAVE Configurations cont Configure 8 Bit USART Control Global Use TXD P3 1 for serial Channel B Mode Control SMO SM1 Mode 0 8 bit Shift register fixed baud rate sync Functions B USART vinit m USART vSendData Close B Generate Code DAVE will show you all the files that he has generated File Viewer is opened automatically Dec 2000 Page 62 Infineon Dec 2000 Page 63 Exercise 5URT_ 2 UVision2 Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hot505CA 1W5URT 2W5URT 2 Exercise 5URT_ 2 UVision2 Configurations cont B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0xFC00 0xFFFF Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 B Off chip Xdata memory no external RAM needed Debug B Use Keil Monitor 51 Driver select B oad Application at Startup check Click OK Use the tree to open all c files Dec 2000 Page 64 Infineon Dec 2000 Page 65 Exercise 5URT_
12. with linear bus structure and equal nodes Multi Master bus B CAN does not address nodes address information is inside the messages combined with message priority B wo bus states dominant and recessive B Bus logic according to Wired AND mechanism dominant bits Zeros override recessive bits Ones B Bus Access via CSMA CD with NDA Carrier Sense Multiple Access Collision Detection with Non Destructive Arbitration Dec 2000 Page 115 Infineon Sone things worth knowing about CAN cont recessive NODE A dominant recessive NODE B dominant bus idle recessive CAN BUS dominant Node sends out recessive Node B loses arbitration but reacis back dominant level and switches to receive Dec 2000 Page 116 Dec 2000 117 Infineon CAN Data Franes B There are mainly two ways of communicating One node is talking all other nodes listen Node A is asking Node B for something and gets the answer B To CAN nodes use Data Frames A Data Frame consists of an Identifier the data to be transmittedand a CRC Checksum Dec 2000 Page 118 Infineon CAN Data Frames cont The identifier specifies the contents of the message engine speed oil temperature etc and the message priority The Data Field contains the corresponding value 6000 rpm 110 etc The Cyclic Redundancy Check is used to detect tran
13. 12 when P1 7 T2 is high good for pulse width measurement B 4 Channel Capture Compare Module 4 16 bit registers can hold capture or compare values B n capture modes the registers will latch the timer value in response to external pin transitions or software In compare modes pin transitions occur when the timer reaches the register value PWM generation B One of the channels can be used as a 16 bit reload value for the timer Dec 2000 Page 68 Timer 2 Functional Overview Dec 2000 69 Tiner 2 Functional Diagram 16 bit Tiner Unit P1 nfineon LES Dec 2000 70 Timer 2 Functional Diagram Capture Modes nfineon B Mode 0 Timer Contents Captured on positive edge of CCx Pin CCO can capture on positive or negative edge Mode 1 Timer Contents can be captured by a write dummy value to the low byte of the capture compare register Mode 1 Interrupt White to Dec 2000 Page 71 Dec 2000 72 Infineon Tiner 2 Functional Diagram Compare Modes CCx pin is set when timer reaches compare value Pin is reset when timer overflows Mode 0 CCx pin is either set or reset when timer reaches compare value Pin is reset when timer overflows Mode 1 I3FR Interrupt Request Corrpare Value Infineon 5T2_1 PVM Generation Description B Use the Timer 2 Capture Com
14. 23 Infineon lachnologios Four Prograntmrable Priority Levels Ext Int Dec 2000 Page 24 Inherent Priority Structure Only used for Simultaneous Interrupts of Sarre Priority Infineon Dec 2000 Page 25 Infineon lochnologios Interrupt Processing Interrupt Control Register of the appropriate peripheral INTR Flag is Set Peripheral Inte o Inte ot Am all flags am Dec 2000 26 Infineon Dec 2000 Page 27 Peripherals Set of the 2 Timer Counter units TO amp 11 16 bit timers with 4 operating modes including 1 reload mode A 3rd 16 bit Timer Counter with 4 Channel Capture Compare 2 Capture Modes and 2 Compare Modes Independent Full Duplex USART Asynchronous modes 1 Synchronous mode Dedicated Baudrate Generator 8 channel 10 Bit A D Converter Full CAN Controller Conforms to CAN 2 0B Active specification 15 Message Object Upto 1Mb s Watchdog 15 bit Reload timer causes reset on overflow Infineon Dec 2000 Page 28 5 Hands On Peripheral Training Fal oy TT pnm r med 2 TES gr Li i M Viri f
15. 7 5ADC 1 DAVE Configurations Start DAVE 2 1 LA B Select Create a new project from the Startup Dialog or click B Select the 8 Bit microcontroller C505CA and click Create if this microcontroller is not on the list you need to re install it from the DAVE 21 CD ROM B DAVE will create the project Save your project by selecting File Save or press al Browse to directory c hot505CA 15ADC 1V Enter project name 1 Click Save B You will see the C505CA block diagram and the Project Settings Window configuration see next slide B get back to the Project Settings window in case you close it Select File Project Settings Infineon Exercise 5ADC 1 DAVE Configurations cont B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board Close Dec 2000 Page 98 Infineon Exercise 1 DAVE Configurations cort B Configure Timer 2 Timer 2 Mode 211 T210 Timer Function Reload Mode T2R1 T2RO Mode 0 auto reload upon timer overflow Reload Value CRCH CRCL Register Value OxFFOO 8 bit resolution to match A D Channel 0 1 Channel 1 Mode Compare enabled Functions 12 vinit 2 vSetMatch Close Dec 2000 Page 99 Infineon Exercise 5ADC 1 DAVE Configurations
16. a Bytes Data fields Enter Data Bytes 0x00 0x11 0x77 Arbitration Register Enter Identifier 11 bit 0 123 Save amp close Functions Include functions CAN_vinit and CAN_vTransmit Dec 2000 Close Page 133 Infineon Exercise 5CAN 1 DAVE Configurations cont Generate Code B DAVE will show you all the files that he has generated File Viewer is opened automatically Dec 2000 Page 134 Infineon Dec 2000 Page 135 Exercise 1 Ji Vision Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hot505CA 1 5CAN 1 5CAN 1 dpt Exercise 1 Ji Vision Configurations cont B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0xFC00 0xFFFF Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 B Off chip Xdata memory no external RAM needed Debug B Use Keil Monitor 51 Driver select B oad Application at Startup check Click OK Use the tree to open all c files Dec 2000 Page 136 Infineon Exercise 5CAN_ 1 Add User Code B Edit MAIN C rans
17. age 112 Infineon Application Exarrples cont B CAN trains High need of data exchange between the different electronic subsystem control units Mainly data about acceleration braking door control error messages etc but also for diagnosis B CAN in industrial automation Excellent way of connecting all kinds of automation equipment control units sensors and actuators Used for initialization program and parameter up download exchange of rated values actual values diagnosis etc Machine control printing machines paper and textile machines etc Connection of the different intelligent subsystems Dec 2000 Transport systems Page 113 Infineon Application Exan pies cont CAN in medical equipment Computer tomographs X ray machines dentist chairs wheel chairs CAN in building automation Heating air conditioning lighting surveillance etc Elevator and escalator control CAN in household appliances Dishwashers washing machines even coffee machines CAN in office automation photo copier interface to document handler paper feeding systems sorter communicates status allows in field connection or hot swapping DocuText Systems i e automatic print sort and bind on demand Dec 2000 Page 114 Infineon Sone things worth knowing about CAN B Developed in the mid eighties by BOSCH B Asynchronous serial bus
18. al Baudrate Required Baudrate 9600 Functions m USART_vinit _ This function Initializes the USART m USART_vSendData Close We will use this function to transmit data Generate Code B DAVE will show you all the files that has generated File Viewer is opened automatically Dec 2000 Page 53 Infineon Dec 2000 Page 54 Exercise 5URT_ 1 UVision2 Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hot505CA 1W5URT 1W5URT 1 apt Exercise 5URT_ 1 UVision2 Configurations cont B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0xFC00 0xFFFF Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 B Off chip Xdata memory no external RAM needed Debug B Use Keil Monitor 51 Driver select B oad Application at Startup check Click OK Use the tree to open all c files Dec 2000 Page 55 Dec 2000 56 Exercise _1 Add User Code B Edit MAIN C include endless loop in main USER CODE BEGIN Main 2 ble dL 40 USER
19. c 2000 Page 58 Infineon Dec 2000 Page 59 Exercise 5URT_ 2 DAVE Configurations Start DAVE 2 1 D B Select Create a new project from the Startup Dialog or click B Select 8 Bit microcontroller 505 and click Create if this microcontroller is not on the list you need to re install it from the DAvE 2 1 CD ROM B DAVE will create the project Save your project by selecting File Save or press ll Browse to directory c hot505CA _1 5URT 2V Enter project name SURT_2 Click Save B You will see the C505CA block diagram and the Project Settings Window configuration see next slide To get back to the Project Settings window in case you close it Select File Project Settings Infineon Exercise 2 DAVE Configurations B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board Close Dec 2000 Page 60 Infineon Exercise 2 DAVE Configurations cont B Configure T1 Timer Counter 1 Timer 1 B Timer Mode M1 8 bit timer counter TL 1 with 8 bit auto reload TH1 B Timer Register Timer auto reload OxFO B Timer Options Run Timer TR1 B Interrupt Control Enable Timer 1 interrupt ET1 Functions B TO V Init Close NOTE This causes Timer 1 to count from OxFO to OxFF EE and cause an interrupt when
20. ddressed CAN nodes using Extended CAN Frames use the CAN Specification Version 2 0B active Some Standard CAN nodes don t understand this accent but they tolerate it and just don t care f an Extended Frame is on the air these CAN nodes cannot store the data but they as well do not produce errors These CAN nodes use CAN Version 2 0A but are also known as Version 2 0B passive They can be used in a Controller Area Network where Extended Frames are used Dec 2000 Page 123 Infineon Standard CAN Extended CAN cont Some Standard CAN nodes don t understand and also don t tolerate this accent f an Extended Frame is on the air these CAN nodes produce errors These CAN nodes use only CAN Version 2 0A They can not be used in a Controller Area Network where Extended Frames are used B Infineon 8 bit parts C505CA C515C V2 0B active B Infineon 16 bit parts C167CR C164Cl C167CS C161CS V2 0B active Dec 2000 Page 124 Infineon Basic CAN Full CAN B n some CAN controllers only the basic CAN functions are implemented They are called Basic CAN controllers Mostly there s only one transmit buffer and one or two receive buffers for transmission and reception of the Data Remote Frames Each incoming message is stored The host CPU has to decide whether the message data is needed or not Therefore these controllers should on
21. ed Use the Phytec FlashTools to program the Keil Monitor mon505 hex into the Flash See the KitCON 505C Hardware Manual for details on programming the kitCON 505C Flash B f your board has a C505C device you should replace it with a C505CA Be careful when opening the socket on the board The socket is easily damaged Dec 2000 Page 34 KtCON 505C Hardware Setup cort Reset Button S1 SIEMENS RU E NH 1 5 uc 1 E nl 27 lt 2 Lo ES 77d ZT rod ai L CAN Bus Port X3 Connector C505CA Jumper Block 8V 12V DC 500mA Tip Inside Outside Dec 2000 Page 35 System Setup KtCON 505C Hardwere Setup cort Infineon lachnologios Supply St Special Pages Analog nyan You need this page when you do the exercises Dec 2000 Page 36 ______ System Setup Infineon _Intall DAVE 2 1 If you haven t already B Insert the DAVE 2 1 CD in your CD ROM drive Run CD ROM Setup exe B Follow the setup program s instructions Install the microcontrollers you d like to work with You can al
22. eon Dec 2000 Page 43 Peripheral Overview Universal Sync Async Receiver Transmitter USART cont Mode 2 Asynchronous Mode Full Duplex Fixed Baud Rate f 16 or f 32 9 data bits LSB first Parity Multiprocessor Communication 1 Start Bit 0 1 Stop Bit 1 Mode 3 Asynchronous Mode Full Duplex Variable Baud Rate 9 data bits LSB first Parity Multiprocessor Communication 1 Start Bit 0 1 Stop Bit 1 Interrupts Osc After data reception After data transmission After data reception amp 9th data bit is a 1 After data reception amp no errors Infineon Iuchnalagius USART Function Diagram Dec 2000 Page 44 Peripheral Overview Timer Courter and 1 Infineon 2 separate 16 Bit Timers Counters Timer when clocked by external oscillator fosc 6 Counter when clocked by external P3 4 TO or P3 5 T1 Can measure pulse widths when used as a Gated Timer Clocked by external oscillator when P3 2 INTO or P3 3 INT1 is high 4 Operating Modes Mode 0 8 bit timer counter with 5 bit divide by 32 prescaler Interrupt on rollover if desired Mode 1 16 bit timer counter Interrupt on rollover if desired Mode 2 8 bit timer with 8 bit reload on overflow Interrupt on rollover if desired Dec 2000 Page 45 Peripheral Overview Timer Courter and 1 cont Infineon
23. high reliability transmission Example 500 kbit s 25 bus load 2000 hours per year One undetected error every 1000 years Erroneous messages are detected and repeated Every bus node is informed about an error High immunity to Electromagnetic Interference Dec 2000 Page 107 Dec 2000 Page 108 Infineon User Benefits cont CAN means real time Short message length 0 to 8 data bytes message Low latency between transmission request and actual start of transmission Inherent Arbitration on Message Priority AMP Multi Master using CSMA CD AMP method B CAN is flexible CAN Nodes can be easily connected disconnected i e plug amp play Number of nodes not limited by the protocol B CAN is fast maximum data rate is 1 MBit s 40m bus length still about 40 kBit s 1000m bus length Infineon User Benefits cont CAN allows Multi Master Operation Each CAN node is able to access the bus Bus communication is not disturbed by faulty nodes Faulty nodes self swith off from bus communication CAN means Broadcast Capability Messages can be sent to single multiple nodes All nodes simultaneously receive common data CAN is standardized SO DIS 11898 high speed applications ISO DIS 11519 2 low speed applications Dec 2000 Page 109 Infineon Higher Layer Protocols CAN Application Layer CAL Layer 7 standard defi
24. hose address is the sum of a base register DPTR or PC and index register e g MOVC A DPTR Dec 2000 Page 16 Infineon Iuchnalagius CPU Fetch Execute Sequence P1 P2 P1 2 1 2 2 P2 P1 P2 P1 P2 P1 2 P2 P1 2 P2 P S1 er 51 ESAE ALE Read Opcode Read next Opcode 1 Again Oscillator Period a 1 Byte 1 Cycle Instruction e g INC A Read Read 2nd Byte Read next b 2Byte 1 Cycle Instruction e g ADD Bead Read next Opcode agair Read next Discard 1 Byte Read Read next Read next Opcode No Fetch No Fetch Discard No ALE d MOVX 1 Byte 2 Cycle Access External Memory Memory Harvard Architecture Infineon Code Space Extemal Data Space Intemal Data Space FFFF Extemal EPROM 32 k Dec 2000 Page 18 _ oY cor _ Intemal Data Space Every 8th SFR Useful for Stack is Bit Addressable Indirect Direct Address Address Direct and Indirect Address Dec 2000 Page 19 8 Data Pointers 8051 Enhancerrert Infineon Avoid 8051 s Datapointer Bottleneck when accessing external data memory or internal XRAM Ensure Compatibility wi
25. ile Save or press ll Browse to directory c hot505CA 1W5URT 1V Enter project name 1 Click Save B You will see the C505CA block diagram and the Project Settings Window configuration see next slide To get back to the Project Settings window in case you close it Select File Project Settings Infineon Exercise 5URT_1 DAVE Configurations cont B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board Close NOTE By default DAvE enables access to the CAN controller and XRAM Dec 2000 Page 51 Exercise 5URT_1 DAVE Configurations cont B Configure TO Timer Counter 0 Timer 0 B Timer Mode M1 8 bit timer counter THO with divide by 32 prescaler TLO B Timer Options Run Timer TRO B Interrupt Control Enable Timer 0 interrupt Functions This function Initializes Close NOTE This causes Timer 0 to act as an 13 bit timer that causes an interrupt when it overflows Dec 2000 Page 52 Infineon Exercise 5URT_1 DAVE Configurations cont Configure 8 Bit USART Control Global Use TXD P3 1 for serial Channel Mode Control SMO SM1 Mode 1 8 bit data 1 startbit 1 stopbit variable baudrate async Baudrate Clock Source Use the Internal Baud Rate Generator Divide by 2 option
26. ineon embedded technology expertise by offering you context sensitive access to user s manuals data sheets application notes etc directly in your development environment DAVE can help you program the Infineon microcontroller you want to use in your project by offering you intelligent wizards that help you configure the chip to work the way you need it and automatically generate C level templates with appropriate access functions for all of the on chip peripherals and interrupt controls You can follow an exciting online multimedia tutorial how to use DAVE To start the tutorial click on the Tutorial item in the Add Ins menu B More DAVE info at www infineon com DAvE Short Introduction to the Keil HMision2 Integrated Development ErMronment Infineon B Keil uVision2 uVision2 the IDE from Keil Software combines Project Management Source Code Editing and Program Debugging in one powerful environment The Quick Start guide on the starter Kit CD ROM gives you the information necessary to use Vision for your own projects It provides a step by step introduction of the most commonly used Vision features including B Project Setup for the Make and Build Process B Editor facilities for Modifying and Correcting Source Code B Program Debugging and Additional Test Utilities B More information is available on the Starter Kit CD ROM or at www keil com Dec 2000 Page 8 Infineon tuchnel C500 Arch
27. itectural Overview 8 bit Products Product Numbering Scheme C505CA Block Diagram C500 CPU Core Internal amp External Memory Interrupt System C505CA Peripheral Overview Dec 2000 Page 9 Infineon tachnologios Dec 2000 Page 10 em Lowe ULT mm EU C515A with MDU 32K OTP 64K ROMOTP 512 Byte Boot ROM 5 Full CAN 2 0B Full amp Low Speed Many Tirrers Real Time Clock Active Controller He PIE USART 8 10 btA D Nuper Ede suec 8 ch 2 16 bit Timers 8 data nginters P LCC 44 c mE ROMOTP E 12 Bytes RAM Replaces 80C517A C NNECI eu Control Peripheral ee 32k ROM bit Timers USART RT Enhanced Motor UART Control Peripheral ne 8 10 bit A D 2 dA ges Extra 4 ch Capture 12ch 10HtAD Corrpare Unit Tirrers desole 8 Data Poirters Built in PLL 62 64 8 k ROM 32k 16k ROM or 512 Bytes RAM 256 bytes 1280 bytes RAM 16 k ROWOTP 4 ch Capture 4 ch Capture USART Corrpare U Corrpare Unit SSC 8 cdh 8bitA D 8 ch 10 bit A D 3 16 bit Times USART USART P LCC AA 3 16 bit Tirrers 3 16 bit Tirrers PLCC 68 Infineon 423 C505 Part Numbering Scherre SA C505 Standard Prefpc Always Temperatu
28. ler 505 and click Create if this microcontroller is not on the list you need to re install it from the DAVE 2 1 CD B DAVE will create the project Save your project by selecting File Save or press al Browse to directory c hot505CA 1 5CAN 1V Enter project name 1 Click Save B You will see the C505CA block diagram and the Project Settings Window configuration see next slide To get back to the Project Settings window in case you close it Select File Project Settings Infineon Exercise 5CAN_1 DAVE Configurations cont B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board B CAN Baudrate Disable prescaler f CAN f OSC 2 Check this box only if the external oscillator frequency is less than 16 MHz Close Dec 2000 Page 132 Infineon Exercise 1 DAVE Configurations cont Configure CAN Module Baudrate Bit Timing in time quanta Time Segment TSeg1 before sample point tq 4 Time Segment TSeg2 after sample point tq 3 Baudrate Enter desired Baudrate 1000 Kbaud Objects Configure Object 5 Enable Control Enable Message Object MSGVAL Identifier Selection Standard 11 bit Message Direction Transmit data frames receive and answer remote frames Data Length Code Select 8 Dat
29. ly be used in CANs with very low baudrates and or very few messages because of the high CPU load Advantage They use the least possible silicon area Dec 2000 Page 125 Infineon Basic CAN Full CAN cont B Inthe other CAN controllers also message management and acceptance filtering are implemented They are called Full CAN controllers There are several Message Objects each with its own identifier Only if a message for one of these preprogrammed identifier is received it is stored and the CPU is interrupted this way the CPU load is low Full CAN Controller B All Infineon CAN Controllers are Full CAN controllers Dec 2000 But they also provide Basic CAN functionality Page 126 nfineon Features of the Module on the C505CA Functionality corresponds to AN 82527 Complies with CAN spec V2 0B active Standard and Extended CAN B Maximum CAN Transfer Rate 1 MBit s B Full CAN Device 15 Message Objects with their own identifier and their own status and control bits TID XUL 24 7 LE H CH Hi st LJ 5 cures ia ws Each Message Object can be defined as Transmit or Receive Object Dec 2000 Page 127 Dec 2000 128 Infineon Features of the CAN Module on the C505CA cort Programmable Mask Registers for Acceptance Filtering Global Mask for inc
30. mit Message Object 5 Include endless loop USER CODE BEGIN Main 2 CANE ltansmile 5 e USER CODE END This will compile and link the project and create an object file and file Dec 2000 Page 137 Infineon Dec 2000 Page 138 Exercise 1 Run the Code Make sure the evaluation board is powered and connected to COM 1 B Connect the Oscilloscope to P4 0 TXDC connector X3 pin 56 Press the Reset Button on the board Start the Debugger i Press Run You should see signals similar to those on the next slide B stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work 10 8 6 4 2 0 2 4 6 8 10 us 0 50 100 150 200 250 300 350 400 450 500 P4 0 TXDC CAN TRANSMIT PIN The CAN message is automatically re transmitted because no other node is present to receive and acknowledge the message 10 8 6 4 2 0 2 4 6 8 10 10 8 6 4 2 0 2 4 6 8 10 P4 0 TXDC CAN TRANSMIT 2 usec div 1 bit time 1us gt 1Mb s Infineon Watchdog Tiner B 15 Bit timer overflow results in Software reset Sets WDTS flag B Programmable input clock B High 7 bits reload register B Timer period from 153 6us to 314 6ms 20 MHz B Can be reloaded with a special instruction sequence Set Bit WDT Set Bit SWDT Dec 2000 Page 140 Infineon Watchdog Tiner Block Diagram
31. ned by CiA CAN in Automation Network management service provides initialization surveillance and configuration of nodes in a standardized way Takes care of all aspects for the realization of open communication via CAN makes sure manufacturer specific systems work together Available implementations of CAL make it easy for the user to define sophisticated standardized Controller Area Networks Dec 2000 Page 110 Infineon Higher Layer Protocols cont CANopen 05 301 Application profile based on CAL While CAL determines the way of communicating an Application Profile determines the meaning of specific messages for the respective application Target device interchangeability for certain applications Further higher level protocols standards Automotive Sector VOLCANO OSEK in development Industrial Automation DeviceNet ODVA SDS Honeywell Dec 2000 Page 111 Infineon Applicaton Exan ples CAN in motor vehicles cars trucks buses Enables communication between ECUS like engine management system anti skid braking gear control active suspension power train Used to control units like dashboard lighting air conditioning windows central locking airbag seat belts etc body control CAN in utility vehicles e g construction vehicles forklifts tractors etc CAN used for power train and hydraulic control Dec 2000 P
32. oming Messages Full CAN Objects Additional Mask for Message Object 15 Basic CAN Feature Basic CAN Feature Message Object 15 Equipped with two Receive Buffers Own Mask Register for Acceptance Filtering Connection to the Host CPU 500 Module access via SFRs in chip XRAM Interrupt connection to the CPU Flexible interrupt event control connect the application to CAN only transceiver is needed Infineon Connecting the C505CA to CAN Dec 2000 Page 129 Exerdse 1 Transmitting a Standard CAN Message with the CAN Module Infineon Objective Generate a Standard CAN 11 bit Identifier Message with the on chip CAN Module Use maximum bus speed of 1 Mbaud Use Message Object 5 Use ldentifier 0x123 Use 8 Data Bytes containing the data 0x00 0x11 Ox77 B Hints As long as no receiving node is connected to the KitCON 505C the C505CA will not receive an acknowledge for its transmission and therefore will keep on trying to transmit the CAN message forever Connect another Starter Kit with CAN Capability or Analyzer to the CAN bus to generate real CAN data transfers Dec 2000 Page 130 Infineon Dec 2000 Page 131 5CAN_1 DAVE Configurations m Start DAVE 2 1 LA B Select Create a new project from the Startup Dialog or click B Select the microcontrol
33. open all c files Dec 2000 Page 79 Infineon Exerdse 5T2_1 Add User Code B Edit MAIN C include endless loop in main USER CODE BEGIN Main 2 while 1 USER CODE END This will compile and link the project and create an object file and hex file Dec 2000 Page 80 Infineon Dec 2000 Page 81 5T2_1 Run the Code Make sure the evaluation board is powered and connected to 1 Connect the Oscilloscope to 1 1 1 connector 89 and P1 1 CC2 connector X3 pin 86 Press the Reset Button on the board Start the Debugger Press Run You should see signals similar to those on the next slide To stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work 10 8 6 4 2 10 0 8 2 6 4 I SE Vcn 4 6 2 es S 20 40 60 80 100 120 140 160 180 200 us P1 1 CC1 75 Duty Cycle Top P1 2 50 Duty Cycle Bottom Example 5T2 1 572 2 Signal Generation amp Detection with Tiner 2 Description Infineon B Objective Generate a 50 duty cycle PWM signal using T2 channel 1 Frequency 1 kHz Use the channel 1 PWM signal rising edge to trigger a T2 capture event on channel 2 and cause an interrupt B Timer 2 contents will be written automatically to channel 2 Capture Compare register
34. pare module to generate PWM signals Frequency B 10 kHz Duty Cycle 75 on P1 1 CC1 channel 1 B 50 on P1 2 CC2 channel 2 Dec 2000 Page 73 Infineon Dec 2000 Page 74 Exercise 5T2_1 DAVE Configurations Start DAVE 2 1 B Select Create new project from the Startup Dialog or click Select 8 Bit microcontroller 505 and click Create if this microcontroller is not on the list you need to re install it from the DAVE 21 CD ROM B DAVE will create the project Save your project by selecting File Save or press ll Browse to directory c hot505CA 15T2 1V Enter project name 5 2 1 Click Save B You will see the C505CA block diagram and the Project Settings Window configuration see next slide To get back to the Project Settings window in case you close it Select File Project Settings Infineon Exerdse 5T2 1 DAVE Configurations cont B Project Settings System Clock B External Oscillator Frequency Set to 16 MHz or the crystal frequency of your KitCON 505C board Close Dec 2000 Page 75 Infineon Exerdse 5T2 1 DAVE Configurations cont Configure Timer 2 Timer 2 Mode T211 210 Timer Function Reload Mode T2R1 T2R0 Mode 0 auto reload upon timer overflow Reload Value CRCH CRCL Register Value OxFEF5 at 16 MHz for 10kHz frequency Channel 0
35. r DAVE the Digital Application Engineer from Infineon Microcontrollers Version 2 1 an oscilloscope for visualization purposes A Windows95 or higher PC B HOT505CA 1 shows the user from scratch how to generate software for the C505CA with DAVE and the Keil tool chain Dec 2000 Page 5 There are several exercises included small tasks to be solved using every peripheral of the C505CA The user creates a new project in DAvE and configures the device following the detailed instructions Infineon Introduction to HOT5O5CA 1 cont After having generated the code the user B switches to Keil uVision2 creates a new project adds some User Code B compiles assembles links and locates the project After compilation with HVision2 the user B connects to the kitCON 505C the PC serial port B loads starts and debugs his example confirms his working program with a scope screen shots are included for most of the examples Dec 2000 Page 6 Infineon lochnologios Dec 2000 Page 7 Short Introduction to DAVE 2 1 DAVE is your Digital Application Engineer from Infineon Microcontrollers DAVE can help you compare and evaluate the different members of the Infineon C500 8 Bit and C166 16 Bit families of microcontrollers and help you find the right chip for your embedded control application DAVE be your one stop access point to all standard knowledge associated with Inf
36. r 51 Driver select Load Application at Startup check Click OK Use the tree to open all c files Dec 2000 Page 89 Infineon Exerdse 5T2 2 Add User Code B Edit MAIN C include endless loop in main USER CODE BEGIN Main 2 while 1 JH USER CODE END B Edit T2 C define 1 4 as an SFR bit USER CODE BEGIN T2 General l1 sbit 1_4 P1 4 USER CODE END Dec 2000 Page 90 Infineon Exercise 5 2 2 Add User Code cont toggle pin P1 4 in the channel 2 capture ISR USER CODE BEGIN T2 IsrEx5 1 1_4 P1_4 USER CODE END Build All This will compile and link the project and create an object file and hex file Dec 2000 Page 91 Infineon Dec 2000 Page 92 2 2 Run the Code Make sure the evaluation board is powered and connected to 1 Connect the Oscilloscope to 1 1 1 connector 89 and P1 4 connector X3 pin 87 Press the Reset Button on the board Start the Debugger i Press Run You should see signals similar to those on the next slide To stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work Exercise 572 2 Screenshot 10 Rising Edges 8 4 2 10 0 8 diee ARENA SEM M ace 6 4 C 4 6 2 p RR NN id ees casas wot i ISR toggles pin mis P1 1
37. r and include endless loop in main USER CODE BEGIN Main 2 AWC obe t CHANNEL ADC MODES CONT Wi we i USER CODE END Dec 2000 Page 103 Infineon 1 Add User Code cort B Edit ADC C Move A D result to the Capture Compare register USER CODE BEGIN ADC Isr 0 1 ADC ubReadoBitConv USER CODE END Build All This will compile and link the project and create an object file and hex file Dec 2000 Page 104 Infineon Dec 2000 Page 105 Exercise 5ADC 1 Run the Code Make sure the evaluation board is powered and connected to 1 Connect the Oscilloscope to 1 1 1 connector 89 and the potentiometer to P1 0 connector X3 pin 69 or 85 Press the Reset Button on the board Start the Debugger Press Run As you adjust the potentiometer you should see the duty cycle of the PWM on P1 0 change To stop the code press the RESET button on the evaluation board the Halt button on the debugger will not work 2000 Infineon User Benefits CAN is low cost Serial bus with two wires good price performance ratio Low cost protocol devices available driven by high volume production in the automotive and industrial markets About 15 000 000 CAN nodes in use so far B CAN is reliable Sophisticated error detection and error handling mechanisms results in
38. re Range B 0 to 70 C H 40 to 110 C 40 to 85 40 to 125 C Basic Type with CMOS indicator Ore letter with three numbers eg C504 C167 Functionality Option Field optional For the C505 the functionality field can be blank C505 Basic C505 C C505C C505A C505 Enhancerrerts CA CBOSCA Enhancerrerts L C505L LCD Controller Dec 2000 Page 11 Package Type P P DIP M P MQFP N P LCC Speed for all C505 Devices is 20 MHz ROM Type L ROMESS R Mask ROM EPROM Flash EEPROM ROM Size n x amp k blank ROMess 1 8k 4 32k 2 16k 8 64k ar Infineon Inehnalagins C505CA Block Diagram Oscillator Watchdog OSC amp Timing 8 lines 8 lines 8 lines 8 lines Dec 2000 Page 12 Infineon Dec 2000 Page 13 Architectural Overview adapted to C505CA Complete 8 bit architecture with fully compatible instruction set to standard 8051 8052 microcontroller Up to 20 MHz CPU clock results in an instruction cycle time of 300ns which guarantees highest CPU performance CPU Frequency External Clock Frequency 6 To avoid an accumulator bottleneck four banks with eight General Purpose Registers GPRs are implemented The register banks are fixed located in the lower 32 locations of the internal RAM Easy and efficient programming is supported by powerful instructions 64 of 111 inst
39. ructions are executed in one machine cycle 256 directly addressable bits Transparent programming of on chip peripherals via Special Function Register SFR interface o Diagram C500 CPU 8051 Compatible 03495 T 2 FEE 54 RON BUSCOP St 0 A gt ALU ROM TMP 5 TMP 2 gt Bit Internal quum Bus E bros Kc cm 2 qu Shift Fla pue Control Gontro Control Signais INT Bus ERN Control Logic HK Contro sng sseppy 9 Finite State Machine Dec 2000 Page 14 Infineon Addressing Modes Register Addressing 8 registers RO R7 in one of the four available register banks B e g MOV A Rr B Direct Addressing Special Function Registers SFRs and the lower 128 bytes of internal RAM B e g MOV dadri dadr2 B immediate Addressing Constants in the program memory are allowed to be part of the instruction Dec 2000 B e g MOV A const8 Page 15 Infineon Addressing Modes cont B Register Indirect Addressing 256 bytes of internal RAM or the lower 256 bytes of external data memory or XRAM via the contents of either RO or R1 in the selected register bank B e g Ri A or A External data memory using 16 bit data pointer B e g MOVX DPTR Base Register Plus Index Register Addressing Indirect move from the location w
40. smission errors All nodes receive the Data Frame Those who do not need the information just don t store it Dec 2000 Page 119 Infineon CAN Rerrote Franes B ask for information CAN nodes use Remote Frames A Remote Frame consists of the Identifier and the CRC Checksum It contains no data The identifier contains the information that is requested engine speed oil temperature etc and the message priority The node that is supposed to provide the requested information e g the sensor for the oil temperature does so by sending the corresponding Data Frame same identifier the Data Field contains the desired information Dec 2000 Page 120 Infineon CAN Rerrote Frane Scenario Dec 2000 Page 121 Infineon Standard CAN Extended CAN B Most CAN nodes talk in the language that most other CAN nodes understand They use Standard Data or Remote Frames A Standard Frame contains an identifier which is 11 bits long With this 11 bits 211 22048 different messages can be addressed CAN nodes using Standard CAN Frames use the CAN Specification Version 2 0A B Some CAN nodes talk with a special accent They use Extended Data or Remote Frames An Extended Frame contains an identifier which is 29 bits long Dec 2000 Page 122 Infineon Standard CAN Extended CAN cont Over 536 million 229 different messages can be a
41. th existing software External Data Memory Or XRAM Dec 2000 Page 20 Infineon Iuchnalagius Dec 2000 Page 21 External Bus Access 4 Machine Cycle 1 One Machine Cycle o 51 s2 55 54 55 56 51 52 55 54 55 56 ALE 2 2 2 E CH PCH OUT OUT OUT OUT PCL QUT PCL OUT PCL OUT PCL OUT valid valid valid valid One Machine Cycle gt lt One Machine Cycle 51 52 55 55 se S1 gt s3 54 55 se ALE 2 RD gt PCH PCH DPH OUT OR PCH OUT OUT P2 OUT OUT OUT IN 5 PCL OUT ADDR OUT PCL OUT valid valid valid without B without Infineon tachnologios Extemal Connection to Memory Code Memory Data Memory up to 64 kBytes up to 64 kBytes without Internal EL L P3 6 WR P3 7 RD Dec 2000 Page 22 Infineon Interrupt System B interrupt Controller Short interrupt response time Context Switching Short interrupt service overhead Low total latency gives highest real time performance Comprehensive prioritization scheme B Easy scheduling of complex real time systems by using up to 4 priority levels B Simultaneous interrupts of same priority undergo a group wise arbitration using the inherent priority structure Dec 2000 Page
42. timer overflow Reload Value CRCH CRCL Register Value OxF596 at 16 MHz for 1kHz frequency Channel 0 1 B Channel 1 Mode Compare enabled B Channel 1 Compare Register value CCH1 CCL1 OxFACB at 16 MHz for 50 duty cycle Dec 2000 Page 86 Infineon Exerdse 572 2 DAVE Configurations cont Channel 2 3 Channel 2 Mode Capture on rising edge at pin P1 2 CC2 Channel 2 Interrupt Enable CC2 interrupt Functions B T2 vinit Close B Generate Code gt B DAVE will show you all the files that he has generated File Viewer is opened automatically Dec 2000 Page 87 Infineon Dec 2000 Page 88 Exercise 2 2 UVision Configurations B Start Keil uVision2 NOTE uVision2 is able to read the DAVE project settings contained in the dpt file and automatically create a uVision2 project u Vision2 will also automatically generate the assembly startup file B Create the new Project by opening the DAVE dpt file Project Open Project c hot505CA 1512 25512 2 dpt Exercise 572 2 UVision Configurations B Setup the uVision2 Target Options Project Options for Target Target 1 Demo Tools always Target place code at 0x4000 B Use On Chip XRAM 0 00 Check Off chip Code Memory Eprom Start 0x4000 Eprom Size 0x4000 Off chip Xdata memory no external RAM needed Debug Use Keil Monito
43. us ET J B Exercise Overview B How to set up the Hardware and Software B Peripherals in Detail Exercises Timer Counter 0 Timer Counter 1 USART A D Converter Timer 2 CAN Module Exercise Overview B Exercise for USART and TO T1 5URT_1 Asynchronous Serial Transmission of data periodically 5URT_2 Synchronous Serial Transmission of data periodically B Exercise for Timer 2 CAPTURE COMPARE UNIT 512 1 using Timer 2 512 2 Signal Generation Signal Detection with Timer 2 B Exercise for the Analog to Digital Converter 5ADC 1 Control the Pulse Width of a PWM signal with ADC Value using the ADC ISR B Exercise for the CAN Module 5 1 Transmit a standard CAN Message with the On Chip CAN Module C505C and C505CA only Requires External Connections Pi E Requires External Connections and Components age Infineon Hints regarding the Exercises B Exercise numbering scheme Generally the exercise name contains the starter kit the peripheral the exercise was mainly designed for and a running number Exercise 5 2 would be the 2nd example for the USART using the kitCON 505C Starter Kit B create a new exercise For each exercise use a different subdirectory c hot505CA e g c hot505CA 1 5URT 1 Dec 2000 Page 30 Infineon Dec 2000 Page 31
44. ways re install or delete derivatives later on Be sure to install the Smart Search f you d like to get a detailed introduction to DAvE 2 1 be sure to include the tutorial You can delete it afterwards to free up space B f you don t have Acrobat Reader installed on your PC do so by choosing to install Acrobat Reader which is included on the DAvE CD Hint You need Acrobat Reader 4 0 or higher Please note You need WINDOWS 95 or later or WINDOWS NT in order to run DAvE Dec 2000 Page 37 System Setup Infineon _ Install Keil HVision2 B Most of the Starter Kit CDROMs contain an old version of uVision B Please go to the Keil web site www keil com and download the latest Keil 8051 evaluation tools Please Note The Evaluation version of the Tools 15 restricted to 2k of Code The Code will be located at address 0x4000 Dec 2000 Page 38 Infineon Hints regarding DAVE 2 1 To create a new Project with DAVE Select File New from the pull down menu or press Select your microcontroller and click create To generate code with DAVE Select File Generate Code from the pull down menu or press Ed B configure a peripheral Move your mouse over the peripheral when DAvE shows the block diagram and click the left mouse button B To get context specific help in DAVE Move your mouse over the item you want to find out about sometimes a yellow te
45. xt window will pop up When configuring peripheral click the info button arrow to go to the corresponding Users Manual chapter Select View Register Explorer or press L1 Validate each alpha numeric entry by pressing ENTER m save amp close any DAVE window click 4 Dec 2000 Page 39 Infineon Hints regarding the Exercises m The exercises are created in a way that they use only peripherals which have been introduced already either directly before the exercise or in previous exercises B f an exercise does not work when running the debugger Check the oscilloscope connections right pin Check the DAVE Vision configurations Re generate the code with USER CODE remains Recompile the exercise in ui Vision Reload the exercise into the debugger and run it again The debugger may appear to react slowly when using Windows NT Dec 2000 Page 40 Infineon Dec 2000 Page 41 Infineon Dec 2000 Page 42 Peripheral Overview Universal Sync Async Receiver Transmitter USART Baud Rate Generation from External Oscillator Dedicated Baud Rate Generator or Timer 1 Mode 0 Synchronous Mode Half Duplex Fixed Baud Rate f 6 8 data bits LSB first TxD Pin used as shift clock RxD Pin used for data Mode 1 Asynchronous Mode Full Duplex Variable Baud Rate 8 data bits LSB first 1 Start Bit 0 1 Stop Bit 1 Infin

Download Pdf Manuals

image

Related Search

HOT505CA_1

Related Contents

Crossbow Owner`s Manual - Parker Bows  8 - CRAM Grupos Electrógenos  業務実績一覧 - 森のエネルギー研究所  Sony VGN-Z590UAB Marketing Specifications  ~~""-トラスコキャビネッ ト キ 取扱説明書  A/B/Y/Z(8) - Micropulse Linear Position Sensors  Electrodo de nivel NRG 16-11, NRG 17-11, NRG 19-11  

Copyright © All rights reserved.
Failed to retrieve file