Page 1 of 1

eboo6 :- Programming Failed [config2]

Posted: Sun Dec 04, 2011 1:26 pm
by Darren.Smith
hi guys, need some help, having problems in programming a 16f1826, i know this is not the most common of pic's, but decided to use it for cost over the 16f88, also it has m'touch capability but will get to that later. back to the 16f1826, the problem i am having is i always get the error programming failed [config2] when sending code to the pic on the eboo6 programmer, i can send the code fine to a 16f88, which leads me to believe it is the programmer or software causing the problem, i have noticed previous threads on this problem for the 16f1827 pic, is this the same problem? i also have this problem when trying to use alot of the little 8 pin gpio pic's, errors include cannot id the onboard chip and unable to erase pic then it will always fail to program.

p.s. back to the part about m'touch capability, does anyone have any examples about using this function on the 16f1826 am looking to build a cap sense touch switch but have absolutly no idea where to start as my programming level is only low as i am a beginer, any help on either problem would be much apreciated..

cheers
dazza

Re: eboo6 :- Programming Failed [config2]

Posted: Mon Dec 05, 2011 11:29 am
by Benj
Hello Dazza,

I will have a look into this programming issue and see if I can get this device to behave for you.

Regarding the cap touch sensing, I released an example of how to do this last week on the forums.

http://www.matrixmultimedia.com/mmforum ... uch#p29305

Re: eboo6 :- Programming Failed [config2]

Posted: Mon Dec 05, 2011 12:47 pm
by Darren.Smith
thank you for the quick reply, had not noticed the new topic so thank you for the link...

cheers
dazza

Re: eboo6 :- Programming Failed [config2]

Posted: Tue Dec 06, 2011 6:08 pm
by Darren.Smith
does the [config2] relate to the second word of the config settings under chip configuration?
if so the 2 values set ie:- config1 0x09e4
config2 0x1cff would seem to be correct going by the data sheet that i have.

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 9:47 am
by Steve
Does the program actually run correctly on the chip, despite this error message? I think the error message can be ignored for the 16F182x chips because of an error in our data files.

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 11:57 am
by Darren.Smith
morning steve, have just tried a new 16f1826-i/p, have set chip to run on internal with a frequency of 8mhz, in chip config everything is disabled except for mclr function, hence the checksum's i posted previous. can auto detect ic in expert config. just tried sending basic program of flashing b1 on/off in a loop, came up with same error while programming. i tried pic outside the programmer with a5 held high looking at b1 it is just sitting at 2.0v approx, so i would say it did not send program or chip is not initializing. put chip back into programmer and tried to send program again this time error of cannot erase came up, after continuing again the error of [config2] showed.... it is very possible i am doing something very stupid but i cannot see what it is.

cheers
Dazza

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 12:21 pm
by Steve
The datasheet says the internal oscillator is 500kHz by default:
Following any Reset, the IRCF<3:0> bits of
the OSCCON register are set to ‘0111’ and
the frequency selection is set to 500 kHz.
The user can modify the IRCF bits to
select a different frequency.
You may also need to enable the "internal-external switchover" option and possibly disable the "fail clock monitor enable" and "PLL enable" options.

Perhaps this is why the flasher program is not working?

To work around the "config2" error message, you could put the config data in by hand (in the configure screen, click the hex value next to the "config2" label at the bottom-right of the screen and enter 0x1eff).

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 12:46 pm
by Darren.Smith
that makes sense to me now, i will give that a try, i thought that selecting 8mhz in the view options of flowcode would set the internal oscillator frequency, i am guessing that is for the simulation of flowcharts and not the setup of the chip and i will need to put a c block at the beginning of the code to change the oscon register?

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 1:02 pm
by Steve
The "clock speed" entry in Flowcode is just so that the program can calculate the delays (i.e. the delay icon and any delays used within component code). This is a common misunderstanding, but there is no real way for Flowcode to detect the actual clocking modes used by the chip (the config settings are largely outside of the program itself).

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 1:10 pm
by Darren.Smith
thank you kindly, this makes sense now...time to play around and make some progress....

Re: eboo6 :- Programming Failed [config2]

Posted: Wed Dec 07, 2011 5:38 pm
by Darren.Smith
still can't get past config 2 error and get a program into The chip, tried 0x1eff has config 2 word, but still no joy