ATtiny85 Template Code
Code snippets for the ATtiny85
Main Page
Files
File List
Globals
All
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
hardware.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*
2
* Hardware definitions
3
*---------------------------------------------------------------------------*
4
* 14-Apr-2014 ShaneG
5
*
6
* Defines the hardware pins to use for parts of the shared library.
7
*--------------------------------------------------------------------------*/
8
#ifndef __HARDWARE_H
9
#define __HARDWARE_H
10
11
// Bring in what we need for pin definitions
12
#include <avr/io.h>
13
14
//---------------------------------------------------------------------------
15
// Feature selection
16
//
17
// These defines control what code gets included in the library, make sure
18
// everything you want is uncommented. Further down the file you get to
19
// configure the pin assignments and other options for each feature.
20
//---------------------------------------------------------------------------
21
28
#define UART_ENABLED
29
35
#define SYSTICK_ENABLED
36
42
#define SOFTPWM_ENABLED
43
44
//---------------------------------------------------------------------------
45
// Software UART configuration
46
//---------------------------------------------------------------------------
47
54
#define BAUD_RATE 57600
55
58
#define UART_TX PINB5
59
65
#define UART_RX PINB5
66
73
#define UART_INTERRUPT
74
80
#define UART_BUFFER 4
81
82
//---------------------------------------------------------------------------
83
// Software PWM configuration
84
//---------------------------------------------------------------------------
85
91
#define SPWM_COUNT 3
92
94
#define SPWM_PIN0 PINB0
95
97
#define SPWM_PIN1 PINB1
98
100
#define SPWM_PIN2 PINB2
101
103
#define SPWM_PIN3 PINB3
104
105
//---------------------------------------------------------------------------
106
// Nokia LCD device support
107
//
108
// To use this device uncomment the LCD_ENABLED line below and define your
109
// pins with the LCD_xxx defines
110
//---------------------------------------------------------------------------
111
112
// Enable Nokia LCD support
113
//#define LCD_ENABLED
114
115
// Nokia LCD pin numbers
116
#define LCD_MOSI PINB2
117
#define LCD_SCK PINB4
118
#define LCD_CD PINB1
119
#define LCD_RESET PINB0
120
121
#endif
/* __HARDWARE_H */
hardware.h
Generated on Wed Jun 4 2014 17:16:48 for ATtiny85 Template Code by
1.8.6