Other Parts Discussed in Thread: ADS1298
ADS1298 power up data sheet interpretation questions:
I tried drawing a flowchart and writing a compiling piece of code for the maple microcontroler from leaflabs.com
I can tie most pins on my module low but not all...
CLKSEL=1 from hardware.
RESET is tied to high in hardware should I do a serial reset instead???
Some of the timing delays mismach how long till the power supplies stableise?
Here is my example code:
/*
ADS1298_power_up
Blink modified to ADS1298_power_up
Turns on an LED on for one second, then off for one second, repeatedly.
The circuit:
SPI IN & OUT pins connected to test input and output.
Data logger fpga would be a good idea.
*/
int ledPin = 13; // LED connected to digital pin 13
int RESET = 10;
int START = 11;
//create pins 0-12
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(RESET, OUTPUT);
pinMode(START, OUTPUT);
//setup pins for inputs and outputs
//tie all low
//step 1 wait 500ms instead of recomended 150ms
//for power supplies to stableise
delay(500);
//set CLKSEL=1 wait 20us //allready set to 1 unless tie to pin.
delay(500); //wait 500ms instead of 20us to let clk stableise
//wait 2^16 tclk = 65536 tclk 2.x Mhz
delay(1000); //wait 1 s instead of 65536 tclk
//reset pulse low wait 18tclks longer low wait 5 sec for power on reset
digitalWrite(RESET, LOW); // set the LED off
delay(100);
digitalWrite(RESET, HIGH); // set the LED on
delay(1000);
delay(1000);
delay(1000);
delay(1000);
delay(1000);
//set configuration registers...
//check for drdy change before filling registers...
//if START tied HIGH ~DRDY toggles at fclk/8192
digitalWrite(START, HIGH); // set the LED on
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}

