Finally got a servo running on a Tiny13, figured I share the code if anyone is interested. Pretty simple, for all the time I spent learning this stuff. Started AVR about a year ago, Bascom a few weeks ago. Kind of huge major breakthrough for me.
The servo control signal comes off pin 5, uses internal clock. Starts center, moves left, center, then right.
Rich (BB code):
$regfile = "attiny13.dat" $crystal = 4800000 Config Portb.0 = Output Dim A As Word Do For A = 1 To 20 Pulseout Portb , 0 , 1500 Waitms 20 Next For A = 1500 To 1000 Step -10 Pulseout Portb , 0 , A Waitms 20 Next For A = 1 To 20 Pulseout Portb , 0 , 1500 Waitms 20 Next For A = 1500 To 2000 Step 10 Pulseout Portb , 0 , A Waitms 20 Next Loop End