diff options
author | yash1112 | 2017-07-07 22:03:16 +0530 |
---|---|---|
committer | yash1112 | 2017-07-07 22:03:16 +0530 |
commit | 640f9fcf3f64298c7958f4bde5a7e6a7602a690d (patch) | |
tree | f2d5c577e9c719190f2ce68c976a9acefd6611c6 /2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci | |
parent | e9de337a34e123749927039f7011fb30fc96f7c9 (diff) | |
parent | 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 (diff) | |
download | Scilab2C-640f9fcf3f64298c7958f4bde5a7e6a7602a690d.tar.gz Scilab2C-640f9fcf3f64298c7958f4bde5a7e6a7602a690d.tar.bz2 Scilab2C-640f9fcf3f64298c7958f4bde5a7e6a7602a690d.zip |
Scilab2C Arduino Updated
Diffstat (limited to '2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci')
-rw-r--r-- | 2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci index 55fd55fa..c4c4535e 100644 --- a/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci +++ b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci @@ -10,17 +10,21 @@ function AVRTimerSetup(timer,prescaler,clock_source) //Function to setup Timers in ATmega16 +<<<<<<< HEAD // //Parameters: // timer : integer, from 0 to 2 // prescaler : integer. // clock_source : integer, 0 (for internal) or 1 (for external) // +======= +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 //Descrpition: // This function tells the micro controller which clock source you will be using. // The timer value and prescaler value passed in this function setup the timer as per // your requirement. // +<<<<<<< HEAD // timer can take values- // <itemizedlist> // <listitem><para>0 -> for timer0</para></listitem> @@ -42,12 +46,37 @@ function AVRTimerSetup(timer,prescaler,clock_source) // //Example // AVRTimerSetup(0,64,0); //This function will select timer0 with timer running as per internal clock source and prescaled by 64. +======= +//Parameters: +// timer : It is an integer value. +// 0 to setup timer0 +// 1 to setup timer1 +// 2 to setup timer2 +// prescaler : It is an integer value. +// 1 for no prescaling i.e clock will run at max 16Hz frequency +// 8 for prescaling clock by 8 i.e new clock frequency will be (clk/8) +// 64 for prescaling clock by 64 i.e new clock frequency will be (clk/64) +// 256 for prescaling clock by 256 i.e new clock frequency will be (clk/256) +// 1024 for prescaling clock by 1024 i.e new clock frequency will be (clk/1024) +// clock_source : It is an integer value. +// 0 if you are using internal clock source +// 1 if you are using external clock source +//Example +// AVRTimerSetup(0,64,0); //This function will select timer0 with timer running as per +// internal clock source and prescaled by 64. +// +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 //See also // AVRGetTimerValues // //Authors // Ashish Kamble // +<<<<<<< HEAD +======= +//This is curretly dummy function. It provides no functionality but is required +//for providing support for generating C code for AVR. +>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 if(timer>=3) then disp("Error : Invalid input argument ''timer'' in AVRTimerSetup function."); |