00001 /* 00002 * $Id: maxim.h,v 1 2006/03/16 12:48:00 BorisK Exp $ 00003 * 00004 * Copyright (C) 2004 ONTRACK s.r.o. 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00019 * 02111-1307, USA. 00020 * 00021 * [1] MAXIM 2.7V to 5.5V,Low-Power,4-/12-Channel 2-Wire Serial 8-Bit ADCs 19-244; Rev1;10/02 00022 * 00023 * Written by Boris Kralik <kralikbo@yahoo.com>, 2006 00024 * 00025 */ 00026 #ifndef MAXIM_H 00027 #define MAXIM_H 00028 //address is 1100 100_ - MAX1036, MAX1037 00029 //address is 1100 101_ - MAX1038, MAX1039 00030 #include <types.h> 00031 #include "./include/lpc2119.h" 00032 #define MAX1039_W 0xCA //1100 1010 00033 #define MAX1039_R 0xCB //1100 1011 00034 #define MAX_7300AAI_W 0x80 //1000 0000 00035 #define MAX_7300AAI_R 0x81 //1000 0001 00036 00037 #define MAX_7300AAI_1_W 0x82 //1000 0010 00038 #define MAX_7300AAI_1_R 0x83 //1000 0011 00039 00040 #define DO_7300AAI_A_O 0x1111 //PinConfiguration P12,P13,P14,P15 AS OUTPUT 00041 00042 char AD_MAX_Init(void); 00043 short DO_MAX_Init(short); //0 - U.EXP, 1 - U.GPIO 00044 unsigned int AD_MAX_Read(char); 00045 short DO_H(void); 00046 char DO_L(void); 00047 #endif
1.4.7