#ifndef _control_h_ #define _control_h_ /****************************** Inputs *********************************/ #define PLC_REM SBIT( input_ram[0], 0) #define PLC_CONNECT SBIT( input_ram[0], 1) #define HFC_HFON SBIT( input_ram[0], 2) #define PLC_DBM SBIT( input_ram[0], 3) #define STC_REQ SBIT( input_ram[0], 4) #define HFC_PWR SBIT( input_ram[0], 6) #define PLC_PWR SBIT( input_ram[0], 7) #define TARGET SBIT( input_ram[1], 3) // 0 = stop #define MCU_ACK SBIT( input_ram[1], 4) // MCU ready #define POSITION SBIT( input_ram[1], 5) // Position sensor /****************************** Outputs *********************************/ #define MCU_REQ SBIT( output_ram[0], 7) // MCU request #define POS_PWR SBIT( output_ram[0], 6) // Sensor Power #define STC_DAT0 SBIT( output_ram[0], 4) // data to STC #define STC_DAT1 SBIT( output_ram[0], 5) // data to STC #define HFC_ST0 SBIT( output_ram[0], 0) #define HFC_ST1 SBIT( output_ram[0], 1) #define HFC_REM SBIT( output_ram[0], 2) #define REL_DBM SBIT( output_ram[1], 0) // DBM (default) #define REL_STC SBIT( output_ram[1], 1) // STC request #define REL_SIMS SBIT( output_ram[1], 2) // SIMS (OPC) //#define REL_SHC SBIT( output_ram[1], 3) // SHC on //#define REL_SIMS SBIT( output_ram[1], 4) // Display voltage off /****************************** LEDs ************************************/ #define LED_PLC_SIMS SBIT( led_ram[0], 6) #define LED_PLC_DBM SBIT( led_ram[0], 1) #define LED_HFC_HFM SBIT( led_ram[0], 5) #define LED_HFC_OFF SBIT( led_ram[0], 0) #define LED_STC_ON SBIT( led_ram[0], 4) #define LED_STC_OFF SBIT( led_ram[0], 2) #define LED_SHC_ON SBIT( led_ram[0], 7) #define LED_SHC_OFF SBIT( led_ram[0], 3) #define LED_PLC_LOC SBIT( led_ram[1], 6) #define LED_PLC_REM SBIT( led_ram[1], 1) #define LED_HFC_LOC SBIT( led_ram[1], 5) #define LED_HFC_REM SBIT( led_ram[1], 0) #define LED_STC_LOC SBIT( led_ram[1], 4) #define LED_STC_REM SBIT( led_ram[1], 2) #define LED_SHC_LOC SBIT( led_ram[1], 7) #define LED_SHC_REM SBIT( led_ram[1], 3) #define LED_PLC SBIT( led_ram[2], 6) #define LED_HFC SBIT( led_ram[2], 5) #define LED_STC SBIT( led_ram[2], 4) #define LED_SHC SBIT( led_ram[2], 7) void control( void ); #endif