cmitcham New Member
 member is offline
Joined: Sept 2011 Gender: Male  Posts: 5 Karma: 0 |  | programming with mplab « Thread Started on Sept 30, 2011, 5:02am » | |
hi paul:
my pieces arrived today, but when i make a project in mplab and "build all", i see the following error:
Release build of project `C:\Users\Calvin\mplab\diydecoder\functiondecoder.mcp' started. Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37 Fri Sep 30 00:41:59 2011 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F630 "C:\Users\Calvin\Documents\diy decoder\629mf.asm" /l"629mf.lst" /e"629mf.err" /o"629mf.o" Warning[215] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 119 : Processor superseded by command line. Verify processor symbol. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 464 : Register in operand not in bank 0. Ensure that bank bits are correct. Warning[219] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 499 : Invalid RAM location specified. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 499 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 518 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1250 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1251 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1253 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1255 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1256 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1258 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1267 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1268 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1269 : Register in operand not in bank 0. Ensure that bank bits are correct. Warning[219] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1603 : Invalid RAM location specified. Warning[219] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1614 : Invalid RAM location specified. Warning[219] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 1933 : Invalid RAM location specified. Warning[219] C:\USERS\CALVIN\DOCUMENTS\DIY DECODER\629MF.ASM 2046 : Invalid RAM location specified. Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\mplink.exe" /p16F630 "629mf.o" /z__MPLAB_BUILD=1 /o"functiondecoder.cof" /M"functiondecoder.map" /W MPLINK 4.37, Linker Copyright (c) 1998-2010 Microchip Technology Inc. Error - section '.cinit' can not fit the section. Section '.cinit' length=0x00000004 Errors : 1
Link step failed. ---------------------------------------------------------------------- Release build of project `C:\Users\Calvin\mplab\diydecoder\functiondecoder.mcp' failed. Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37 Fri Sep 30 00:42:00 2011 ---------------------------------------------------------------------- BUILD FAILED
it has been a couple years since i created a mplab project, am i forgetting something?
i am able to just import the hex file you provide, and it seems to write to the pic ok, but when i ask for verification, is says something failed, shown below:
Erasing Target PIC16F630 found (Rev 0x7) PICkit 2 Ready
Blank Checking PIC16F630 found (Rev 0x7) Blank Checking Program Memory Blank Checking EEPROM Memory Blank Checking User ID Memory Blank Checking Configuration Memory PICkit 2 Ready
Programming Target (9/30/2011 12:58:07 AM) PIC16F630 found (Rev 0x7) Erasing Target Programming Program Memory (0x0 - 0x3FD) Verifying Program Memory (0x0 - 0x3FD) Programming User ID Memory Verifying User ID Memory Programming Configuration Memory Verifying Configuration Memory PICkit 2 Ready
Verifying Target PIC16F630 found (Rev 0x7) Verifying Program Memory (0x0 - 0x3FF) Verifying EEPROM Memory (0x0 - 0x7F) PK2Error0027: Failed verify (Address = 0x0 - Expected Value 0xFF - Value Read 0x1) PICkit 2 Ready
thanks for any ideas.
| |
|
murphyfp New Member
 member is offline
Joined: Aug 2011 Gender: Male  Posts: 8 Karma: 1 |  | Re: programming with mplab « Reply #1 on Sept 30, 2011, 8:41am » | |
Hello cmitcham I have used Mplab ver 6.50 and I get the same reports that you have had. But writing the Hex file to the Pic 12F629 seems to work OK. I have built a board up with Vero Board and hung some Leds on the outputs. The firmware I used was v2.18 I intend to use it in some coaches Rear Fred Lamp at each end and internal coach lights. I also intend to cut out a lot of the code that I do not require. eg Long Addressing and unused functions. The Not in Bank 0 comments seem to normal you get them if you try the Mplab example program. Hope this gives you some help
| |
|
Paul Harman Administrator
     member is offline
![[msn] [msn]](http://images.proboards.com/msn.gif)
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: Feb 2010 Posts: 107 Location: HQ Karma: 6 |  | Re: programming with mplab « Reply #2 on Sept 30, 2011, 1:14pm » | |
The verify error is nothing to worry about, it is a verify error on the EEPROM because the PIC is powered up in the programmer (turn off the power in the programmer panel!).
When initially powered up the PIC will write the default values to the EEPROM, and it is doing this before the verify is done.
I am not sure what the problem is with the linker, I have seen it before and it is a setting somewhere in MPlab that varies where MPlab puts the code, and since space is tight you have to be careful to make sure all the code fits in OK. You will probably not see the problem if you use an older version of MPlab (V5.x) which appears to have a different default.
|
Paul |
|
cmitcham New Member
 member is offline
Joined: Sept 2011 Gender: Male  Posts: 5 Karma: 0 |  | Re: programming with mplab « Reply #3 on Sept 30, 2011, 6:39pm » | |
thanks both of you, i should be lighting leds on the breadboard tonight.
paul, the only choices i noticed were writing "relocatable" or "absolute" code, and i tried both with the same result.
i intend to study your code, and bother you with questions, and finally really learn to do something usefull with a pic. i have mastered all the web tutorials that use a pic to flip a switch and turn on a led 
... and i really should send you some money, is that how to get the enhanced firmware? and do we get .asm for that too, or just hex? please pm me with details.
thanks again.
| |
|
Paul Harman Administrator
     member is offline
![[msn] [msn]](http://images.proboards.com/msn.gif)
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: Feb 2010 Posts: 107 Location: HQ Karma: 6 |  | Re: programming with mplab « Reply #4 on Sept 30, 2011, 9:25pm » | |
I will have to have a play with MPlab and see what is happening. I am sure that it was selecting 'Absolute' that fixed the problem I had, so maybe you are seeing a different problem. You might find that not using 'Build all' and just assembling the basic parts (it is a relatively simple project) will avoid what is causing the error until you can get your MPlab configured. I have mine configured so that if I make changes I can just save and it assembles and programs all in a click, so you should be able to get it working.
The enhanced firmware is only available in a preprogrammed PIC since it contains my proprietry code, therefore there is no source or hex available.
|
Paul |
|
cmitcham New Member
 member is offline
Joined: Sept 2011 Gender: Male  Posts: 5 Karma: 0 |  | Re: programming with mplab « Reply #5 on Oct 1, 2011, 5:14am » | |
i have leds on my breadboard that i can turn on and off with my throttle. i am pretty excited. thanks very much paul!
edit - the schematic shows r13 between pins 4 and 11 of the pic, but it isn't shown on the stripboard component layout. is it needed?
edit2 - finally, i have read the pdf manual and see that r13 is the very expensive 0 ohm resister, so i'm all set.
 Please login to download attachments. | |
|
Paul Harman Administrator
     member is offline
![[msn] [msn]](http://images.proboards.com/msn.gif)
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: Feb 2010 Posts: 107 Location: HQ Karma: 6 |  | Re: programming with mplab « Reply #6 on Oct 1, 2011, 2:54pm » | |
Nice to see a breadboarded version.
You only need R13 to be a higher value if you have soldered in the PIC and want to program the PIC in circuit with new firmware. Really only relevent if you make a surface mount version.
|
Paul |
|