合泰单片机C编译后无可烧写文件*.mtp,请各位大侠帮忙!
时间:10-02
整理:3721RD
点击:
//包含单片机头文件
#include "HT46F48E.h"
//中断声明
#pragma vector external_isr @ 0x4
#pragma vector timer0_isr @ 0x8
#pragma vector timer1_isr @ 0xc
//未定义数据存储变量声明
unsigned int uia,uib;
unsigned long ula,ulb;
//数据存储0变量声明
unsigned int uia0,uib0;
unsigned int ula0,ulb0;
unsigned char led_100c; //定义100度灯
unsigned char led_80c; //定义80度灯
unsigned char led_60c; //定义60度灯
unsigned char led_300ml; //定义300ml灯
unsigned char led_600ml; //定义600ml灯
unsigned char led_900ml; //定义900ml灯
unsigned char led_boil; //定义煮水灯
unsigned char led_lock; //定义解锁灯
unsigned char led_woter; //定义有水灯
unsigned char key_on; //定义启动键
unsigned char key_c; //定义选温键
unsigned char key_ml; //定义选容量键
unsigned char key_lock; //定义解锁键
unsigned char key_moto; //定义出水键
unsigned char boil_real; //定义煮水继电器
unsigned char buzze_; //定义蜂鸣器
unsigned char cool_moto; //定义冷水电泵
unsigned char therm_moto; //定义热水电泵
unsigned char ntc_; //定义热敏电阻
//中断服务程序
void external_isr() {
}
void timer0_isr() {
}
void timer1_isr() {
}
//初始化寄存器加以保护
void safeguard_init() {
_intc=0;
_tmrc=0;
_tmr=0;
_pac=0xff;
_pbc=0xff;
_pcc=0xff;
_pdc=0xff;
}
//主程序
void main()
{
safeguard_init(); //寄存器初值
//direction=0; //左移
_pac=0; //设置pa口为输出口
_pbc=0; //设置pb口为输出口
_pcc=0; //设置pc口为输出口
_pdc=0; //设置pd口为输出口
led_100c=1; //设置初始灯亮
_pb5=led_100c;
led_300ml=1;
_pa2=led_300ml;
}
#include "HT46F48E.h"
//中断声明
#pragma vector external_isr @ 0x4
#pragma vector timer0_isr @ 0x8
#pragma vector timer1_isr @ 0xc
//未定义数据存储变量声明
unsigned int uia,uib;
unsigned long ula,ulb;
//数据存储0变量声明
unsigned int uia0,uib0;
unsigned int ula0,ulb0;
unsigned char led_100c; //定义100度灯
unsigned char led_80c; //定义80度灯
unsigned char led_60c; //定义60度灯
unsigned char led_300ml; //定义300ml灯
unsigned char led_600ml; //定义600ml灯
unsigned char led_900ml; //定义900ml灯
unsigned char led_boil; //定义煮水灯
unsigned char led_lock; //定义解锁灯
unsigned char led_woter; //定义有水灯
unsigned char key_on; //定义启动键
unsigned char key_c; //定义选温键
unsigned char key_ml; //定义选容量键
unsigned char key_lock; //定义解锁键
unsigned char key_moto; //定义出水键
unsigned char boil_real; //定义煮水继电器
unsigned char buzze_; //定义蜂鸣器
unsigned char cool_moto; //定义冷水电泵
unsigned char therm_moto; //定义热水电泵
unsigned char ntc_; //定义热敏电阻
//中断服务程序
void external_isr() {
}
void timer0_isr() {
}
void timer1_isr() {
}
//初始化寄存器加以保护
void safeguard_init() {
_intc=0;
_tmrc=0;
_tmr=0;
_pac=0xff;
_pbc=0xff;
_pcc=0xff;
_pdc=0xff;
}
//主程序
void main()
{
safeguard_init(); //寄存器初值
//direction=0; //左移
_pac=0; //设置pa口为输出口
_pbc=0; //设置pb口为输出口
_pcc=0; //设置pc口为输出口
_pdc=0; //设置pd口为输出口
led_100c=1; //设置初始灯亮
_pb5=led_100c;
led_300ml=1;
_pa2=led_300ml;
}