|
楼主 |
发表于 2010-11-24 20:00:03
|
显示全部楼层
回复【1楼】fsclub 绿林好汉
-----------------------------------------------------------------------
1、下面是我的程序,是关闭了总的中断的啊,但结果还是没有关闭,好像在哪儿又给开了
#include <iom48v.h>
#include <macros.h>
#include ".\head\ICC_AVRPORTBit.h"
#include ".\head\Delay.h"
//#include ".\head\keyboard_matrix.h"
//#include ".\head\keyboard_self.h"
#include ".\head\Uart.h"
//#include ".\head\I2C.h"
#include ".\head\DS18B20.h"
//#include ".\head\ICC_3HC595_cascade.h"
//#include ".\head\ICC_LED_7Seg.h"
//#include ".\head\SD2405.h"
#include ".\head\RT1602.h"
#include ".\head\Timer0.h"
#define uint8 unsigned char
uint8 Tempreture_string[5];
void main()
{
uint8 i;
uint8 DisplayString[]={"my name is xtaens 123456789012345"};
static uint8 uu[]={0xC3,0xC3,0x24,0x18,0x18,0x24,0xC3,0xC3};
//PORTD_PD4=1;
Init_Uart0();
Timer0_Init();
//LED_Display_Init();
CLI();
//SD2405_Init();
//SD2405_SetTime();
RT1602C_Init();
//RT1602C_DisplayString(DisplayString);
//SEI(); //re-enable interrupts
while (1)
{
TemperatureUpdate();
Tempreture_string[0]=Tempreture[0]+'0';//-
Tempreture_string[1]=Tempreture[1]+'0';
Tempreture_string[2]=Tempreture[2]+'0';
Tempreture_string[3]=Tempreture[3]+'0';
Tempreture_string[4]=Tempreture[4]+'0';
//Tempreture_string[5]=Tempreture[5]+'0';
//Uart_TXD_String(Tempreture_string,0);
// RT1602C_DisplayString(" ");
Delay_nms(50);
if(Timer_flag==1)
{
RT1602C_DisplayString(uu);
//RT1602C_DisplayString(Tempreture_string);
//RT1602C_DisplayString(" ");
//Delay_nms(50);
Timer_flag=0;
}
//RT1602C_DisplayString(" ");
}
}
3、关键是8个中断只有一个中断标志啊,这个不理解 |
|