Files
SyncHome/trunk/AVRProjects/ATMega48/main.c

46 lines
1.3 KiB
C
Raw Normal View History

2023-03-13 09:01:12 +00:00
/* ******************************************************** *
*
* Simple Template for ATMEL Microcontroller *
* -------------------------------------------------------- *
* Created on: 25.07.2016
* Author: Paolo Iocco
* ******************************************************** */
/* ******************************************************** *
ATtiny 88 / Mega 168 / Mega 328 Pin map
+-\/-+
/Reset PC6 1|o |28 PC5 ADC5
RXD PD0 2| |27 PC4 ADC4
TXD PD1 3| |26 PC3 ADC3
PD2 4| |25 PC2 ADC2
OC2B PD3 5| |24 PC1 ADC1
PD4 6| |23 PC0 ADC0
VCC 7| |22 GND
GND 8| |21 AREF
OSC1 PB6 9| |20 VCC
OSC2 PB7 10| |19 PB5 SCK
OC0B PD5 11| |18 PB4 MISO
AIN0 OC0A PD6 12| |17 PB3 OC2A MOSI
AIN1 PD7 13| |16 PB2 OC1B
PB0 14| |15 PB1 OC1A
+----+
* ******************************************************** */
#include "main.h"
#include <avr/io.h>
#include <util/delay.h>
int main (void)
{
unsigned char zwischenspeicher;
DDRB = 0b00000100;
while(1)
{
zwischenspeicher = PORTB;
zwischenspeicher = zwischenspeicher ^ 0b00000100;
PORTB = zwischenspeicher;
_delay_ms(500);
}
return 0;
}