ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: function generator?

To:
Subject: Re: [ts-7000] Re: function generator?
From: Jim Long <>
Date: Thu, 14 Oct 2010 08:31:19 -0700


Dave,
how true; however, the interrupt will be very fast.  xor a PIO bit.  Edit the inline assembly for the interrupt so you only push and pop the registers you change you should be able to make the interrupt less than 10% overhead including latency.  As to how piratical that solution is, is more application dependent.  If there are other requirements besides a need for an adjustable  1 to 1 MHz  square wave generator, then you need a faster processor or use external hardware.  Like a function generator IC.  You could use a fast polling loop to watch the timer status inside you application.  While polling is faster than interrupts in many cases its application requires more "crafting" of the routine to get the timing correct.      

jim

On Wed, Oct 13, 2010 at 7:54 PM, David Smead <> wrote:
 

To output a 1 mHz square wave using a timer and interrupts means handling an interrupt at a 2 mHz rate.  With a 200 mHz CPU clock, that's an interrupt every 100 clocks.  That doesn't leave a lot of time to do anything else.


The resolution of frequency will likely be poor using an internal clock divider.

DaveS


On Wed, Oct 13, 2010 at 2:38 PM, Jim Long <> wrote:
 

The ARM 9 has a number of internal timers.  Pick one that isn't used by the OS.
They can be cascaded to another timer making for a longer time base.  A Timer also has a scale register that scales the count so you can vary the frequency for a given count.  You can also make them auto repeat so it re-load the register with the count restarts.  Just tell it to go and forget about it.  When the timer counts down to zero you catch that in an interrupt that output a one or zero to a PIO.  Your square wave.

jim

On Wed, Oct 13, 2010 at 7:14 AM, juan obando <> wrote:
 

You need to create is PWM  (pulse width modulation ) to be able to create a square signal with diferent frecuency.
Bye.

Juan Felipe Obando Obando Valencia.





To:
From:
Date: Wed, 13 Oct 2010 01:55:00 +0000
Subject: [ts-7000] Re: function generator?


 
Jim,
I was hoping to do 1Hz - 1MHz. Honestly, I was hoping to use the digital I/O on the 7250 board for this as I only care about a square wave. Based upon the example for the blinking LED, that does not look like a viable solution. I will have to do some more research to see.
Derek

--- In Jim Jackson <> wrote:
>
>
>
>
> On Mon, 11 Oct 2010, Derek Agar wrote:
>
> > My end goal is to create a programmable function generator.  (ie: tell it
> > to output a square wave at a certain frequency for a specified period of
> > time, or do a frequency sweep stepping x Hz after so many minutes, ...)
> > Does anyone have useful examples for how to do this?  What is the upper
> > and lower range in Hz that I would be able to output? Thanks Derek
>
> I've done something similar on a standard linux based PC using a sound
> card, with frequencies convering the audio range[1] (or more accurately the
> range of the audio card). But then that's what I needed and hence why I
> wrote the software.
>
> So...
>
> What sort of frequencies do you need to generate?
> What hardware were you thinking of using for your project?
> How where you thinking of generating the square wave?
>
> cheers
> Jim
>
> [1] http://www.comp.leeds.ac.uk/jj/linux/siggen.html
>







__._,_.___


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