/*! * \file profibus.h * \brief Ablaufsteuerung Profibus DP-Slave Kommunikation, h-Datei * \author © Joerg S. * \date 9.2007 (Erstellung) 9.2009 (Aktueller Stand) * \note Verwendung nur fuer private Zwecke / Only for non-commercial use * \note 2010.04.28. Started adaption to AVR. Einar S. */ #ifndef PROFIBUS_H #define PROFIBUS_H 1 #define XTAL F_CPU #define UART_BAUD_1M5 0 // Not tested. Tsdr probably too high without code changes. #define UART_BAUD_500K 2 // Not tested. Same as above. #define UART_BAUD_187500 7 // Tested and working #define UART_BAUD_93750 15 #define UART_BAUD_45450 32 // Baud error: + 0.01% #define UART_BAUD_19200 77 // + 0.16% Keep data sizes moderate to avoid errors! #define UART_BAUD_9600 32 // + 0.16% Same as above. #define UART_BAUD UART_BAUD_187500 #define LED_ERROR_AN PORTD &= _BV(3); #define LED_ERROR_AUS PORTD |= _BV(3); #define TIMER1_RUN TCNT1=0; TCCR1B=1; TIMSK |= (1<