00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00025
00026
00027 #ifndef SYSCONFIG_H
00028 #define SYSCONFIG_H
00029
00030
00031 #include <stdlib.h>
00032 #include <string.h>
00033
00034
00035 #include "device_driver.h"
00036 #include "my_delay.h"
00037
00038 #define USE_USART
00039
00040 #define USE_ADC
00041 #define USE_LCD
00042
00043 #if defined(USE_LCD) || defined(USE_ADC)
00044 #define USE_SPI
00045 #endif
00046
00047
00048 #define AVR90USB
00049
00050 #ifdef AVR90USB
00051 #define AVR_CALIBRATE_TO_8MHZ
00052 #define T16BIT
00053 #endif
00054
00055 #ifdef AVR90USB
00056 #include <avr/io.h>
00057 #include <avr/iousb162.h>
00058 #include <avr/interrupt.h>
00059
00060 #include <avr/pgmspace.h>
00061 #include <avr/sleep.h>
00062
00063
00064 #ifdef AVR_CALIBRATE_TO_8MHZ
00065 #define FREQ_CPU 8000000.0 // Define CPU Frequency - 8MHz
00066 #else
00067 #define FREQ_CPU 1000000.0 // Define CPU Frequency - 1MHz
00068 #endif
00069
00070
00071 #define MAX_PRESCALER 1024.0 // Max. Prescaler Resolution
00072 extern const float MAX_SECONDS;
00073
00074
00075 #define ADC_RESOLUTION 1024.0 // Resolution of ADC Conversion is 2^10
00076 #define UREF 5000.0 // Reference Voltage in Millivolt
00077 #define MAX_MEASUREABLE_VALUES 20 // number of possible adc values
00078
00079
00080
00081
00082 #endif
00083
00084 #ifdef C167
00085 #include <reg167.h>
00086
00087
00088 #define FREQ_CPU 20000000.0 // Define CPU Frequency - 20MHz (4MHz * PLL 5 = 20MHz)
00089
00090
00091 #define MAX_PRESCALER 1024.0 // Max. Prescaler Resolution
00092 extern const float MAX_SECONDS;
00093
00094
00095 #define ADC_RESOLUTION 1024.0 // Resolution of ADC Conversion is 2^10
00096 #define UREF 5000.0 // Reference Voltage in Millivolt
00097 #define MAX_MEASUREABLE_VALUES 20 // number of possible adc values
00098 #define TEST_LOOPBACK // Test Szenario ON/OFF
00099
00100 #endif
00101
00102
00103
00104
00105
00106
00107 #define CHIP_OUT 0
00108 #define CHIP_IN 1
00109
00110 #define LOW 0
00111 #define HIGH 1
00112
00113 #define MAX_RS232_CHARACTERS 10
00114
00115
00116 #define bzero(x,y) memset(x,0,y)
00117
00118 #endif