' PIC16F88 code template for MECH307 Labs ' The following configuration bits and register settings ' enable the internal oscillator, set it to 8MHz, ' disables master clear, and turn off A/D conversion ' Configuration Bit Settings: ' Oscillator INTRC (INT102) (RA6 for I/O) ' Watchdog Timer Enabled ' Power-up Timer Enabled ' MCLR Pin Function Input Pin (RA5 for I/O) ' Brown-out Reset Enabled ' Low Voltage Programming Disabled ' Flash Program Memory Write Enabled ' CCP Multiplexed With RB0 ' Code Not Protected ' Data EEPROM Not Protected ' Fail-safe Clock Monitor Enabled ' Internal External Switch Over Enabled ' Define configuration settings (different from defaults) #CONFIG __CONFIG _CONFIG1, _INTRC_IO & _PWRTE_ON & _MCLR_OFF & _LVP_OFF #ENDCONFIG ' Set the internal oscillator frequency to 8 MHz DEFINE OSC 8 OSCCON.4 = 1 OSCCON.5 = 1 OSCCON.6 = 1 ' Turn off the analog to digital converters. Refer to Threadd Design Example A.4 ' in the textbook foran example of how to configure and use A/D conversion ansel = 0 ' Put your code here: