Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pinmode(nropino, OUTPUT); // ou input
- #PWM - http://forum.arduino.cc/index.php?topic=117425.0
- InitTimers() //Initializes all timers. Needs to be called before changing the timers frequency or setting the duty on a pin
- InitTimersSafe() //Same as InitTimers() except timer 0 is not initialized in order to preserve time keeping functions
- pwmWrite(uint8_t pin, uint8_t val) //Same as 'analogWrite()', but it only works with initialized timers. Continue to use analogWrite() on uninitialized timers
- SetPinFrequency(int8_t pin, int32_t frequency) //Sets the pin's frequency (in Hz) and returns a bool for success
- Timer1_GetFrequency() //Gets the timer's frequency in Hz
- Timer1_SetFrequency(int frequency) //Sets the timer's frequency in Hz
- Timer1_GetPrescaler() //Gets the value (not bits) of the prescaler. Don't know what this means? Don't worry about it, just use SetFrequency(int frequency)
- Timer1_SetPrescaler(enum value) // Sets the prescaler*
- Timer1_GetTop() //Gets the timer register's maximum value
- Timer1_SetTop(int top) //Sets the timer register's maximum value
- Timer1_Initialize() //Initializes the timer
Add Comment
Please, Sign In to add comment