ts-7000
[Top] [All Lists]

Re: [ts-7000] Lost with TS-ADC16

To:
Subject: Re: [ts-7000] Lost with TS-ADC16
From: Marcos Carreras <>
Date: Fri, 27 May 2011 13:12:58 -0700 (PDT)



please dismiss the output I provided , my error.... but still not working
--- El vie 27-may-11, Marcos <> escribió:

De: Marcos <>
Asunto: [ts-7000] Lost with TS-ADC16
Para:
Fecha: viernes, 27 de mayo de 2011, 16:14

 
Guys, I am really lost with the TS-ADC16.. after fighting with this board the whole week, I couldn't get the board working.... I wrote a short code in order to test the ADC but couldn't get any coherent sample... My TS-ADC16 is working with a TS-7200, just that... Please, I will really appreciate some help..
The code I am running, using the provided tsadclib1624.c and tsadclib1624.h is:

#include <sys/types.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <stdio.h>
# include "tsadclib1624.h"

#define NCANALES 6
#define RANGO_DAC DACRANGE_02VB
#define RANGO_ADC ADCRANGE_0010S
#define TBUFFER 10000
#define SAMPLINGRATE 200
#define NUMMUESTRAS 1

int main ( )
{
int16_t *Buffer_Muestras[NCANALES];
int8_t J,index;
int16_t TV_IMin = 0xffff;
int16_t *aBuffer;

for (index = 0; index < NCANALES; index++)
{
if ((aBuffer = malloc(TBUFFER+1)) == NULL) {
printf("Error malloc\n");
return ;
}
Buffer_Muestras[index] = aBuffer;
}

printf ( "\n\nInitialized: %s\n ",!tsadclib1624_init (SBC_TS7200,NCANALES, TBUFFER)?"OK":"NOT OK");
if ( index=tsadclib1624_boardstatus (0) == 0x3e ) printf ( " TS Board: TS-16\n");
printf ( "Buffer: %s\n ",tsadclib1624_buffers? "OK":"ERROR");

index =tsadclib16_dacset ( 0, 0, RANGO_DAC, TV_IMin );

do {
usleep ( 500000 );
tsadclib1624_sample ( 0, NCANALES, SAMPLINGRATE, NUMMUESTRAS, RANGO_ADC, Buffer_Muestras, true );
tsadclib1624_pollResults ( 0, true );
for ( J=0; J<=NCANALES;J++) printf ( "%d ", Buffer_Muestras[J] );
printf("\n");
} while ( 1 );
}



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU