pic16f1827 Send to ic Error
Moderator: Benj
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
pic16f1827 Send to ic Error
Hi I try to program a PIC16F1827 but it does not work
I use Flowcode 4.3.7.63 / PPPv3 ver 3.9.12.26 / and EB-006-00-6 board
I start Flowcode and select PIC16F1827 and write a simpel led flash program to port B0.
In IC - Konfiguration - switch to Expert config screen When I compile the IC I get the following message and nothing happened at IC?
(( there are no problems when I send the program to a pic16f88 ))
Hope someone can help Regards Frank
'''''''''''''''''''''''''''''
File name: C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c
Generated by: Flowcode v4.3.7.63
Date: Wednesday, February 23, 2011 12:16:00
Licence: Professional
Registered to: Biologisk Institut
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F1827 "testmid.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
testmid.c
Starting preprocessor: "C:\PROGRA~1\Matrix Multimedia\Flowcode V4\BoostC\pp.exe" "C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c" -i "C:\PROGRA~1\Matrix Multimedia\Flowcode V4\BoostC\include" -d _PIC16F1827 -la -c2 -o "C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.pp" -v -d _BOOSTC -d _PIC16
..............
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:2): error: unknown identifier 'ansela'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:2): error: invalid operand 'ansela'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:9): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:1): error: unknown identifier 'anselb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:1): error: invalid operand 'anselb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:2): error: unknown identifier 'option_reg'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:2): error: invalid operand 'option_reg'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:13): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:2): error: unknown identifier 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:2): error: invalid operand 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: unknown identifier 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: invalid operand 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: error in the body of 'if' expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:2): error: unknown identifier 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:2): error: invalid operand 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: unknown identifier 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: invalid operand 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: error in the body of 'if' expression
testmid.c success
failure
Return code = 1
Flowcode var ude i stand til at kompilere flowchart's C kode pågrund af følgende fejl:
If dit flowchart indeholder C kode, review det nøje. Hvis dit flowchart ikke indeholder C-kode og du virkelig har reviewed koden, kontakt Teknisk
FINISHED
I use Flowcode 4.3.7.63 / PPPv3 ver 3.9.12.26 / and EB-006-00-6 board
I start Flowcode and select PIC16F1827 and write a simpel led flash program to port B0.
In IC - Konfiguration - switch to Expert config screen When I compile the IC I get the following message and nothing happened at IC?
(( there are no problems when I send the program to a pic16f88 ))
Hope someone can help Regards Frank
'''''''''''''''''''''''''''''
File name: C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c
Generated by: Flowcode v4.3.7.63
Date: Wednesday, February 23, 2011 12:16:00
Licence: Professional
Registered to: Biologisk Institut
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F1827 "testmid.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
testmid.c
Starting preprocessor: "C:\PROGRA~1\Matrix Multimedia\Flowcode V4\BoostC\pp.exe" "C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c" -i "C:\PROGRA~1\Matrix Multimedia\Flowcode V4\BoostC\include" -d _PIC16F1827 -la -c2 -o "C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.pp" -v -d _BOOSTC -d _PIC16
..............
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:2): error: unknown identifier 'ansela'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:2): error: invalid operand 'ansela'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(85:9): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:1): error: unknown identifier 'anselb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:1): error: invalid operand 'anselb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(86:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:2): error: unknown identifier 'option_reg'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:2): error: invalid operand 'option_reg'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(90:13): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:2): error: unknown identifier 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:2): error: invalid operand 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(99:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: unknown identifier 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: invalid operand 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(101:2): error: error in the body of 'if' expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:2): error: unknown identifier 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:2): error: invalid operand 'trisb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(113:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: unknown identifier 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: invalid operand 'portb'
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:8): error: failed to generate expression
C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c(115:2): error: error in the body of 'if' expression
testmid.c success
failure
Return code = 1
Flowcode var ude i stand til at kompilere flowchart's C kode pågrund af følgende fejl:
If dit flowchart indeholder C kode, review det nøje. Hvis dit flowchart ikke indeholder C-kode og du virkelig har reviewed koden, kontakt Teknisk
FINISHED
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: pic16f1827 Send to ic Error
Hi frankmortensen
When you get the message:
The code will have not been sent to chip.
For 16F1827 you will need to set flowcode up for the hi-tec compiler. See:
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
If left on boost C you will get
unknown identifier
and
invalid operand errors.
Aslo you will need to disable Watchdog timer, low voltage programming. Also you will need set configuration for the crystal you are using
Are you using EB006?
If you can let me know about your hardware and if using internal/external crystal etc. , I can paste an image of what config should look like.
When you get the message:
Code: Select all
failure
Return code = 1For 16F1827 you will need to set flowcode up for the hi-tec compiler. See:
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
If left on boost C you will get
unknown identifier
and
invalid operand errors.
Aslo you will need to disable Watchdog timer, low voltage programming. Also you will need set configuration for the crystal you are using
Are you using EB006?
If you can let me know about your hardware and if using internal/external crystal etc. , I can paste an image of what config should look like.
Martin
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
Re: pic16f1827 Send to ic Error
hello and thanks for the reply
I installed the hitech compiler
And yes I use EB006
I set it to XTAL and fast on the board
And when I compil now File name: C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c
Generated by: Flowcode v4.3.7.63
Date: Wednesday, February 23, 2011 13:36:39
Licence: Professional
Registered to: Biologisk Institut
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\HI-TECH Software\PICC\9.81\bin\picc.exe --CHIP=16F1827 -N48 testmid.c
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h: 57: (1090) variable "_FCI_TMP_STR" is not used (warning)
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h: 58: (1090) variable "_FCI_TMP_INT" is not used (warning)
HI-TECH C Compiler for PIC10/12/16 MCUs (PRO Mode) V9.81
Copyright (C) 2010 Microchip Technology Inc.
Licensed for evaluation purposes only.
This licence will expire on Wed, 13 Apr 2011.
Memory Summary:
Program space used 46h ( 70) of 1000h words ( 1.7%)
Data space used 7h ( 7) of 180h bytes ( 1.8%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
Return code = 0
Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe
Return code = 0
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F1827 -nogui "testmid.hex"
Sending program...
Erasing the PICmicro
NOTE: EEPROM data will also be erased!
Writing program memory
Writing configuration memory
Programming failed: <config2>
That took 1,891 seconds
Return code = 0
FINISHED
I installed the hitech compiler
And yes I use EB006
I set it to XTAL and fast on the board
And when I compil now File name: C:\Documents and Settings\frank\My Documents\My Dropbox\flowcode\Programmer\servostyrring\1servo\testmid.c
Generated by: Flowcode v4.3.7.63
Date: Wednesday, February 23, 2011 13:36:39
Licence: Professional
Registered to: Biologisk Institut
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\HI-TECH Software\PICC\9.81\bin\picc.exe --CHIP=16F1827 -N48 testmid.c
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h: 57: (1090) variable "_FCI_TMP_STR" is not used (warning)
C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h: 58: (1090) variable "_FCI_TMP_INT" is not used (warning)
HI-TECH C Compiler for PIC10/12/16 MCUs (PRO Mode) V9.81
Copyright (C) 2010 Microchip Technology Inc.
Licensed for evaluation purposes only.
This licence will expire on Wed, 13 Apr 2011.
Memory Summary:
Program space used 46h ( 70) of 1000h words ( 1.7%)
Data space used 7h ( 7) of 180h bytes ( 1.8%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
Return code = 0
Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe
Return code = 0
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F1827 -nogui "testmid.hex"
Sending program...
Erasing the PICmicro
NOTE: EEPROM data will also be erased!
Writing program memory
Writing configuration memory
Programming failed: <config2>
That took 1,891 seconds
Return code = 0
FINISHED
-
jgu1
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
Re: pic16f1827 Send to ic Error
Hej Frank, tror jeg det må være!
Prøv lige i "Expert Config" og disable Brown out.
Jørgen
Prøv lige i "Expert Config" og disable Brown out.
Jørgen
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: pic16f1827 Send to ic Error
As for programming side.
Take a look here:
http://www.matrixmultimedia.com/mmforum ... f=2&t=8069
Fix might work for you, but unfortunately did not work for me.
If you have PICkit3 or ASIX Presto programmers then they will Program chip via ISCP on EB006 board.
16F1827 is listed In supported devices for PICkit 2, but I could not get it to work, but going to give it another try later today.
If you are programming via an eternal programmer, then don't forget to move jumper from USB to ICD2.
See
http://www.matrixmultimedia.com/datashe ... 6-30-7.pdf
For the details.
Warning 16F1827 only use 9V on VPP. What I did with ASIX programmer was place a 330R in series with VPP lead (slightly higher than suggested value) Which programs chip successfully every time.
Take a look here:
http://www.matrixmultimedia.com/mmforum ... f=2&t=8069
Fix might work for you, but unfortunately did not work for me.
If you have PICkit3 or ASIX Presto programmers then they will Program chip via ISCP on EB006 board.
16F1827 is listed In supported devices for PICkit 2, but I could not get it to work, but going to give it another try later today.
If you are programming via an eternal programmer, then don't forget to move jumper from USB to ICD2.
See
http://www.matrixmultimedia.com/datashe ... 6-30-7.pdf
For the details.
Warning 16F1827 only use 9V on VPP. What I did with ASIX programmer was place a 330R in series with VPP lead (slightly higher than suggested value) Which programs chip successfully every time.
Martin
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
Re: pic16f1827 Send to ic Error
Yes Yes I got it working
I installed hiteck compileren and replaced teh file form last link.
thanks guys
thanks guys
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: pic16f1827 Send to ic Error
That's great!frankmortensen wrote:Yes Yes I got it working I installed hiteck compileren and replaced teh file form last link.
thanks guys
Love the picture!
Glad you've got it working.
Thanks for letting us know.
Martin
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
Re: pic16f1827 Send to ic Error
yes it was great
but now I've got another problem
the processor running too fast or something
When I set up at led flasher and set a delay 1 sek so on time should be 1 sek the on time in realtime is about 275 mSek
but I have not tried to solve the problem myself yet
so I return if I do not solve it tomorrow
but now I've got another problem
the processor running too fast or something
When I set up at led flasher and set a delay 1 sek so on time should be 1 sek the on time in realtime is about 275 mSek
but I have not tried to solve the problem myself yet
so I return if I do not solve it tomorrow
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: pic16f1827 Send to ic Error
That is because you have PLL enable ..enabled.frankmortensen wrote: the processor running too fast or something
When I set up at led flasher and set a delay 1 sek so on time should be 1 sek the on time in realtime is about 275 mSek
What that does is multiplies external or internal osc by 4.
So just disable that, and should work OK
Martin
-
frankmortensen
- Posts: 24
- Joined: Wed Feb 17, 2010 12:27 pm
- Location: Danmark Fyn
- Been thanked: 1 time
Re: pic16f1827 Send to ic Error
Yes it with PLL solved the problem thanks
I can tell that I have spent all day trying to figure out a problem
I had trouble controlling a servo motor, so I'd go back to the old pic16f877 which I knew worked with my program
but after I've made all the changes in configuration to program the 16f1827 I could not program 16f877 more
I then made all the settings back to the original but I still could not program 16f877 ????
after 5 hours and a whole lot of back and forth and a lot of profanity, I found out that ver a mistake in my switch to crystal setup on EB006 board
so now it works both with and 16f1827 and 16f877 however I should change the compiler from one to the other.
so it was a whole lot of extra work for a broken switch fault
but I fell down again and I've got the natural color in the head again.
I sit with my arms up and are happy with myself!
and thanks for all your help once again
I can tell that I have spent all day trying to figure out a problem
I had trouble controlling a servo motor, so I'd go back to the old pic16f877 which I knew worked with my program
but after I've made all the changes in configuration to program the 16f1827 I could not program 16f877 more
I then made all the settings back to the original but I still could not program 16f877 ????
after 5 hours and a whole lot of back and forth and a lot of profanity, I found out that ver a mistake in my switch to crystal setup on EB006 board
so now it works both with and 16f1827 and 16f877 however I should change the compiler from one to the other.
so it was a whole lot of extra work for a broken switch fault
but I fell down again and I've got the natural color in the head again.
I sit with my arms up and are happy with myself!
and thanks for all your help once again