some handy dandy functions and constants for interfacing with ADS1198 from texas semiconductor corp

Dependents:   ECG_ADS1198_IITH

Committer:
joelbandi
Date:
Thu Apr 09 21:07:33 2015 +0000
Revision:
5:715c88178998
Parent:
4:b251aa7b7c86
1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joelbandi 0:48e2ec1af2d9 1 #include "ADSlib/ADSlib.h"
joelbandi 3:8c8ce127f100 2 #include "mbed.h"
joelbandi 0:48e2ec1af2d9 3
joelbandi 0:48e2ec1af2d9 4 unsigned char ADS_Default_Register_Settings [22] =
joelbandi 0:48e2ec1af2d9 5 {
joelbandi 3:8c8ce127f100 6 0x64, // Config1
joelbandi 0:48e2ec1af2d9 7 0x20, // Config2
joelbandi 0:48e2ec1af2d9 8 0xC0, // Config3
joelbandi 0:48e2ec1af2d9 9 0x00, // loff
joelbandi 3:8c8ce127f100 10 0x60, // ch1set
joelbandi 3:8c8ce127f100 11 0x60, // ch2set
joelbandi 3:8c8ce127f100 12 0x60, // ch3set
joelbandi 3:8c8ce127f100 13 0x60, // ch4set
joelbandi 3:8c8ce127f100 14 0x60, // ch5set
joelbandi 3:8c8ce127f100 15 0x60, // ch6set
joelbandi 3:8c8ce127f100 16 0x60, // ch7set
joelbandi 3:8c8ce127f100 17 0x60, // ch8set
joelbandi 0:48e2ec1af2d9 18 0x00, // rld_sensp
joelbandi 0:48e2ec1af2d9 19 0x00, // rld_sensm
joelbandi 0:48e2ec1af2d9 20 0x00, // loff_sensp
joelbandi 0:48e2ec1af2d9 21 0x00, // loff_sensm
joelbandi 0:48e2ec1af2d9 22 0x00, // loff_flip
joelbandi 0:48e2ec1af2d9 23 0x00, // gpio
joelbandi 0:48e2ec1af2d9 24 0x00, // pace
joelbandi 0:48e2ec1af2d9 25 0x00, // reserved
joelbandi 2:e3a7ca6b9405 26 0x00 // config4
joelbandi 0:48e2ec1af2d9 27 };
joelbandi 0:48e2ec1af2d9 28 /**************************************************************************/
joelbandi 0:48e2ec1af2d9 29
joelbandi 4:b251aa7b7c86 30 signed char ADS_Default_Channel_Settings [8] =
joelbandi 0:48e2ec1af2d9 31 {
joelbandi 3:8c8ce127f100 32 0x60, // ch1set
joelbandi 3:8c8ce127f100 33 0x60, // ch2set
joelbandi 3:8c8ce127f100 34 0x60, // ch3set
joelbandi 3:8c8ce127f100 35 0x60, // ch4set
joelbandi 3:8c8ce127f100 36 0x60, // ch5set
joelbandi 3:8c8ce127f100 37 0x60, // ch6set
joelbandi 3:8c8ce127f100 38 0x60, // ch7set
joelbandi 3:8c8ce127f100 39 0x60 // ch8set
joelbandi 0:48e2ec1af2d9 40
joelbandi 0:48e2ec1af2d9 41 };
joelbandi 0:48e2ec1af2d9 42
joelbandi 3:8c8ce127f100 43 /*****************************************************************************/
joelbandi 0:48e2ec1af2d9 44
joelbandi 3:8c8ce127f100 45 void pause_clk(int k){
joelbandi 3:8c8ce127f100 46 k=k/2;
joelbandi 3:8c8ce127f100 47 wait_us(k);
joelbandi 3:8c8ce127f100 48 }
joelbandi 3:8c8ce127f100 49
joelbandi 3:8c8ce127f100 50 void pause_sclk(int k){
joelbandi 3:8c8ce127f100 51 wait_us(k);
joelbandi 3:8c8ce127f100 52 }
joelbandi 3:8c8ce127f100 53