#include <avr/io.h>
#include <avr/interrupt.h>
#include "LCD.h"
#pragma interrupt_handler adc_isr:iv_ADC
void adc_isr(void)
{
// ADCSRA|=(1<<ADIF);
// reti();
Write_String(0,0,"test8");
_delay_ms(1000);
}
void main(void)
{
WDTCR=(1<<WDCE)|(1<<WDE);
WDTCR=0X00;
LCD_Init();
LCD_Clear();
Write_String(0,0,"test1");
_delay_ms(1000);
DDRF=0xFE;
PORTF=0xFE;
ADCSRA=0x00;
Write_String(0,0,"test2");
_delay_ms(1000);
ADMUX=0xC0;
Write_String(0,0,"test3");
_delay_ms(1000);
ADCSRA=0xBF;
Write_String(0,0,"test4");
_delay_ms(1000);
sei();
Write_String(0,0,"test5");
_delay_ms(1000);
ADCSRA|=(1<<6);
Write_String(0,0,"test6");
_delay_ms(1000);
while(1)
{
Write_String(0,0,"test7");
}
}
没有好的调试工具 只好用test检测 反复刷新显示test1~5 不往下走了 不知道是哪里写错了 求大神指教! |