I do what it says in the manual. Initialize the internal FPGA buffer to 0xFFFF
for each sample. When bits 0-1 of the last of the 2048 samples change to zero,
the conversion process is done. Another way to do it would be to wait 1.024
seconds, since it captures 2048 samples at 2 KHz.
--- In "MusicalBoredom" <> wrote:
>
> Thanks for the response. Is there a reliable way that you know of to
> determine the state of the conversion process to prevent overlapping commands?
>
> --- In "Harold" <HDewar@> wrote:
> >
> >
> >
> > You could try resetting the TWSI controller by writing 0 to the TWSI soft
> > reset register, but that probably will not help. I have found that if I try
> > to send TWSI commands to the AVR microcontroller when it is busy doing ADC
> > conversions, it will lock up. When this happens, the only way I have found
> > to reset the AVR is to cycle power. It would be nice if there were some way
> > to reset the AVR from the TS-7800, but I have not found a way to do that.
> >
> > --- In "MusicalBoredom" <board_music@> wrote:
> > >
> > > I've been working with the 7800 and using the A/D conversion for a while.
> > > The majority of the time it works without flaw but if the startup code
> > > where the sampling is setup via TWI messages is called multiple times
> > > after a reboot I end up never being able to select the slave device
> > > properly and have to do a cold reboot to be able to initialize the AVR.
> > >
> > > Specifically, I get a 0xF8 response in the TWI status register after
> > > writing a START|TWSIEN to the TWI control register where I should be
> > > getting a START response back. After that, I never get ADC sample again.
> > > I have confirmed this behavior in the example program as well.
> > >
> > > Is there some way I can force a reset of the ADC at this point or reset
> > > the TWI controller? Has anyone else seen this problem and found a
> > > solution?
> > >
> > > Thanks In advance for your held,
> > >
> > > David Maynor
> > >
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|