Compiler not creating .hex files for programmer.


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    May 2009
    Posts
    6

    Default Compiler not creating .hex files for programmer.

    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?

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink

    Hi,

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

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    May 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    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

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Lightbulb ???

    Hi,

    Code:
    :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
    Last edited by Acetronics2; - 8th May 2009 at 12:58.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    May 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by Teknikum; - 12th May 2009 at 07:20.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by Acetronics2; - 12th May 2009 at 09:03.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    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.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8
    Join Date
    May 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    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!

  9. #9
    Join Date
    May 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Still no improvements, no HEX file is being created and the reset button is still not functional.



    EDIT: Problem solved.
    Last edited by Teknikum; - 14th May 2009 at 13:06.

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Question

    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
    Last edited by Acetronics2; - 14th May 2009 at 13:18. Reason: Arrrghhhh, ons second later : which was the problem ???
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Jan 2009
    Posts
    78


    Did you find this post helpful? Yes | No

    Default setting up the software


  12. #12
    Join Date
    May 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    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

Similar Threads

  1. Creating your own .inc files
    By mjphillips1981 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th May 2009, 12:46

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts