PDA

View Full Version : Compiler not creating .hex files for programmer.



Teknikum
- 8th May 2009, 11:35
When I compile the program I've written, the compiler won't create any hex-file which I need to program the processor. The model name is 16F877A version 3.0.0.5 and the programmer is from meLabs version 4.24.
Any ideas?

Acetronics2
- 8th May 2009, 11:38
Hi,

The best Idea here: Post your code, please ...

Alain

Teknikum
- 8th May 2009, 11:41
Ok, here it is.


DEFINE LOADER_USED 1

DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
' Define ADCIN parameters
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
'
adval var byte
'
ADCON1 = %00000010
LOW PORTE.2
PAUSE 500
'
loop: ADCIN 0, adval
LCDOUT $FE, 1
LCDOUT "Value:", DEC adval
PAUSE 500
END

Acetronics2
- 8th May 2009, 12:55
Hi,



:020000040000FA
:04000000B201DA2847
:080008000408A700891009108B
:10001000091083168910091009100F308805831202
:100020002708B21830283A30A100FC30A020333025
:10003000A60044201030A1006830A0204420643085
:100040009F202230A600442028302F200C302F2063
:1000500001302F2006302F20B21427083028321408
:10006000A600321C3E280910033C031C43284320F1
:100070000530A100DC30A020031408003214FE3C3F
:100080000319D5280914321C321089140F30880541
:100090002608F03988048910A60E321844282C301E
:1000A0009F2003140800B31329080319B317053060
:1000B000A8002730A300103069200330A300E830E7
:1000C0006920A30164306920A3010A306920240853
:1000D0007028A2002508A1002408A000B420200850
:1000E000A000A8030319B313290803197A282802CA
:1000F000031808002008031DB313B31B0800303E8B
:10010000D028A000A00DA00D200D3839C1389F00C7
:100110000030A1003230A0201F151F198D28A10129
:100120001E08D528A301A200FF30A207031CA307C5
:10013000031CD5280330A100DF30A0209428A101A2
:10014000E83EA000A109FC30031CA928A007031861
:10015000A628A0076400A10FA6282018AF28A01C7D
:10016000B3280000B3280800A501A4011030A600A0
:10017000210DA40DA50D2208A4022308031C230FA2
:10018000A5020318CA282208A40723080318230F6E
:10019000A5070310A00DA10DA60BB8282008D5288F
:1001A000840031088A00300882008313031383120D
:1001B00064000800831602309F0083120911831621
:1001C000091183120130A300F4308A01932000301A
:1001D0008A018120B800FE308A01052001308A01A1
:1001E000052056308A01052061308A0105206C30D7
:1001F0008A01052075308A01052065308A010520B5
:100200003A308A010520A9013808A400A50104306C
:10021000B000B1018A0153200130A300F4308A01FB
:08022000932063008A011129FB
:00000001FF


so ... it compiles as-is !!! just striking the " compile " button ...

Could you explain what do you want to do and What you do ???

Now, I do not tell you some small things are missing ... but there is no compiling problem ...

Alain

Teknikum
- 12th May 2009, 07:06
It doesn't matter what code I want to compile, I know that my code is 100% correct because we learn directly from the book and we have written about 14 programs that worked before.
But now when we wanted to compile with the MicroCode Studio Plus, it stopped to create .hex-files. Without the .hex files we can't use the Melabs programmer and if we use Microcode Studio Plus as a programmer, the processor won't be able to reset with the resetbutton, that's also one problem.
We checked some other lab-chipsets, we checked voltage and other stuff, but it's all new stuff so..
For example, one program is called "4.1"
These files are saved when I compile it:

4.1.pbp
4.1.asm
4.1.mac
4.1.sym
4.1.lst
4.1.map

but no .hex!

I'm sorry if I can't explain very good, I'm new at this.
Thanks

Acetronics2
- 12th May 2009, 09:01
Hi,

In a first time, to get something usable, you could use MPLAB to generate the Hex file, and then use your programmer alone.

Sure, First thing I would do is re-install Microcode ...

BTW: do You get any Error or Warning messages at compile time ???

Alain

Archangel
- 12th May 2009, 09:06
Sure, First thing I would do is re-install Microcode ...
Alain
Only way I can see that happening is if MCS is set to use MPASM and there is no (working) mpasm of if the path to mpasm is incorrect. So as Alain said . . . or reinstall mpasm.
Oh, and not to forget my manners . . . again . . . Welcome to the forum.

Teknikum
- 12th May 2009, 09:54
Thanks a lot!
I'm going to look into the things you suggested and I noticed some progress already.
I'll return if something bad comes up.

Thank you so much for the good attitude!

Teknikum
- 14th May 2009, 12:20
Still no improvements, no HEX file is being created and the reset button is still not functional.



EDIT: Problem solved.

Acetronics2
- 14th May 2009, 13:16
Hi, Teknikum

Looks strange ... Which is your PBP release ???

By the time, I Turned to MCS + ... compile still Ok, download to my programmer Ok too ...

So :

1) There's no reason for MCS not to create the Hex file ...

except you try to use MPASM and you didn't install MPLAB on your computer. ( cf Joe's answer )


Check: View\ Compile and Program Options\Assembler and verify " use MPASM " is NOT selected.


OR PM Assembler could have been damaged ( ??? ) in the PBP folder ...

Re-install your FULL PBP program, then ...



2) The " reset " button do not belong to MCS ... if there's no Hex file to program, nor hex file in your processor, the " reset " can't show anything visible ...

Now, I Can't help you further ...

Alain

bogdan
- 14th May 2009, 22:02
http://narobo.com/articles/PICBASIC.html

...i`m hope will help

Teknikum
- 15th May 2009, 10:37
Thanks for the help, we have worked it all out now.

By the way, this is a school-account that is made with permission from the teacher since he is worse than we are, we are several students using it so don't get confused if something else comes up.
Thanks