Page 201 - 2
P. 201
{
if(motor_spin==0)
{
PORTB.0=1;
PORTB.1=0;
}
}
interrupt [EXT_INT6] void external_int6(void)
{
if(motor_spin==0)
{
PORTB.0=0;
PORTB.1=1;
}
}
interrupt[USART0_RXC] void RX_interrupt(void)
{
rx = UDR0; // 수신된 데이터가 저장된 UDR0 송수신 데이터 레지스터를 rx 에 대입
PORTB.2=~PORTB.2; // ISR 로 들어오는것 LED 로 확인
TIMSK=0x05;
}
interrupt [ADC_INT] void adc_isr(void)
{
count = ADCW - 9;
temData();
}
interrupt [TIM0_OVF] void timer_int0(void)
{
t_count++;
if(t_count==300)
{
LCD_TEMDATA();
PORTA.0=~PORTA.0;
t_count=0;
}
}
interrupt [TIM1_OVF] void timer_int1(void)
{
timer++;
if(timer==time)
{
PORTA.2=1;
delay_ms(1000);
PORTA.2=0;
stop();
- 201 -