1 |
|
1 |
|
2 |
//***************************************************************************** |
2 |
//***************************************************************************** |
3 |
// |
3 |
// |
4 |
// File Name : 'global.h' |
4 |
// File Name : 'global.h' |
5 |
// Title : AVR project global include |
5 |
// Title : AVR project global include |
6 |
// Author : Pascal Stang |
6 |
// Author : Pascal Stang |
7 |
// Created : 7/12/2001 |
7 |
// Created : 7/12/2001 |
8 |
// Revised : 9/30/2002 |
8 |
// Revised : 9/30/2002 |
9 |
// Version : 1.1 |
9 |
// Version : 1.1 |
10 |
// Target MCU : Atmel AVR series |
10 |
// Target MCU : Atmel AVR series |
11 |
// Editor Tabs : 4 |
11 |
// Editor Tabs : 4 |
12 |
// |
12 |
// |
13 |
// Description : This include file is designed to contain items useful to all |
13 |
// Description : This include file is designed to contain items useful to all |
14 |
// code files and projects. |
14 |
// code files and projects. |
15 |
// |
15 |
// |
16 |
// This code is distributed under the GNU Public License |
16 |
// This code is distributed under the GNU Public License |
17 |
// which can be found at http://www.gnu.org/licenses/gpl.txt |
17 |
// which can be found at http://www.gnu.org/licenses/gpl.txt |
18 |
// |
18 |
// |
19 |
//***************************************************************************** |
19 |
//***************************************************************************** |
20 |
|
20 |
|
21 |
#ifndef GLOBAL_H |
21 |
#ifndef GLOBAL_H |
22 |
#define GLOBAL_H |
22 |
#define GLOBAL_H |
23 |
|
23 |
|
24 |
// global AVRLIB defines |
24 |
// global AVRLIB defines |
25 |
#include "avrlibdefs.h" |
25 |
#include "avrlibdefs.h" |
26 |
// global AVRLIB types definitions |
26 |
// global AVRLIB types definitions |
27 |
#include "avrlibtypes.h" |
27 |
#include "avrlibtypes.h" |
28 |
|
28 |
|
29 |
// project/system dependent defines |
29 |
// project/system dependent defines |
30 |
|
30 |
|
31 |
#define UART_RX_BUFFER_SIZE 0x00FF |
31 |
#define UART_RX_BUFFER_SIZE 0x00FF |
32 |
|
32 |
|
33 |
// CPU clock speed |
33 |
// CPU clock speed |
34 |
//#define F_CPU 16000000 // 16MHz processor |
34 |
//#define F_CPU 16000000 // 16MHz processor |
35 |
//#define F_CPU 14745000 // 14.745MHz processor |
35 |
//#define F_CPU 14745000 // 14.745MHz processor |
36 |
#define F_CPU 8000000 // 8MHz processor |
36 |
#define F_CPU 8000000 // 8MHz processor |
37 |
//#define F_CPU 7372800 // 7.37MHz processor |
37 |
//#define F_CPU 7372800 // 7.37MHz processor |
38 |
//#define F_CPU 4000000 // 4MHz processor |
38 |
//#define F_CPU 4000000 // 4MHz processor |
39 |
//#define F_CPU 3686400 // 3.69MHz processor |
39 |
//#define F_CPU 3686400 // 3.69MHz processor |
40 |
#define CYCLES_PER_US ((F_CPU+500000)/1000000) // cpu cycles per microsecond |
40 |
#define CYCLES_PER_US ((F_CPU+500000)/1000000) // cpu cycles per microsecond |
41 |
|
41 |
|
42 |
#endif |
42 |
#endif |