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

Dependents:   ECG_ADS1198_IITH

Committer:
joelbandi
Date:
Sun Apr 05 20:33:43 2015 +0000
Revision:
3:8c8ce127f100
Parent:
2:e3a7ca6b9405
Child:
4:b251aa7b7c86
SUPER FIX;

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 0:48e2ec1af2d9 30 unsigned 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 0:48e2ec1af2d9 43
joelbandi 3:8c8ce127f100 44 unsigned char Input_dummy_byte [19] =
joelbandi 0:48e2ec1af2d9 45 {
joelbandi 3:8c8ce127f100 46 0x00,
joelbandi 3:8c8ce127f100 47 0x00,
joelbandi 3:8c8ce127f100 48 0x00,
joelbandi 3:8c8ce127f100 49 0x00,
joelbandi 3:8c8ce127f100 50 0x00,
joelbandi 3:8c8ce127f100 51 0x00,
joelbandi 3:8c8ce127f100 52 0x00,
joelbandi 3:8c8ce127f100 53 0x00,
joelbandi 3:8c8ce127f100 54 0x00,
joelbandi 3:8c8ce127f100 55 0x00,
joelbandi 3:8c8ce127f100 56 0x00,
joelbandi 3:8c8ce127f100 57 0x00,
joelbandi 3:8c8ce127f100 58 0x00,
joelbandi 3:8c8ce127f100 59 0x00,
joelbandi 3:8c8ce127f100 60 0x00,
joelbandi 3:8c8ce127f100 61 0x00,
joelbandi 3:8c8ce127f100 62 0x00,
joelbandi 3:8c8ce127f100 63 0x00,
joelbandi 3:8c8ce127f100 64 0x00
joelbandi 3:8c8ce127f100 65 };
joelbandi 3:8c8ce127f100 66 /*****************************************************************************/
joelbandi 0:48e2ec1af2d9 67
joelbandi 3:8c8ce127f100 68 void pause_clk(int k){
joelbandi 3:8c8ce127f100 69 k=k/2;
joelbandi 3:8c8ce127f100 70 wait_us(k);
joelbandi 3:8c8ce127f100 71 }
joelbandi 3:8c8ce127f100 72
joelbandi 3:8c8ce127f100 73 void pause_sclk(int k){
joelbandi 3:8c8ce127f100 74 wait_us(k);
joelbandi 3:8c8ce127f100 75 }
joelbandi 3:8c8ce127f100 76