The default clock on the 12F683 is 4MHz according to the datasheet found in REG 3-1 but still better to set it and define it along with turning OFF other peripherals not used:
But if using PBP3 then:Code:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF & _BOD_OFF OSCCON = %01100001 ' Osc 4MHz ADCON0 = 0 ' A/D module OFF CMCON0 = 7 ' Analog comparators off GPIO = %00000000 ' Turn OFF all ports TRISIO = %00001101 ' Ports 0, 2 and 3 inputs, rest outputs (Example) DEFINE OSC 4 ' Declare FOR PAUSE and PAUSEUS statements
Code:#CONFIG __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF & _BOD_OFF #ENDCONFIG OSCCON = %01100001 ' Osc 4MHz ADCON0 = 0 ' A/D module OFF CMCON0 = 7 ' Analog comparators off GPIO = %00000000 ' Turn OFF all ports TRISIO = %00001101 ' Ports 0, 2 and 3 inputs, rest outputs (Example) DEFINE OSC 4 ' Declare FOR PAUSE and PAUSEUS statements





Bookmarks