diff options
author | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
commit | 06337f0dc8114c70fd0c7767083971a0d091750a (patch) | |
tree | 446481550ba88e6e0f7df2db7fdc66d2016ee2f1 /macros/Hardware/AVR/AVRPWM1SetDuty.sci | |
parent | c2e305c3b82ed944d57402dd515b3d5839a31980 (diff) | |
download | scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.tar.gz scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.tar.bz2 scilab2c-06337f0dc8114c70fd0c7767083971a0d091750a.zip |
LinearAlgebra and MatrixOperation Update
Diffstat (limited to 'macros/Hardware/AVR/AVRPWM1SetDuty.sci')
-rw-r--r-- | macros/Hardware/AVR/AVRPWM1SetDuty.sci | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/macros/Hardware/AVR/AVRPWM1SetDuty.sci b/macros/Hardware/AVR/AVRPWM1SetDuty.sci index fd6e7baf..60dc0a9f 100644 --- a/macros/Hardware/AVR/AVRPWM1SetDuty.sci +++ b/macros/Hardware/AVR/AVRPWM1SetDuty.sci @@ -11,28 +11,34 @@ function AVRPWM1SetDuty(output_pin,duty,Top_Value) //Function to Set Duty cycle of PWM Output generated by Timer1 at OC1A or OC1B pin. //Parameters -// ouput_pin: integer, 0 (for OC1A) or 1 (for OC1B) +// ouput_pin: +// 0 for selecting OC1A as output pin +// 1 for selecting OC1B as output pin // -// duty: It holds an integer value from 0 to 100 which sets the percentage of time for which signal is active. +// duty: It holds an integer value from 0 to 100 which sets the percentage +// of time for which signal is active. // -// Top_Value: It holds an integer value from 0 to 65535.This value sets the Top value of the counter TCNT1 i.e ICR.(for more info refer datasheet) +// Top_Value: It holds an integer value from 0 to 65535.This value sets the Top +// value of the counter TCNT1 i.e ICR.(for more info refer datasheet) // //Description // Each Micro controller has PWM output pins which can generate varying voltage // from 0V-5V.This function Sets the duty cycle of output PWM signal.Also this function // decides the Top Vale of TCNT1 and the output pin to output PWM signal. // -// This is curretly dummy function. It provides no functionality but is required -// for providing support for generating C code for AVR. -// //Example -// AVRPWM1SetDuty(0,50,40000); //This function will produce PWM signal of 50% duty cycle on OC1A pin and TCNT1 will reset at 40000 instead at 65535. +// AVRPWM1SetDuty(0,50,40000); //This function will produce PWM signal of 50% duty +// cycle on OC1A pin and TCNT1 will reset at 40000 instead +// at 65535. +// //See also // AVRPWM1Setup // //Authors // Ashish Kamble // +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. if(output_pin>=2) then disp("Error : Invalid input argument ''output_pin'' in AVRPWM1SetDuty function."); |