Introduction - If you have any usage issues, please Google them yourself
#include hal_types.h
#include iocc2530.h
#ifndef __IC_DEMUX_4051_H__
#define __IC_DEMUX_4051_H__
#define ANALOG 0
#define DIGITAL 1
#define A_4051 P1_3
#define B_4051 P1_2
#define C_4051 P1_0
#define BATTERY_VOL_ADC 0x2
#define COUPLER_AC_ON_OFF_ADC 1
#define AUTO_MANUAL_SWITCH_ADC 2
#define MOTOR_ON_OFF_SENSE_ADC 3
#define BATTERY_VOLTAGE_LOW_LEVEL 0xA // IN VOLTS
#define BATTERY_VOLTAGE_LOW_DEC 0x0f0
#define BATTERY_VOLTAGE_HIGH_INC 0xFFF
**********
Input to read card
Battery voltage sense 0x01 (A) min cutoff @ 9volts
Mains supply 230 volts on or off 0x02 (D)
10K pull up and 2k pull down 12 volts ==.8volts on ADC
extern uint8 ThreePhaseBit
extern unsigned int compute_digital_from_adc(char ch_no,int sample)
extern void ConFig_IC_DEMUX_4051(void)
extern unsigned int GetADCValue(unsigned char Ch_NO,unsigned char ip_type)
#endif