/***************************************************** This program was produced by the CodeWizardAVR V1.25.2 Beta1 Standard Automatic Program Generator © Copyright 1998-2006 Pavel Haiduc, HP InfoTech s.r.l. http://www.hpinfotech.com Project : Version : Date : 13.05.2008 Author : Leon Company : - Comments: Chip type : ATmega32 Program type : Application Clock frequency : 13,000000 MHz Memory model : Small External SRAM size : 0 Data Stack size : 512 *****************************************************/ #include #include // Standard Input/Output functions #include // Declare your global variables here #define BAUD 9600UL // Baudrate #define F_CPU 13000000UL // Systemtakt in Hz // Berechnungen #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) // clever runden #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1))) // Reale Baudrate #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD) // Fehler in Promille, 1000 = kein Fehler. void main(void) { UBRRH = UBRR_VAL >> 8; UBRRL = UBRR_VAL & 0xFF; UCSRB |= (1<