ICSP 12F683 Not Working
Moderator: Benj
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
ICSP 12F683 Not Working
Hope somebody can help with this please.
Attached is the schematic I'm using to program the 12F683 ICSP with a PICkit2 programmer.
The program simulates fine. It also compiles to C fine.
When I try to compile to HEX I get the following errors/messages;(Attached)
I've also attached a photo of the actual board wiring incase somebody can spot what I have done wrong.
I'm using WINDOWS VISTA.
Any help with this will be appreciated. Thanks a lot - John
Attached is the schematic I'm using to program the 12F683 ICSP with a PICkit2 programmer.
The program simulates fine. It also compiles to C fine.
When I try to compile to HEX I get the following errors/messages;(Attached)
I've also attached a photo of the actual board wiring incase somebody can spot what I have done wrong.
I'm using WINDOWS VISTA.
Any help with this will be appreciated. Thanks a lot - John
- Attachments
-
- 12F683 ICSP Board (2).JPG
- (194.74 KiB) Downloaded 4503 times
-
- 12f683 hex errors.jpg
- (112.25 KiB) Downloaded 4503 times
-
- 12F683 ICSP Diagram.jpg
- (208.68 KiB) Downloaded 4503 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: ICSP 12F683 Not Working
It looks like your compiler settings are incorrect. Could you start by resetting them to default and try to compile the flowchart to see if that succeeds? If it does, change the programmer settings to those required for PICkit and try again. Make sure you change the programmer settings, not the compiler settings.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John it looks like you have not set the Compiler parameters up correctly
Have you looked at:
http://www.matrixmultimedia.com/support ... f=68&t=787
Then checked all is set up correctly?
Edit: crossed posted with kersing.
Have you looked at:
http://www.matrixmultimedia.com/support ... f=68&t=787
Then checked all is set up correctly?
Edit: crossed posted with kersing.
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks guys, the prograsm is now compiling into C and also into hex. No error messages or anything like that.
I discovered that my MICROCHIP LOW PIN COUNT BOARD can also take the 12F683 so I have inserted it into the socket that once held the 690 chip.
Now, when I use the compile to chip button the TARGET and BUSY light on the PICKIT2 programmer come with the BUSY red light flickering which indicates to me that its programming the 12F683.Ithink??
However, when I run the simulation program, the LED on pin 5 does light up but does not switch on and off. I checked the chip using the PICKIT2 program and the chip appears to be empty, nothing,zip. But if I import the hex file using PICKIT2 program it does write the program to the chip but still the LED does not switch on or off.
I've attached a photo of the new setup and also the program file for your info.
Any ides please. Thanks a lot.....again - John
I discovered that my MICROCHIP LOW PIN COUNT BOARD can also take the 12F683 so I have inserted it into the socket that once held the 690 chip.
Now, when I use the compile to chip button the TARGET and BUSY light on the PICKIT2 programmer come with the BUSY red light flickering which indicates to me that its programming the 12F683.Ithink??
However, when I run the simulation program, the LED on pin 5 does light up but does not switch on and off. I checked the chip using the PICKIT2 program and the chip appears to be empty, nothing,zip. But if I import the hex file using PICKIT2 program it does write the program to the chip but still the LED does not switch on or off.
I've attached a photo of the new setup and also the program file for your info.
Any ides please. Thanks a lot.....again - John
- Attachments
-
- I LED FLASH 12F683.fcf
- (6.5 KiB) Downloaded 267 times
-
- PICKIT2 LPCBoard.JPG
- (203.98 KiB) Downloaded 4487 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John,
Two things.
1) If there is not a pull-up resistor connected from Pin 4 (MCLR) to +5V then you will need to go into the configuration screen and change Master clear enable from external to internal.
2) If there is no external crystal then you will need to go into the configuration screen and change oscillator to internal RC.
If you plan on running at the default 4MHz, then just change clock speed to 4000000.
If you would like to run the chip at a faster 8MHz, then you will need to do two things
A. Change clock speed to 8000000.
B. Add a c code block at the beginning of main (before loop starts) with osccon=0x70;
How the value is worked out see:
http://www.matrixmultimedia.com/mmforum ... 29&#p28829
Martin
Two things.
1) If there is not a pull-up resistor connected from Pin 4 (MCLR) to +5V then you will need to go into the configuration screen and change Master clear enable from external to internal.
2) If there is no external crystal then you will need to go into the configuration screen and change oscillator to internal RC.
If you plan on running at the default 4MHz, then just change clock speed to 4000000.
If you would like to run the chip at a faster 8MHz, then you will need to do two things
A. Change clock speed to 8000000.
B. Add a c code block at the beginning of main (before loop starts) with osccon=0x70;
How the value is worked out see:
http://www.matrixmultimedia.com/mmforum ... 29&#p28829
Martin
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks Martin, changed the clock speed.
Now when I go to build>project options>configure chip......nothing but a small bland box comes up. Never seen it before. Usually another window came up with all the chip settings??
Have attached the screen for you to look at.
Thanks again - John
Now when I go to build>project options>configure chip......nothing but a small bland box comes up. Never seen it before. Usually another window came up with all the chip settings??
Have attached the screen for you to look at.
Thanks again - John
- Attachments
-
- Configure chip screen.jpg
- (195.25 KiB) Downloaded 4483 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John.
You will need to go to 'Build' menu, select 'Compiler options', then click on the 'Programmer tab'.
Make sure you have 'Use external program to set configuration options' ticked: Martin
You will need to go to 'Build' menu, select 'Compiler options', then click on the 'Programmer tab'.
Make sure you have 'Use external program to set configuration options' ticked: Martin
Martin
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John,
Take a look at the Compiler options, Tab "Programmer". Is the tick next to "Use external program to set configuration options" set? And does the Location just below it point to PPPv3.exe? If not set and change location to "C:\Program Files (x86)\Flowcode\v5\Tools\PPP\PPPv3.exe" (Or C:\Program Files\Flowcode\v5\Tools\PPP\PPPv3.exe for 32 bit versions of Windows)
Jac
(Edit: Martin beat me to it)
Take a look at the Compiler options, Tab "Programmer". Is the tick next to "Use external program to set configuration options" set? And does the Location just below it point to PPPv3.exe? If not set and change location to "C:\Program Files (x86)\Flowcode\v5\Tools\PPP\PPPv3.exe" (Or C:\Program Files\Flowcode\v5\Tools\PPP\PPPv3.exe for 32 bit versions of Windows)
Jac
(Edit: Martin beat me to it)
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks guys, sorted that out after I had sent the post. Checked Jac suggestions and all is correct there. Still no joy.
I have attached a grab of my chip configuration settings for you to check. Most probably screwed something up here.
Appreciate your guys help Thanks again - John
I have attached a grab of my chip configuration settings for you to check. Most probably screwed something up here.
Appreciate your guys help Thanks again - John
- Attachments
-
- 12F683 CHIP CONFIG SETTINGS.jpg
- (205.43 KiB) Downloaded 4481 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: ICSP 12F683 Not Working
Try setting Watchdog Timer to Off. Also disable Brown Out Detect.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks for that. Tried it but did not work.
I'm curious to know why FLOWCODE5 keeps saying it has compiled to the chip OK but when I check using the PICKIT2 software there appears to be nothing??
OK, so what I have done now is attached screen grabs of all my settings in the hope you guys will spot what has gone wrong.
Thanks very much for all your help so far. John
I'm curious to know why FLOWCODE5 keeps saying it has compiled to the chip OK but when I check using the PICKIT2 software there appears to be nothing??
OK, so what I have done now is attached screen grabs of all my settings in the hope you guys will spot what has gone wrong.
Thanks very much for all your help so far. John
- Attachments
-
- 12F683 Programmer Settings.jpg
- (201.91 KiB) Downloaded 4462 times
-
- 12F683 Compiler Opt.jpg
- (192.4 KiB) Downloaded 4462 times
-
- 12F683 CHIP Config 2.jpg
- (202.82 KiB) Downloaded 4462 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ICSP 12F683 Not Working
Hello,
Your middle picture shows the problem. The compiler is set to call the PICkit executable. That is certainly not right.
First of all reset to the defaults and this should allow you to compile to hex correctly. Once you have this working you can start worrying about the PICkit settings in the "Programmer" tab.
Your middle picture shows the problem. The compiler is set to call the PICkit executable. That is certainly not right.
First of all reset to the defaults and this should allow you to compile to hex correctly. Once you have this working you can start worrying about the PICkit settings in the "Programmer" tab.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks for your help Benj.
I've reset the compiler settings to default and provided a screen grab of the compiler settings now. I have also attached a screen grab of the programmer settings as they are at the moment for you to check.
Really appreciate your input. John
I've reset the compiler settings to default and provided a screen grab of the compiler settings now. I have also attached a screen grab of the programmer settings as they are at the moment for you to check.
Really appreciate your input. John
- Attachments
-
- 12F683 Programmer settings 2.jpg
- (202.79 KiB) Downloaded 4454 times
-
- 12F683 Compiler Settings 2.jpg
- (41.13 KiB) Downloaded 4454 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: ICSP 12F683 Not Working
John,
Looks right, now you need to change the settings in the programmer tab (and only in that tab) to the ones used for PICkit.
Regards,
Jac
Looks right, now you need to change the settings in the programmer tab (and only in that tab) to the ones used for PICkit.
Regards,
Jac
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Thanks, there is some progress. I managed to program the chip after making the changes Benj suggested. Only thing is I used the PICKIT2 software and it works!!
I'll check out the programmer settings as suggested by Jac and report back. Thanks guys - John
I'll check out the programmer settings as suggested by Jac and report back. Thanks guys - John
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
OK, now I'm getting messages that theres a problem with the cable and the USB device is not seen? I checked the communication using the PICkit2 software and all seems to be OK?
Ive attached screen grabs so you guys can check it all out. Man this is becomming harder and harder. Hopefully nearly there.
Thanks a lot guys...John
Ive attached screen grabs so you guys can check it all out. Man this is becomming harder and harder. Hopefully nearly there.
Thanks a lot guys...John
- Attachments
-
- 12F683 USB Cable error message.jpg
- (119.3 KiB) Downloaded 4441 times
-
- 12F683 Settings 3.jpg
- (75.93 KiB) Downloaded 4441 times
-
- 12F683 Chip Settings 3.jpg
- (68.15 KiB) Downloaded 4441 times
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Here is a screen grab of the message I get when using FLOWCODE5 Compile to chip but still nothing happens.
Could somebody explain to me why after this message the chip is not programmed to work with the simulation?? When I push the compile to chip button I can see the TARGET light on the Programmer come on and the BUSY red light flickers for a brief period. Hope that means something.
Oh, the problem with the cable and not recognised USB device seems to have gone away. Dont know how or why. The only thing I did do was enabled the Boran etc in the chip configuration part.
Thanks a lot, really appreciate your time and patience- John
Could somebody explain to me why after this message the chip is not programmed to work with the simulation?? When I push the compile to chip button I can see the TARGET light on the Programmer come on and the BUSY red light flickers for a brief period. Hope that means something.
Oh, the problem with the cable and not recognised USB device seems to have gone away. Dont know how or why. The only thing I did do was enabled the Boran etc in the chip configuration part.
Thanks a lot, really appreciate your time and patience- John
- Attachments
-
- COMPILE TO CHIP MESSAGE.jpg
- (51.4 KiB) Downloaded 4420 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John,
from your screenshot it looks like Chip has been successfully programmed.
Out of curiosity, does LED light if you remove read lead from RA2 and connect it directly to + 5V?
Also can you measure any voltage present between RA2 and 0V?
from your screenshot it looks like Chip has been successfully programmed.
Out of curiosity, does LED light if you remove read lead from RA2 and connect it directly to + 5V?
Also can you measure any voltage present between RA2 and 0V?
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
Hi,
RA2 (PIN5) has 2.8V pk-pk on it. The only time this goes up to about 4.2V is when I open up the PICkit2 software and tick the Vdd box. The program then runs and the LED flashes. but not in sync with FOWCODE5.
Not sure what you mean by "disconnect the read lead!". I've got the PICkit2 programmer connected to a low pin count board so I can only disconnect the whole programmer. (Attached photo)If you could tell me which is the "read lead/pin" I could scope it for you and see what happens if that helps at all?
Dont know if this helps you at all, but there is also no voltage at pin 1?
Have also attached a screen grab of the chip configuration settings.......just incase.
Thanks for your help -John
RA2 (PIN5) has 2.8V pk-pk on it. The only time this goes up to about 4.2V is when I open up the PICkit2 software and tick the Vdd box. The program then runs and the LED flashes. but not in sync with FOWCODE5.
Not sure what you mean by "disconnect the read lead!". I've got the PICkit2 programmer connected to a low pin count board so I can only disconnect the whole programmer. (Attached photo)If you could tell me which is the "read lead/pin" I could scope it for you and see what happens if that helps at all?
Dont know if this helps you at all, but there is also no voltage at pin 1?
Have also attached a screen grab of the chip configuration settings.......just incase.
Thanks for your help -John
- Attachments
-
- 12F683 Chip Settings 4.jpg
- (70.92 KiB) Downloaded 4400 times
-
- PICkit2 & LPC Board Connection 2.JPG
- (203.98 KiB) Downloaded 4401 times
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: ICSP 12F683 Not Working
Hi
from your last post it seems all is well, as with the pickit2 you have to select the vdd on to power the target board, the power light on the pickit is there to let you know the pickit2 is powered , the target light, lights when the vdd is selected on in the software and then provides power to the uc board
Regards
Dazz
from your last post it seems all is well, as with the pickit2 you have to select the vdd on to power the target board, the power light on the pickit is there to let you know the pickit2 is powered , the target light, lights when the vdd is selected on in the software and then provides power to the uc board
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: ICSP 12F683 Not Working
Sorry was a typo, it should had said red lead i,e the lead connected to resistor/LED anode.
It's to prove that LED and +5V are correctly working.
Issues sounds to me that pickit is not configured to power device after programming has finished, which is what Dazz is saying.
I totally agree.
To leave power switched on you will need to use the -T option in Programmer parameters. e.g:
-BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R -T
At least I believe its -T?
Martin
It's to prove that LED and +5V are correctly working.
Issues sounds to me that pickit is not configured to power device after programming has finished, which is what Dazz is saying.
I totally agree.
To leave power switched on you will need to use the -T option in Programmer parameters. e.g:
-BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R -T
At least I believe its -T?
Martin
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
OK Folks, I did the adjustment and it now appears that the program is going into the chip. LED is flashing.
The only thing is it seems to be on its own mission as I cannot control it through the FLOWCODE5 controls for the flowchart. pause, stop etc.
Man I appreciate your guys help, any ideas on this one??? John
The only thing is it seems to be on its own mission as I cannot control it through the FLOWCODE5 controls for the flowchart. pause, stop etc.
Man I appreciate your guys help, any ideas on this one??? John
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: ICSP 12F683 Not Working
Hi John,
The flowcode controls only work with Flowkit and EB006 newer versions (for 8 bit PIC). PICkit is not supported for on chip debugging.
Jac
The flowcode controls only work with Flowkit and EB006 newer versions (for 8 bit PIC). PICkit is not supported for on chip debugging.
Jac
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: ICSP 12F683 Not Working
OK,thanks for that guys. Can live with that for now.
I think I'll play around for a while after all that and see what happens.
A HUGE THANKS YOU to all those very patient members of this forum.
Thanks a lot - John
I think I'll play around for a while after all that and see what happens.
A HUGE THANKS YOU to all those very patient members of this forum.
Thanks a lot - John