Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

CF Speed with AVR DOS

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS
View previous topic :: View next topic  
Author Message
rredding

Bascom Member



Joined: 25 Mar 2005
Posts: 63
Location: Tacoma WA

PostPosted: Mon May 09, 2005 4:23 pm    Post subject: CF Speed with AVR DOS Reply with quote

I have a project where I need to send a continuous stream of 16 bit values to 8 DACs at a rate of 48000 Hz. I plan on using an ATMEGA 128 running at 16MHZ and the DAC is an SPI device. I will need to loop through a large number of values where each DAC will have an independent set of values. Essentially it is to be an 8 channel, synchronized arbitrary waveform generator. The blocks of values may be several megabytes in size for each DAC. I may loop through one set of values in a block N times, then switch to another block for N times, etc. In my application, the processor can be devoted to the data streaming funciton completely. I am considering BASCOM-AVR and AVR-DOS.

So, I suppose my necessary data rate from the CF is roughly 800K Bytes per soecond. Is there someone out there that has used AVR-DOS where data streaming like this is performed? Do I need to set up some sort of buffer to avoid glitches in the data stream? Any other issues I need to bear in mind?

Thank you
Back to top
View user's profile
philm

Bascom Member



Joined: 14 Jul 2004
Posts: 138
Location: Australia

australia.gif
PostPosted: Tue May 10, 2005 2:20 am    Post subject: Reply with quote

rredding,
I don't think a data rate of 800kB/s is achievable.
Using a 16MHz clock gives you 20 clock cycles per byte. To get a single byte from the file system buffer (or a secondary buffer) to your SPI DAC will take up almost all the 20 clock cycles, and there is no time left to fill the buffer from any source.
Phil
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Tue May 10, 2005 4:12 pm    Post subject: Throughput Compact Flash.... Reply with quote

Have done some tests. On a ATA Harddrive controller from www.edtp.com (ATmega128) and a Compact Flash card I got a throughput of 570 kb/sec.

There are some low level routines for writing Harddisk and Compact Flash on my homepage.

Bye
Ben Zijlstra
Back to top
View user's profile Visit poster's website
rredding

Bascom Member



Joined: 25 Mar 2005
Posts: 63
Location: Tacoma WA

PostPosted: Tue May 10, 2005 4:42 pm    Post subject: Great feedback, thanks Reply with quote

Well, seeing as I only truely need 6 of the 8 available channels of the octal DAC for my app and that I could probably cut back my rate to about half, if I need too, it might all work out. That gives me about 55 cycles per byte and a rate of 288 KB/s which should be workable, if I use low level code. Thank you both for your feedback!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum