ltc1290.h

00001 /*
00002  * AD.H
00003  * Header file for ADC drivers for the uP180
00004  * EMAC, Inc.  1/11/99
00005  *
00006  */
00007 
00008 #ifndef _AD_H_
00009 #define _AD_H_
00010 #include "GNU_defs.h"
00011 
00012 /* Valid res_modes */
00013 #define HI_RES 1
00014 #define LO_RES 0
00015 
00016 /* Valid ad_modes */
00017 #define ONCE    0
00018 
00019 /* Number of channels */
00020 #define NUMCHANNELS 8
00021 
00022 /* Define Analog to Digital Select */
00023 #define ADSELECT    0x02
00024 
00025 
00026 /*control defines*/
00027 #define MSBF    0x04
00028 #define UNIP    0x08
00029 #define BIT8    0   
00030 #define POFF    1
00031 #define BIT12   2
00032 #define BIT16   3
00033 
00034 #define LTC_CONTROL PORTK
00035 #define LTC_CONFIG   DDRK
00036 
00037 #define LTC_CS 0x08
00038 
00039 #define LTCCS_OFF() LTC_CONTROL|=LTC_CS
00040 #define LTCCS_ON()  LTC_CONTROL&=(~LTC_CS)
00041 
00042 #define LTC_INIT_LINES() {LTC_CONFIG|=LTC_CS;LTCCS_OFF();}
00043 
00044 
00045 typedef struct AtoDsample{
00046 unsigned int channel[NUMCHANNELS];
00047 }AtoDsample;
00048 
00049 
00050 /* Function Prototypes */
00051 int __attribute__((far))LTC1290Init(void);
00052 void  __attribute__((far))Select1290(u8 status);
00053 int  __attribute__((far))LTC1290_Read(AtoDsample *sample);
00054 
00055 #endif
00056 

Generated on Fri Mar 3 17:25:45 2006 for EMAC-HCS12-SDK by  doxygen 1.4.6