英飞凌单片机例程tc1767_taskingv33r2_flash

合集下载

英飞凌单片机例程tc1767_taskingv33r2_spram

英飞凌单片机例程tc1767_taskingv33r2_spram
while( 1 );
Note: DAvE doesn‟t change code that is inserted in the „USER CODE‟ sections if you let DAvE regenerate code. Therefore, whenever adding code to the generated code, write it into a „USER CODE‟ section. If you want to change DAvE generated code or add code outside these „USER CODE‟ sections you have to modify your changes after each time you let DAvE regenerate code!
confidential
Page 15
Exercise MEM_2 Tasking Viper : Change Link script file
Select MEM_2.lsl file and unlock the Memory Change the ROM setting
Change the type of SPRAM to ROM
confidential
Page 6
Exercise MEM_2 Tasking Viper : Start Viper
Start TASKING VX-toolset for tricore Click on Open Project Work Space Filename: browse to “d:\hot\tc1767” Click „OK‟
1
confidential

英飞凌单片机例程tc1767_taskingv34r1_can_1

英飞凌单片机例程tc1767_taskingv34r1_can_1

Exercise CAN_1 DAvE Configurations (cont.)
Configure ASC0 (cont.) Pin selection / ASC0_RX and ASC0_TX:
Use Pin P3.0 as ASC0 receive signal. Use Pin P3.1 as ASC0 transmit signal.
Click here
confidential
Page 8
Exercise CAN_1 DAvE Configurations (cont.)
Configure ASC0 Module Clock:
Enable ASC0 module. Module clock: 40MHz.
confidential
Project Settings (cont.) MultiCAN / List
Drag MO 000 to Node 0 Drag M2 000 to Node 1
Drag from list on left
confidential
Page 26
Exercise CAN_1 DAvE Configurations (cont.)
confidercise CAN_1 DAvE Configurations (cont.)
Configure ASC0 (cont.) Baud Rate :
Required Baud rate: 19200 Baud.
confidential
Page 13
Exercise CAN_1 DAvE Configurations (cont.)
Configure ASC0 (cont.) Interrupts :

Infineon(英飞凌)单片机教案PPT

Infineon(英飞凌)单片机教案PPT

XC167CI单片机特性




8KB/12 KB片上RAM 128 KB/256 KB程序Flash存储器 16通道10位数模转换器,转换时间< 3 µs 各带两个独立时间基准的两个16通道捕获/比 较单元 带有两个独立定时器的CAPCOM6模块,产生用 于交流和直流电机控制的PWM信号 10位寻址,400 kbit/s的I² C总线模块



9针RS-232 串口( ) 1--CD载波侦测( Carrier DetectDB9 ) 2 -- RXD接收数据(Receive) 3 -- TXD发送数据(Transmit) 4 -- DTR数据终端准备(Data Terminal Ready) 5 -- GND地线(Ground) 6 -- DSR数据准备好(Data Set Ready) 7 -- RTS请求发送(Request To Send) 8 -- CTS清除发送(Clear To Send) 9 -- RI振铃指示(Ring Indicator)
微型计算机的组成框图 (由多个IC芯片组装在一个主电路板上)
所有单元都组装 在一个IC芯片上
Infineon单片机分类

根据每种型号的存储器的类型分类

无ROM型:C167CR-LM ROM型 :C167CR-16RM OTP型 :C164CI-8EM FLASH型 :XC167CI-32F
JTAG引脚说明

TCK为测试时钟输入 TDI为测试数据输入 TDO为测试数据输出 TMS为测试模式选择 /TRST为测试复位,输入引脚,低电平有效。
启动模式选择
模式开关说明
启动模式说明

英飞凌单片机例程tc1767_taskingv33r2_introduction

英飞凌单片机例程tc1767_taskingv33r2_introduction
/support/TriCore/index.html
Note : You may have to reboot your computer at the end of the installation.
Note: the Infineon DAS servers are automatically installed together with Tasking‟s tool chain.
Context Sensitive Help provides complete command syntax and detailed description with hypertext links to the user manual.
More information is available at
For internal use only Page 5
Introduction to the Tasking Viper for Tricore
Assembler: The BSO/TASKING assembler is an integral part of the tool set but delivers features that enable it to be used on its own. It is supplied complete with linker/locator, librarian and object format utilities. Linker/Locator: The linker and locator is an essential part of the software building process that enables you to link and locate modules in target memory. More information is available at

英飞凌单片机例程tc1767_taskingv33r2_pwm_ltc

英飞凌单片机例程tc1767_taskingv33r2_pwm_ltc

confidential
Page 17
Exercise GPTA_LTC_PWM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC4/LTC4:
Enable LTC4 after initialization. Mode: Compare with Last Timer. LTC4 register value : 0x05DB. Reset the LTC4 output by a local event or copy previous cell action. LTC4mode control: Enable high level of „Select Line Input‟.
Page 19
Exercise GPTA_LTC_PWM DAvE Configurations (cont.)
GPTA0 Output Pins:
Click on “OUT1”.
confidential
Page 20
Exercise GPTA_LTC_PWM DAvE Configurations (cont.)
confidential
Page 4
Exercise GPTA_LTC_PWM PWM Signal Update (Coherent)
Timer
0 Compare_0(Period) 0 1 Compare_1(Period) 0 1
Reset timer
-1
Compare_0(Duty) Compare_1(Duty)
Select “GPTA0_vInit”.
confidential
Page 22

51单片机电机三档调速程序

51单片机电机三档调速程序

/*******************************************一键三档风扇程序 2022年8月28日******************************************/#include<reg52.h> //包含52单片机寄存器定义的头文件#include<intrins.h>unsigned char Tab[ ]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; //段码表sbit ON_OFF=P3^2;//开关定义sbit motor=P3^5;//马达控制脚sbit dis=P3^4;int i=0;//档位标志void delay1ms(unsigned int i) //1ms延时程序{unsigned int j;for(;i>0;i--)for(j=0;j<125;j++){;}}/******************************************************************函数功能:延时约0.6ms********************************************************************/void delay(void){unsigned char j;for(j=0;j<200;j++);}void settinglow(){motor=0;_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();motor=1;}/****************************************************************** 函数功能:显示计数次数的子程序入口参数:i********************************************************************/ void Display(unsigned char i){dis=0; //P3.4引脚输出低电平,数码管点亮P1=Tab[i%10]; //显示个位delay();dis=1;P1=0xff;delay();}/*******************************************函数功能:主函数******************************************/void main(void){EA=1; //开放总中断EX0=1; //允许使用外中断IT0=1; //选择负跳变来触发外中断i=0;motor=0;while(1){if(i>0){Display(i);}switch(i){case 0:motor=0;break;case 1:motor=1;break;case 2:settinglow();break;case 3:motor=~motor;break;}}}/************************************************************** 函数功能:外中断T0的中断服务程序**************************************************************/ void it0(void) interrupt 0 using 0 //外中断0的中断编号为0{if(ON_OFF==0){delay1ms(50);if(ON_OFF==0){i++;//按一次开关键,改变一个档位}}if(ON_OFF==0){delay1ms(1000);//长按1秒则关闭风扇if(ON_OFF==0){i=0;}}if(i==4)//最慢档后再按一次到最快档{i=1;}}。

英飞凌16_32位单片机一级JTAG连接引脚配置

英飞凌16_32位单片机一级JTAG连接引脚配置

Application Note
5
V2.2.1, 2003-07
AP24001 OCDS Level1 JTAG Connector
Low Cost EVA Board Connector
4
Low Cost EVA Board Connector
The Infineon StarterKit boards are equipped with a low cost DB25 printer port connector. The JTAG Signals are mapped to the following Printer-Port signals. It is not recommended to use a DB25 connector in customer applications since the onboardwiggler would eat up additional board space & power.
Controller Area Network (CAN): License of Robert Bosch GmbH
We Listen to Your Comments Is there any information in this document that you feel is wrong, unclear or missing? Your feedback will help us to continuously improve the quality of our documentation. Please send your comments (including a reference to this document) to: ipdoc@

sonix单片机硬件电路设计实例(工程师多年经验总结)教学教材

sonix单片机硬件电路设计实例(工程师多年经验总结)教学教材

s o n i x单片机硬件电路设计实例(工程师多年经验总结)单片机产品设计--功能评估1,先得了解MCU 的功能及每一个管脚的做用(输入口还是输出口或双向口或是其他特殊端口),确定用什么样的电源输入(变压器或阻容降压),有无大电流负载及一些安规方面的要求,体积封装大小有无规定。

2,采用电池供电时是否要考虑做一些省电低功耗线路。

3,带检测功能的产品是否用到A/D功能,有无必要用到一些精密参考源,主要针对测量及充电电路,或是可否直接采用RC充放电线路来做模拟量检测, A/D通道转换需要一定的稳定时间,在软件设计时需要作考量。

为了保证每次A/D转换的稳定与正确,最好在每次A/D转换前都重新确定A/D转换通道、A/D转换分辨率、A/D时钟源选择位,而且根据所应用场合对所取得数据进行合理的处理。

A/D转换在硬件设计方面的注意事项:信号源要尽量与A/D转换输入端接近,而且要视芯片输入阻抗添加合适的电容并入信号源输入端。

此外需保证A/D转换基准电压的稳定,模拟地与数字地要分开或隔离。

4,操作时有多少个按键,能否采用跟其他I/O口复用来节少I/O口资源,按键是否要采用唤醒功能,即采用带有唤醒功能的I/O口,按键输入可否采用矩阵扫描,以便节省单片机的I/O口。

5,输出指示能否跟输出控制I/O口复用,这样也可以节省I/O口,但要考虑到输出电流的大小,不能影响负载的正常输出控制。

6,有无精确度要求较高的定时,用来确定采用什么样的振荡源( 晶振,陶振,外部RC及MCU内部RC)。

7,复位电路的选取,I/O口不够时能否采用内部复位, 芯片的上电复位时间与系统电压上升速度,外部振荡器频率、种类及外部Reset 电路造成的delay都有关联。

8,有无显示电路,是LED还是LCD,是否必要采用外挂驱动电路或直接采用I/O口推动,一般采用I/O口推动的 LCD,com口都采用1/2 偏压。

直接用两电阻分压。

9,大电流负载输出采用mos管,继电器还是可控硅控制?当输出为可控硅时,是否采用共地或共电源控制,或是用直接耦合还是用光电耦合,同时得考虑是否要用到到同步信号做一些调速、调光、调功率、调温度等可调的控制功能(同时些交流同步信号也可以做一些定时产品的参考)。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Page 11
Exercise MEM_1 – Tasking Viper Reflash Project
Refresh files in the project Right click on „MEM_1‟ in the navigator
Select „Refresh‟ from the pull down menu
confidential
Page 5
Exercise MEM_1 Dave Configuration(cont.)
Save (File Save) this DAvE file in : d:\hot\tc1767\MEM_1\MEM_1.dav Let DAvE now generate the code for you Go to File Generate Code or click: DAvE opens a new window with the Project Documentation file. On the left hand side a browser window shows the generated files. You can take a look at the generated code or just find out in which file DAvE put the included functions. In general:
Programming the internal flash Exercise MEM_1
Exercise MEM_1 Objective
Objective: Pregram the internal Flash Run the code from here: on board LED will blink.
confidential
Page 4
Exercise MEM_1 Dave Configuration(cont.)
Project Settings - opens automatiБайду номын сангаасally General:
Fvco : 640MHz System Clock:80MHz
External oscillator
confidential
Page 19
Exercise MEM_1 Tasking Viper : Complete generated code
At the end:
// USER CODE BEGIN (Main_General,10) v o id del a y ( v o i d ) { v olatile int i , j ,k ; f or (i=0;i<50 0 0 ; i+ + ) for (j=0;j<2 0 0 ; j ++ ) k = i+ j ; } // USER CODE END
Interrupt table start address: 0xa00f 0000
confidential
Page 17
Exercise MEM_1 Tasking Viper : Complete generated code
On the following slides please find the code you have to add to the generated code. For reasons of orientation you will always find a few lines of already existing code as well. The code you really have to add looks like this:
confidential
Page 3
Exercise MEM_1 Dave Configuration(cont.)
Project Settings - open automatically General:
Compiler Settings: Tasking Use Infineon DAvE sfr Header.
Let’s get started now!
confidential
Page 2
Exercise MEM_1 Dave Configuration
Start DAvE for TC1767.
Create a new project: Go to File New Select microcontroller: „TC1767‟.
while( 1 );
Note: DAvE doesn‟t change code that is inserted in the „USER CODE‟ sections if you let DAvE regenerate code. Therefore, whenever adding code to the generated code, write it into a „USER CODE‟ section. If you want to change DAvE generated code or add code outside these „USER CODE‟ sections you have to modify your changes after each time you let DAvE regenerate code!
ldarm : 0xd000 0000.
pram : 0xf005 0000. pcode : 0xf006 0000.
confidential
Page 16
Exercise MEM_1 Tasking Viper : Setting Link script file(cont.)
Select and check Special area Reset start Address Trap table start address CSA start address Number of context block : 0xa000 0000 : 0xa00f 2000 : 0xd000 0000 : 64.
confidential
Page 18
Exercise MEM_1 Tasking Viper : Complete generated code(cont.)
Edit „main.c‟ - function „main‟ (almost at the end)
// USE R CO D E B EGI N (M a in, 9) voi d d el ay ( voi d); // Def in e P ort 5/ Pi n0 as gen er al IO P5_ IOC R0 = 0x 00 0 000 80; // end le ss loo p whi le( 1) { // set l ed off P5_ OUT = 0 x 000 000 01 ; // wai t del ay( ); // set l ed on P5_ OUT = 0 x 000 000 00 ; // wai t del ay( ); } // USE R CO D E E ND
confidential
Page 7
Exercise MEM_1 Tasking Viper : Create New Project
Click on Workbench (if not already there…)
1
confidential
Page 8
Exercise MEM_1 Tasking Viper : Create New Project(cont.)
if the included function is a macro it is included in the „.h‟ file if the included function is a function it is included in the „.c‟ file
file main.c and main.h will be generated
confidential
Page 13
Exercise MEM_1 Tasking Viper : Deselect the „sfr‟ file in Tasking
Set Project Properties Click on „Project‟ and „Properties‟ Click „Setting‟ and „Preprocessing‟ Disable „Automatic inclusion of „.sfr‟ file‟
Create New Project Click on File New Select „Tasking VX-toolset for Tricore C/C++ Project‟
1
confidential
Page 9
Exercise MEM_1 – Tasking Viper Create New Project(cont.)
confidential
Page 6
Exercise MEM_1 Tasking Viper : Select a workspace
Start TASKING VX-toolset for tricore Click on Open Project Work Space Filename: browse to “d:\hot\tc1767” Click „OK‟
Tricore Project Settings Click “AUDO Future Family” and select “TC1767” Enable “C startup code”,”Linker script file” and “synchronizaqtion file”
相关文档
最新文档