lab7
lab7
#include <avr/io.h>
#include <util/delay.h>
{//https://docplayer.net/100038445-This-about-using-an-atmega328pb-xplained-mini-to-drive-an-
hxt900-servo-with-a-16-bit-timer-see-link-1-at-the-end-of-this-document.html
TCCR0A = 0x21; // Set OCR2B Table 18-8 in Datasheet. & Table 18-9.
OCR0B = 4; //
while (1)
for (uint8_t ii = 0;ii < 4;ii++) // cycle through the positions low - middle -
_delay_ms(100);