6 #define PIEX 50 //Set how many piexs in one line
7 #define LINE 60 //Set how many lines in one frame
8 #define FRAME 1 //Set how many frames to acquisition
14 #define S0 0 //Speed Switcher
22 #define M 3650 // Direction Switcher
30 #define LED1 PORTB_PB4
31 #define LED2 PORTB_PB5
32 #define LED3 PORTB_PB6
33 #define LED4 PORTB_PB7
35 #define KEY1 PORTE_PE6
36 #define KEY2 PORTE_PE5
37 ///#define KEY3 PORTE_PE6
38 //#define KEY4 PORTE_PE7
50 /* **************************************************
51 * Board declared global variables .
52 * PAY ATTENTION to define each one at modified file.
53 * **************************************************/
55 extern byte LINECNT
; //Count line numbers while IRQ is enable
56 extern byte FRAMECNT
; //Count frame numbers while PJINT is enable
59 extern byte LOFCNT
; //Count each LINEACH capture one line
61 extern byte data
[LINE
][PIEX
];
64 extern byte EVNB
; // Environment Brightness
65 extern bool KNOCK
; // Task communicating
74 byte MOD
; // Trace Module. LINE:0; 'S'route:1; 'U'route:2;
75 byte STA
; // Route stage. Basically 3 Stage will be implemented. 1: head into; 2: in middle; 3: head out
77 int CNT
; // Trace central offset in LINE
78 int TOP
; // Trace top boundary in LINE
79 byte LFT
; // Trace left boundary in PIEX
80 byte RIT
; // Trace right boundary in PIEX
93 void transchar_n(void);
100 int feedback(int a
, int b
, int kp
);