EmbeddedRelated.com
Forums
Memfault Beyond the Launch

frequency generator

Started by Martijn Broens January 5, 2005
Hi all,

could anyone help me getting started, i'd like to build a frequency 
generator using the F149. frequency range should be between 0Hz and 
200kHz.

i thouoght of using timerA and then toggling an output pin, to 
change the freq. i thought of adjusting the clock frequency, but 
perhaps this is not enough (to achive the ful range) and therfore i 
thought of using CCR1 register. but that only alters the DC.

any suggestions are more then welcome.

thanks martijn




Beginning Microcontrollers with the MSP430

Maybe a DDS is good for you? Something like this:

http://www.myplace.nu/avr/minidds/index.htm


On Wed, 05 Jan 2005 14:14:22 -0000, Martijn Broens
<martijnbroens@mart...> wrote:
>  
>  Hi all,
>  
>  could anyone help me getting started, i'd like to build a frequency 
>  generator using the F149. frequency range should be between 0Hz and 
>  200kHz.
>  
>  i thouoght of using timerA and then toggling an output pin, to 
>  change the freq. i thought of adjusting the clock frequency, but 
>  perhaps this is not enough (to achive the ful range) and therfore i 
>  thought of using CCR1 register. but that only alters the DC.
>  
>  any suggestions are more then welcome.
>  
>  thanks martijn
>  
>  
>  
>  
> 
>  .
>  
>  
> 
>  
>  ________________________________
>  . 


-- 
Bogdan

I think that you're in the right way, Martijn, by using timer A in PWM 
mode. And I would also use an 8 MHz crystal, to get more accuracy in the 
frequencies generated. The crystal in this case is 40 times greater than 
the maximum frequency, I think that it's quite easy to generate the full 
range of frequencies.

Regards,
Adriano.

Martijn Broens wrote:
> 
> Hi all,
> 
> could anyone help me getting started, i'd like to build a frequency 
> generator using the F149. frequency range should be between 0Hz and 
> 200kHz.
> 
> i thouoght of using timerA and then toggling an output pin, to 
> change the freq. i thought of adjusting the clock frequency, but 
> perhaps this is not enough (to achive the ful range) and therfore i 
> thought of using CCR1 register. but that only alters the DC.
> 
> any suggestions are more then welcome.
> 
> thanks martijn
> 
> 
> 
> 
> 
> .
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 


Memfault Beyond the Launch