/********************************************************************************** * * ngencontrol.h -- * *********************************************************************************/ #define PIDTUNE 1 // When tuning the PID controller // pc3 (uco empty) becomes pgain // pc4 (diesel empty) becomes igain // pc1 (water temp) becomes dgain /********************************************************************************** * * * I/O Port Defines * * *********************************************************************************/ // port B #define TACHIN PB0 #define STARTOUT PB1 #define DECOMPRESS PB2 #define ESTOPBIT PB3 #define LIMITLO PB4 #define LIMITHI PB5 #define PORTBDIR (1 << STARTOUT) | (1 << DECOMPRESS) #define PORTBPULLUPS (1 << TACHIN) | (1 << LIMITLO) | (1 << LIMITHI) | (1 << ESTOPBIT) // PORTC #define VOTEMP PC0 #define WATERTEMP PC1 #define OILPRES PC2 #define UCOEMPTYBIT PC3 #define DIESELEMPTYBIT PC4 #define GLOWPLUG PC5 #define PORTCDIR 1 << GLOWPLUG #ifndef PIDTUNE #define PORTCPULLUPS (1 <