Quantcast
Channel: Data converters
Viewing all articles
Browse latest Browse all 27565

Forum Post: ADS1299: ADS1299

$
0
0
Part Number: ADS1299 I am trying to interface Ads1299 daughter board to Arduino UNO. But the DRDY never toggles, and SCK doesn't provide any pulses. Connection is as follows: ch1 - inputs given jp 6 -(1-2) closed jp 7-(1-2) closed jp8- -(1-2) closed jp5 - power down is tied high jp21 -(1-2) closed jp22 -(2-3) closed jp23 -(1-2) closed power -mid biased (-2.5 to 2.5) avdd - avss. ------------------------------------------------------------------------------------------ #include "pins_arduino.h" #include "ADS.h" void setup(){ Serial.begin(9600); Serial.println("ADS1299-bridge has started!"); ads_setup(); ads_reset(); ads_wreg(0x03, 0xE0); //CONFIG3 E0h for internal reference ads_wreg(0x01, 0x96); //CONFIG1 96h Default ads_wreg(0x02, 0xC0); //CONFIG2 C0h Deafault ads_wreg(0x05, 0x01); //Set channel 1 as input short ads_start(); } void loop(){ ads_update_data(); } ---------------------------------------------- void ads_wreg(char address, char value) { char opcode1 = 0x40 + address; //001rrrrr; _RREG = 00100000 and _address = rrrrr digitalWrite(cs , LOW); //Low to communicated SPI.transfer(0x11); //SDATAC SPI.transfer(opcode1); //RREG SPI.transfer(0x00); SPI.transfer(value); SPI.transfer(0x10); //turn read data continuous back on digitalWrite(cs , HIGH); //High to end communication } void ads_update_data(){ if(digitalRead(DRDY) == LOW){ Serial.println(" ADS1299 "); digitalWrite(cs , LOW); SPI.transfer(0x10); long output[9]; long dataPacket; for(int i = 0; i<9; i++){ for(int j = 0; j<3; j++){ char dataByte = SPI.transfer(0x00); dataPacket = (dataPacket << 8) | dataByte; } output[i] = dataPacket; dataPacket = 0; } digitalWrite(cs , HIGH); Serial.println(output[1]); // print only channel 1 } } output : it always reads zero

Viewing all articles
Browse latest Browse all 27565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>