Skip to content

antonin-leclercq/attiny13_servo_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

attiny13_servo_demo

Description

Small demo code to control a servo motor using an attiny13 microcontroller.
With Fast PWM Mode, the PWM frequency is set by the prescaler value (on an attiny13), so I could only get close to the "standard" 50Hz.
The program sets it to 73Hz which is totally fine (servo motors can be controlled by a PWM frequency ranging from 40Hz to 200Hz according to wikipedia) The pulse width is controlled by a potentiometer.

Pin connections

attiny13 pin Connection
PB0 Servo Signal
PB4 Potentiometer