• Main Page
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

mTouch_hardwareProfile_16F61x.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  *  © 2012 Microchip Technology Inc.                                       
00003  *  
00004  *  Project Name:    mTouch Framework v2.1
00005  *  FileName:        mTouch_HardwareProfile_16F61x.h
00006  *  Dependencies:    mTouch.h
00007  *  Processor:       See documentation for supported PIC® microcontrollers 
00008  *  Compiler:        HI-TECH PRO Ver. 9.80 or later
00009  *  IDE:             MPLAB® IDE v8.50 (or later) or MPLAB® X                        
00010  *  Hardware:         
00011  *  Company:         
00012  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00013  *  Description:     mTouch CVD Framework Hardware Profile Header File
00014  *                   - Provides information about correct SFR addresses,
00015  *                     pin assignments, module availability, and any other
00016  *                     part-specific data.
00017  *                   - See the documentation for more information.
00018  *************************************************************************/
00019  /**************************************************************************
00020  * MICROCHIP SOFTWARE NOTICE AND DISCLAIMER: You may use this software, and 
00021  * any derivatives created by any person or entity by or on your behalf, 
00022  * exclusively with Microchip's products. Microchip and its licensors 
00023  * retain all ownership and intellectual property rights in the 
00024  * accompanying software and in all derivatives hereto. 
00025  * 
00026  * This software and any accompanying information is for suggestion only. 
00027  * It does not modify Microchip's standard warranty for its products. You 
00028  * agree that you are solely responsible for testing the software and 
00029  * determining its suitability. Microchip has no obligation to modify, 
00030  * test, certify, or support the software. 
00031  * 
00032  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 
00033  * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED 
00034  * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 
00035  * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE, ITS INTERACTION WITH 
00036  * MICROCHIP'S PRODUCTS, COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY 
00037  * APPLICATION. 
00038  * 
00039  * IN NO EVENT, WILL MICROCHIP BE LIABLE, WHETHER IN CONTRACT, WARRANTY, 
00040  * TORT (INCLUDING NEGLIGENCE OR BREACH OF STATUTORY DUTY), STRICT 
00041  * LIABILITY, INDEMNITY, CONTRIBUTION, OR OTHERWISE, FOR ANY INDIRECT, 
00042  * SPECIAL, PUNITIVE, EXEMPLARY, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, 
00043  * FOR COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, 
00044  * HOWSOEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY 
00045  * OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWABLE BY LAW, 
00046  * MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS 
00047  * SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID 
00048  * DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 
00049  * 
00050  * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF 
00051  * THESE TERMS. 
00052  *************************************************************************/
00056 
00057 #if !defined(__MTOUCHCVD_HARDWARE_16F61X_H)
00058 #define __MTOUCHCVD_HARDWARE_16F61X_H
00059 
00060 #if !defined(_16F616) && !defined(_16HV616)
00061     #error The current mTouch hardware include file does not support this PIC microcontroller.
00062 #endif
00063 
00064 #if defined(_16F616) || defined(_16HV616)
00065     #if MTOUCH_NUMBER_SENSORS > 8
00066         #error The PIC16F/HV616 is not able to support more than 8 sensors due to pinout limitations.
00067     #endif
00068 #endif
00069 
00070 
00071 //===========================================================
00072 //  Device Configuration
00073 //===========================================================
00074 #define MTOUCH_USE_PORT
00075 
00076 
00077 //===========================================================
00078 //  Communications Configuration
00079 //===========================================================
00080 // NO UART AVAILABLE
00081 
00082 #define PIC_TIMER0_AVAILABLE
00083 #define PIC_TIMER1_AVAILABLE
00084 #define PIC_TIMER2_AVAILABLE
00085 
00086 //===========================================================
00087 //  ADC Configuration
00088 //===========================================================
00089 #define PIC_ADC_BITS                10
00090 #define PIC_ADC_UNIMP_AVAILABLE
00091     
00092 #define PIC_ADC_ADCS                ADCON1bits.ADCS
00093 #define PIC_ADC_ADFM                ADCON0bits.ADFM
00094 #define PIC_ADC_ADON                ADCON0bits.ADON
00095 
00096 #define PIC_ADC_ADCS_FOSC2          0b000
00097 #define PIC_ADC_ADCS_FOSC4          0b100
00098 #define PIC_ADC_ADCS_FOSC8          0b001
00099 #define PIC_ADC_ADCS_FOSC16         0b101
00100 #define PIC_ADC_ADCS_FOSC32         0b010
00101 #define PIC_ADC_ADCS_FOSC64         0b110
00102 #define PIC_ADC_ADCS_FRC            0b111
00103 
00104 #define PIC_ADC_ADFM_RIGHT          1
00105 #define PIC_ADC_ADFM_LEFT           0
00106 
00107 #if     _XTAL_FREQ == 8000000 
00108     #define PIC_ADC_SETCLK()    PIC_ADC_ADCS = PIC_ADC_ADCS_FOSC16
00109     #define PIC_ADC_TAD         2 
00110 #elif   _XTAL_FREQ == 4000000 
00111     #define PIC_ADC_SETCLK()    PIC_ADC_ADCS = PIC_ADC_ADCS_FOSC8
00112     #define PIC_ADC_TAD         2 
00113 #elif   _XTAL_FREQ == 1000000 
00114     #define PIC_ADC_SETCLK()    PIC_ADC_ADCS = PIC_ADC_ADCS_FOSC2
00115     #define PIC_ADC_TAD         2 
00116 #else
00117     #error No predefined ADC clock values for the chosen _XTAL_FREQ.
00118 #endif
00119 
00120 
00121 //===========================================================
00122 //  DAC Configuration
00123 //===========================================================
00124 // NOT AVAILABLE
00125 
00126 
00127 //===========================================================
00128 //  Software-enabled Watchdog Timer Configuration
00129 //===========================================================
00130 // NOT AVAILABLE
00131 
00132 
00133 //===========================================================
00134 //  Analog Port Mapping
00135 //  - Right Justification
00136 //  - VDD/VSS Reference
00137 //  - GO/DONE cleared
00138 //  - ADON enabled
00139 //===========================================================
00140 #define MTOUCH_AD_AN0           0x81
00141 #define MTOUCH_AD_AN1           0x85
00142 #define MTOUCH_AD_AN2           0x89
00143 #define MTOUCH_AD_AN3           0x8D
00144 #define MTOUCH_AD_AN4           0x91
00145 #define MTOUCH_AD_AN5           0x95
00146 #define MTOUCH_AD_AN6           0x99
00147 #define MTOUCH_AD_AN7           0x9D
00148 
00149 #define MTOUCH_AD_ISO_AND_GO    0xBF
00150 #define MTOUCH_AD_ISO_NOGO      0xBD
00151 
00152 #define MTOUCH_PIN_AN0          0
00153 #define MTOUCH_PIN_AN1          1
00154 #define MTOUCH_PIN_AN2          2
00155 #define MTOUCH_PIN_AN3          4
00156 #define MTOUCH_PIN_AN4          0
00157 #define MTOUCH_PIN_AN5          1
00158 #define MTOUCH_PIN_AN6          2
00159 #define MTOUCH_PIN_AN7          3
00160 
00161 
00162 #define MTOUCH_LETTER_AN0       A
00163 #define MTOUCH_LETTER_AN1       A
00164 #define MTOUCH_LETTER_AN2       A
00165 #define MTOUCH_LETTER_AN3       A
00166 #define MTOUCH_LETTER_AN4       C
00167 #define MTOUCH_LETTER_AN5       C
00168 #define MTOUCH_LETTER_AN6       C
00169 #define MTOUCH_LETTER_AN7       C
00170 
00171 
00172 #endif
00173 

mTouch Framework v2.1 documentation by  Click here to visit our website at www.microchip.com