pic24_libconfig.h

Go to the documentation of this file.
00001 /*
00002  * "Copyright (c) 2008 Robert B. Reese, Bryan A. Jones, J. W. Bruce ("AUTHORS")"
00003  * All rights reserved.
00004  * (R. Reese, reese_AT_ece.msstate.edu, Mississippi State University)
00005  * (B. A. Jones, bjones_AT_ece.msstate.edu, Mississippi State University)
00006  * (J. W. Bruce, jwbruce_AT_ece.msstate.edu, Mississippi State University)
00007  *
00008  * Permission to use, copy, modify, and distribute this software and its
00009  * documentation for any purpose, without fee, and without written agreement is
00010  * hereby granted, provided that the above copyright notice, the following
00011  * two paragraphs and the authors appear in all copies of this software.
00012  *
00013  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
00014  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00015  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
00016  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00017  *
00018  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
00019  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
00020  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
00021  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
00022  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
00023  *
00024  * Please maintain this header in its entirety when copying/modifying
00025  * these files.
00026  *
00027  *
00028  */
00029 
00030 // Documentation for this file. If the \file tag isn't present,
00031 // this file won't be documented.
00043 // No relevant defines in pic24_adc.h
00044 
00049 // Doxygen 1.5.6 warns that the \copydoc below produces a
00050 // recursive call chain. This warning also appears if
00051 // the referenced file doesn't exist, so it seems like
00052 // Doxygen can find the referenced file. Workaround: this
00053 // file needs to come before all of its references
00054 // alphabetically (i.e. pic24_alibconfig.h puts it before
00055 // pic24_clockfreq.h, which makes the line below work).
00057 // Uncomment one of the #defines below to make
00058 // a clock choice. If all the #defines below
00059 // are commentend, code in pic24_clockfreq.h
00060 // will pick a default clock choice.
00061 #ifndef CLOCK_CONFIG
00062 //#define CLOCK_CONFIG SIM_CLOCK
00063 //#define CLOCK_CONFIG FRCPLL_FCY16MHz
00064 //#define CLOCK_CONFIG FRC_FCY4MHz
00065 //#define CLOCK_CONFIG PRIPLL_8MHzCrystal_16MHzFCY
00066 //#define CLOCK_CONFIG PRI_NO_PLL_7372KHzCrystal
00067 //#define CLOCK_CONFIG FRC_FCY3685KHz
00068 //#define CLOCK_CONFIG FRCPLL_FCY40MHz
00069 //#define CLOCK_CONFIG PRIPLL_7372KHzCrystal_40MHzFCY
00070 //#define CLOCK_CONFIG PRIPLL_8MHzCrystal_40MHzFCY
00071 #endif
00072 
00073 // For convenience, choose the fastest
00074 // possible clock depending on which
00075 // processor we're using. If simulation mode is
00076 // selected, then use the simulation clock.
00077 #ifndef CLOCK_CONFIG
00078 #if defined(SIM)
00079 #define CLOCK_CONFIG SIM_CLOCK
00080 #elif defined(EXPLORER16_100P) && defined(__PIC24H__)
00081 #define CLOCK_CONFIG PRIPLL_8MHzCrystal_40MHzFCY
00082 #elif defined(EXPLORER16_100P) && defined(__PIC24F__)
00083 #define CLOCK_CONFIG PRIPLL_8MHzCrystal_16MHzFCY
00084 #elif defined(__PIC24H__) || defined(__DOXYGEN__)
00085 #define CLOCK_CONFIG FRCPLL_FCY40MHz
00086 #elif defined(__PIC24F__)  || defined(__PIC24FK__)
00087 #define CLOCK_CONFIG FRCPLL_FCY16MHz
00088 #elif defined(__dsPIC33F__)
00089 #define CLOCK_CONFIG FRCPLL_FCY40MHz
00090 #else
00091 #error Unknown processor
00092 #endif
00093 #endif
00094 
00096 
00101 // Renaming this from pic24_defaults.h to pic24_libconfig.h
00102 // causes this to be reported by Doxygen as a recursive call
00103 // chain. Doxygen 1.5.6. See comments on CLOCK_CONFIG in this
00104 // file for a workaround.
00106 #ifndef DEBOUNCE_DLY
00107 #define DEBOUNCE_DLY  15   //in milliseconds
00108 #endif
00109 
00111 
00112 
00113 // No relevant defines in pic24_dma.h
00114 // No relevant defines in pic24_ecan.h
00115 // No relevant defines in pic24_flash.h
00116 // No relevant defines in pic24_generic.h
00117 // No relevant defines in pic24_i2c.h
00118 // No relevant defines in pic24_ports.h
00119 
00124 
00125 #ifndef SERIAL_EOL_DEFAULT   //can be overridden in project file
00126 #define SERIAL_EOL_DEFAULT SERIAL_EOL_LF
00127 #endif
00128 
00130 #ifndef DEFAULT_UART
00131 #if defined(EXPLORER16_100P)
00132 #define DEFAULT_UART 2
00133 #else
00134 #define DEFAULT_UART 1
00135 #endif
00136 #endif
00137 
00139 
00140 // No relevant defines in pic24_spi.h
00141 // No relevant defines in pic24_timer.h
00142 
00150 #ifndef DEFAULT_BAUDRATE
00151 // For convenience, common baud rates (uncomment one):
00152 #define DEFAULT_BAUDRATE  230400
00153 //#define DEFAULT_BAUDRATE  115200
00154 //#define DEFAULT_BAUDRATE   57600
00155 //#define DEFAULT_BAUDRATE   38400
00156 //#define DEFAULT_BAUDRATE   19200
00157 //#define DEFAULT_BAUDRATE    9600
00158 #endif
00159 
00167 #ifndef DEFAULT_BRGH
00168 #define DEFAULT_BRGH  0
00169 #endif
00170 
00171 #if (DEFAULT_BRGH != 0) && (DEFAULT_BRGH != 1)
00172 #error Invalid value for DEFAULT_BRGH
00173 #endif
00174 
00176 
00177 // No relevant defines in pic24_timer.h
00178 
00183 #ifndef USE_CLOCK_TIMEOUT
00184   #ifdef BUILT_ON_ESOS
00185     #define USE_CLOCK_TIMEOUT 0
00186   #else
00187     #define USE_CLOCK_TIMEOUT 1
00188   #endif
00189 #endif
00190 
00191 #ifndef USE_HEARTBEAT
00193   #define USE_HEARTBEAT 1
00194 #endif
00195 
00196 
00197 
00198 #ifndef HB_LED
00199   #if defined(EXPLORER16_100P)
00200     #define HB_LED _LATA7
00201     #define CONFIG_HB_LED() CONFIG_RA7_AS_DIG_OUTPUT()
00202   #elif defined(DANGEROUS_WEB)
00203     #define HB_LED _LATA8
00204 
00205     #define CONFIG_HB_LED() CONFIG_RA8_AS_DIG_OUTPUT()
00206   #elif defined(MICROSTIK)
00207     #define HB_LED _LATB15
00208     #define CONFIG_HB_LED() CONFIG_RB15_AS_DIG_OUTPUT()
00209   #else
00211     #define HB_LED _LATB15
00213     #define CONFIG_HB_LED() CONFIG_RB15_AS_DIG_OD_OUTPUT()
00214   #endif
00215 #endif // #ifndef HB_LED
00216 
00218 

Generated on Mon Oct 18 07:40:47 2010 for Python-on-a-chip by  doxygen 1.5.9