PDA

View Full Version : ASM to HEX conversion problem



dvc2013
06-06-2013, 10:19 AM
Maybe one of you guys can help.

I have 2 questions regarding PIC programming. First off I smoked the PIC chips on 2 of my Ren-c's. I was able to copy the hex file from my spare chip and program the new chips without any problems which raises my 2 questions.

First how can I tell which firmware version I have ???

Second, when I download the 20090506.asm that Phil released a couple of years ago I can't get a hex file generated from MPASMWIN. I can generate a hex for any other Renard software except for the Ren-C. I keep getting the following error,

C:\FIRMWARE\RENARD-595-192-20090506.ASM 90 : Symbol not previously defined (_DATA_CP_OFF)

Any clue what the problem could be ???
It seems to apply to all versions of the Ren-C asm files since all 3 generate the same error and I don't get a hex file generated. I watched Wayne's excellent video for about the 50th time thinking I was missing something. I went step by step through the video and since I can generate the hex file from other asm's I must be missing something. And I did set the chip type to 16F627A so I'm not sure what else I am missing.

Anybody have any thoughts or suggestions ??? Thanks for any help you can give me.

P. Short
06-06-2013, 01:26 PM
From time to time Microchip makes incompatible changes in their .inc files, it has happened before.

Try changing the '_DATA_CP_OFF' in line 90 to '_CPD_OFF', that fixed the problem in the version of MPLABX that I'm using.

Edit: the exact line number for this change may be different for other versions of the source file.

dvc2013
06-06-2013, 02:42 PM
Thanks Phil.

I'll try it tonight when I get home and let you the result. Maybe the info will help someone else in the future.

dvc2013
06-06-2013, 06:48 PM
Phil,

As usual you are right on the money. I'm using MPASM v5.49 and I made the change and Presto, I have a hex file So I re-flashed my spare 16F627A and all is well. Actually things are better as some random flashing has stopped. I also changed the "NULLED_CELLS" definition to 1 and I can now dim all the way down about 2 or 3 instead of everything turning off at 18.

Thanks for the help.