PDA

View Full Version : Trying to understand config fuses



GoldStar
- 19th May 2009, 03:20
Ok, so I had a program planned out for the 12f683 and other than GPIO.3 not having a pull up resistor, I understood what was going on (cmcon, GPIO, TRISIO, etc). Now I've decided to change my program over to a 16F684 and I have some other options now and it looks like this chip runs at 8Mhz so I'm going to need to tell picbasic that, correct?

I've been reading the datasheet, but there is so much material on there it's hard to get it all down in one shot, so I made some notes on paper. Here's my fuses so far



@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
ANSEL = %00000000 'Make sure Analog functions are turned OFF (should not be needed)
CMCON0 = 7 'Turn OFF comparators, datasheet section 8.3
ADCON0 = 0 ' A/D off
WPUA = %00110111 ' Internal pull-ups on except GPIO.3 which doesn't have one when MCLRE off
OPTION_REG = %00000000 ' Pull-ups = on, prescaler to Timer1
PORTC = %00000000
TRISA = %00111111 'the inputs
TRISC = %00000000 'the outputs