/**
 *
 * @file main.c
 * @author Fábio Souza
 * @brief Exemplo para acionamento do LED na pino PB1
 * @version 0.1
 * @date 2021-02-03
 *
 * @copyright Franzininho
 * This example code is in the Public Domain (or CC0 licensed, at your option.)
 * Unless required by applicable law or agreed to in writing, this
 * software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied.
 *
 */
#include <avr/io.h>
#include <util/delay.h>

#define F_CPU 16500000L //frequência do oscilador. usado para a função de delay

    /**
 * @brief Função main
 *
 * @return int
 */
int main(void)
{

  DDRB = 0b00000010;  // Configura Pino PB1 como saída (Pino do LED)

  /**
   * @brief loop infinito
   *
   */
  while (1)
  {
    PORTB = 0b00000010;    //liga LED
    _delay_ms(250);         // delay 250 ms
    PORTB = 0b00000000;    //desliga LED
    _delay_ms(250);         // delay 250 ms
  }                                                
  return (0);                           
}