Sorry, I use a MC9S08GT16
44 QFP
and I work with codewarrior 5.7
My problem is I don't now how use this fonction
Timer_SetFreqHz() ;
I want to change frequence with an input but i'm a newbee with codewarrior
Thanks
Nico
SetFreqHz - this method sets the new frequency of the output signal. The frequency is expressed in Hz as a 16-bit unsigned integer number. This method is only available when the runtime setting type 'from interval' is selected in the Timing Dialog box of the Runtime setting area.
For more info see help for selected bean, especially Typical Usage page.
Best Regard, Jan Pospisilik, Processor Expert Support
thanks i have ever seen this text about the fonction ,
my problem is : Iwnt use this fonction to change the frequency of timer
After the frequency will be using by a LED to blinking frequency
int i=1;
extern word ADCValue;
byte err;
void main(void)
{
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
while (i>0) {
err=Timer_SetFreqHz(AD1_GetValue16(&ADCValue));
LedOutput_NegVal();
}
how use this fonction to change frequency ?
err=Timer_SetFreqHz(AD1_GetValue16(&ADCValue)) isn't correctly, the GetVaule16 method returns error code, not measured value. Try to use e.g.:
err = AD1_GetValue16(&ADCValue); err = Timer_SetFreqHz(ADCValue);
The another incorrect thing is a location of "LedOutput_NegVal();", this command should be called from Timer event from event.c.
Best Regards,
Jan Pospisilik, Processor Expert Support