The SPI operation is blocking. The call returns after: - The Android sent a request to the IOIO to issue the transaction. - The IOIO executed the transaction. - The IOIO sent the response back to the Android.
The bottleneck is the connection between the Android and the IOIO. Over Bluetooth it can be around 40ms round-trip. Even if you fixed the latency issue, 8ksps might be over the bluetooth bandwidth. Regardless, you won't be able to get precise timing this way. In short, you're going into a dead end with this approach. If you absolutely need to interface with this ADC at 8ksps over Bluetooth, you'd need custom firmware on the IOIO and possibly some data compression. On Tue, May 27, 2014 at 6:47 AM, Saaddin <[email protected]> wrote: > IOIO user, > [update] > I try using adc internal IOIO an get the sample rate 1ksps, so the problem > is SPI connection between IOIO and ADC external. > in IOIO loop i only using one transaction: > > spi.writeRead( 0, request_ReadData, request_ReadData.length, 28, > readBuffer, readBuffer.length); > > its 28 byte transaction is too long which cause the sample rate in android > application slower? > > thanks, > > Saaddin > > Pada Selasa, 27 Mei 2014 17:16:47 UTC+7, Saaddin menulis: > >> IOIO User, >> >> I has connect IOIO via bluetooth to get voltage data via ADC external >> IOIO via SPI with rate 3.2 Mbps and got success connection. The problem is >> sampling rate data ADC fluctuative about 30 sample per second in my android >> application. I need sample rate minimum 200sps and good if reach 1ksps. I >> set sample rate in ADC external 8ksps via spi, so i think it is not the ADC >> external fault. >> >> 1. if it sample rate normal (30sps) if we using connection via bluetooth? >> can we increase the sample rate? >> 2. bluetooth latency (about 10ms) happen only first time application run >> or along time application run? what it is related to my low sps? >> >> >> Thanks, >> >> Saaddin >> > -- > You received this message because you are subscribed to the Google Groups > "ioio-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/ioio-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ioio-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/d/optout.
