Page 1 of 1
PIC 16F876A is Okay But 16F886 NOT running
Posted: Wed Jan 26, 2011 5:06 pm
by Eddy van den Boom
Dear All, I have the FlowCode V4.3.7.63 Prof.and I have ECIO40 and I can also program 16F876A,
16F877 only with the PICkit2 Fw.:V2.61 when I use a 16F886 or big one 16F887 than Compiler to C and
send to 16F886 or 16F887 it's Okay than read the code it is Okay but nothing happened on the Chip.
When I touch the chip it run but stop after 10 seconds. Do I forget something, a pin to VSS with a resistants????
When I remove the 16F886 Chip and replaced by a 16F876A use the same code but change only the Target than it's run the Code on the chip.
The 16F876A are out of stock so I like to use the 16F886
Please help what is the problem.
Thanks a lot.
Eddy
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Wed Jan 26, 2011 5:36 pm
by Dan81
Hello Eddy
When I use a 16F887, for the config word I put : $2FF2.
Can you post your flowchart (or a part of) .
Daniel
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Wed Jan 26, 2011 6:19 pm
by medelec35
Hiya Eddy.
What would also help is a circuit diagram showing any i/p's you have going to ECIO40 (if applicable of course) . If you have any i/p's are they connected to a pull-up/down resistor. Floating i/p's when switch is connected but not pressed (so is o/c) can cause this type of issue, especially if program is designed to halt until i/p= 0
Also parasitic oscillation can cause issues, but if using ECIO40 then I can see it being that.
Until you post more information, we will be just stabbing in the dark.
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Sun Jan 30, 2011 6:12 pm
by Eddy van den Boom
Dan81 wrote:Hello Eddy
When I use a 16F887, for the config word I put : $2FF2.
Can you post your flowchart (or a part of) .
Daniel
Hello Daniel,
I send you the FlowChart and from Olimes the pdf file PIC-P28 PCBoard
I use the PIC-P28 board with a PIC16F876A and run a simple LED on-off
FC4 program it work okay.
When I change PIC in a 16F886 nothings happened or I touch or move
something maybe LED Blink on-off??
Thanks,
Eddie
- PIC-P28.pdf
- Olimex PIC P28 PCBoard
- (207.56 KiB) Downloaded 283 times
- LED RB0.fcf
- Simple FC V4 program
- (4.5 KiB) Downloaded 258 times
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Sun Jan 30, 2011 6:20 pm
by Eddy van den Boom
medelec35 wrote:Hiya Eddy.
What would also help is a circuit diagram showing any i/p's you have going to ECIO40 (if applicable of course) . If you have any i/p's are they connected to a pull-up/down resistor. Floating i/p's when switch is connected but not pressed (so is o/c) can cause this type of issue, especially if program is designed to halt until i/p= 0
Also parasitic oscillation can cause issues, but if using ECIO40 then I can see it being that.
Until you post more information, we will be just stabbing in the dark.
Hi Medelec35,
I send you also the simple FC4 program and the PIC P28 PDF diagram from Olimex.
Maybe you can see wath is wrong why a PIC 16F876A run okay and a PIC 16F886 not.
Thanks,
Eddie
- PIC-P28.pdf
- PIC P28 PCBoard pdf
- (207.56 KiB) Downloaded 318 times
- LED RB0.fcf
- Simple FC4 LED program
- (4.5 KiB) Downloaded 256 times
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Sun Jan 30, 2011 6:45 pm
by Dan81
Hello Eddy
I have never used Pickit.
With Flowcode, go to chip / configure and click on button "Config 1" and put 0x2FF2 then compile and send hex file with our programmer.
With your configuration the watchdog is enabled !
I suppose your cristal is 19.6MHZ
Did you make tests with 2 or 3 Pics ?
Where are the 22pF (C9 C10) , are they SMT ?
Daniel
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Sun Jan 30, 2011 8:11 pm
by medelec35
I agree with Daniel on both points.
Although rather than putting in a hex value I personally change settings in Expert Config Screen' (go into the configuration menu ('Chip Configure..') click on 'Switch To Expert Config Screen') there you need to disable watchdog and LVP etc See:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
You will need LVP disabled to program via PICkit2. Have you got Flowcode configured for PICkit2?
If not See:
http://www.matrixmultimedia.com/support ... f=22&t=672
Although looking the the picture of your hardware, I don't believe you can physically fit the PICkit2? within the small space of available area. You may need to obtain (or make your own) header+ socket to connect between PICkit2? and ICSP of board. But pictures can be deceiving, so I could be wrong.
Re: PIC 16F876A is Okay But 16F886 NOT running
Posted: Tue Feb 01, 2011 8:33 pm
by Eddy van den Boom
Dan81 wrote:Hello Eddy
I have never used Pickit.
With Flowcode, go to chip / configure and click on button "Config 1" and put 0x2FF2 then compile and send hex file with our programmer.
With your configuration the watchdog is enabled !
I suppose your cristal is 19.6MHZ
Did you make tests with 2 or 3 Pics ?
Where are the 22pF (C9 C10) , are they SMT ?
Daniel
Hello Daniel,
The two 22pF are SMT type, I use The PICkit2 programmer from MicroChip with all "old" Pics.
With FlowCode V4 you can select the PICkit2 .
Here is my setting:
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe
-v -t PIC%p "%f.c"
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostlink.pic.exe
-ld "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\lib" libc.pic16.lib flowcode.pic16.lib rand.pic16.lib float.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f"
C:\Program Files\Matrix Multimedia\Flowcode V4\tools\PICkit2\pk2cmd.exe
-PPIC%p -F%f.hex -M -A5 -T -R -BC:\Program Files\Matrix Multimedia\Flowcode V4\tools\PICkit2\
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PPP\PPPv3.exe
-cs 2 -chip PIC%p -config
C:\WINDOWS\notepad.exe
I have only the ECIO40 chip from Matrix Multimedia.
When you go to the webpage from MicroChip and look to 16F876A then the 16F886 is the better one.
The setting under "Config 1" and put 0x2FF2 is okay.
I try with more then one PICs also the 16F887 will not run but the 16F877 it's running. ( 40pins chip)
What is wrong?