Subversion Repositories svnkaklik

Rev

Rev 221 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 221 Rev 223
Line 1... Line 1...
1
//********* Robot Camerus pro IstRobot 2007 ************
1
//********* Robot Camerus pro IstRobot 2007 ************
2
//"$Id: camerus.c 221 2007-04-01 21:34:53Z kakl $"
2
//"$Id: camerus.c 223 2007-04-02 19:05:22Z kakl $"
3
//*****************************************************
3
//*****************************************************
4
 
4
 
5
#include ".\camerus.h"
5
#include ".\camerus.h"
6
 
6
 
7
#USE FAST_IO (C)     // Brana C je ve FAST_IO modu, aby slo rychle cist z kamery
7
#USE FAST_IO (C)     // Brana C je ve FAST_IO modu, aby slo rychle cist z kamery
Line 156... Line 156...
156
}
156
}
157
 
157
 
158
#int_EXT
158
#int_EXT
159
EXT_isr()   // Preruseni od prekazky
159
EXT_isr()   // Preruseni od prekazky
160
{
160
{
161
   set_pwm1_duty(0);    // zabrzdi
161
   set_pwm1_duty(0);    // zabrzdi levym kolem, prave vypni
162
   set_pwm2_duty(0);
162
   set_pwm2_duty(0);
163
   output_high(MOT_L);
163
   output_high(MOT_L);
164
   output_high(MOT_R);
164
   output_low(MOT_R);
165
   // Ujistime se, ze prijaty signal je z naseho IR vysilace
165
   // Ujistime se, ze prijaty signal je z naseho IR vysilace
166
   output_high(IRTX);   // Vypni LED na detekci prekazky
166
   output_high(IRTX);   // Vypni LED na detekci prekazky
167
   delay_ms(2);
167
   delay_ms(2);
168
   if (!input(IRRX))    // stale nas signal?
168
   if (!input(IRRX))    // stale nas signal?
169
   {
169
   {