-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
50 lines (43 loc) · 2 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// -----------------------------------------------------------------------
// Copyright (C) Rodrigo Almeida 2014
// -----------------------------------------------------------------------
// Arquivo: config.h
// Header com definições dos microcontroladores PIC18F4550 e
// PIC18F4520 para o compilador SDCC 3.3.0
// Autor: Rodrigo Maximiano Antunes de Almeida
// rodrigomax at unifei.edu.br
// Licensa: GNU GPL 2
// -----------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// -----------------------------------------------------------------------
#ifndef CONFIG_H
#define CONFIG_H
//#ifndef PIC18F4550
// #define PIC18F4550
//#endif
#ifndef PIC18F4520
#define PIC18F4520
#endif
#ifdef PIC18F4550
//configurações do microcontrolador
#pragma config MCLRE=ON // Master Clear desabilitado
#pragma config FOSC=HS // Oscilador c/ cristal externo HS
#pragma config WDT=OFF // Watchdog controlado por software
#pragma config LVP=OFF // Sem programação em baixa tensão
#endif
#ifdef PIC18F4520
#pragma config MCLRE=ON // Master Clear desabilitado
#pragma config OSC=HS // Oscilador c/ cristal externo HS
#pragma config WDT=OFF // Watchdog controlado por software
#pragma config LVP=OFF // Sem programação em baixa tensão
#pragma config DEBUG = OFF // Desabilita debug
#pragma config WDTPS = 1 // Configura prescaler do watchdog
#endif
#endif