What have I done now?


Closed Thread
Results 1 to 20 of 20
  1. #1
    Join Date
    Sep 2007
    Posts
    59

    Default What have I done now?

    So I use one pic (18F6520) on one board and I use Microcode Studio Plus 3.0.0.5, PB Pro Compiler 2.50 and a MELabs usb programmer.

    I set all this up about 2 yrs ago and haven't changed the set up at all. I regularly change the firmware, load it, run it and don't give it much thought.

    Until today...

    I grabbed a board to load a program onto and everything indicates that it loaded fine but it doesn't work. I was loading a known program so that wasn't the issue. I regularly load this program to work with. I tried several other programs same problem.

    I finally went back to several known hex files that weren't compiled by Microcode Studio recently (but were compiled by it in the past) and they loaded fine. There are no known changes, to me, so I'm completely stymied.

    I also tried to just compile the program and then open it from my programmer.

    If you haven't guessed by now, I'm not a professionally trained programmer so I know just enough to be dangerous.

    Any help is hugely appreciated.

    Thank you,

  2. #2
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default more digging.

    I've been trying to narrow this down a bit further. I have 2 programmers from MELabs. A usb powered one and a older db9 one. I dusted off the older one to rule out the hardware. It functioned the same as the newer usb programmer.

    I found a hex file that I compiled a couple weeks ago and it loads and runs fine on the board. However, the same program now compiles with no errors and it says that it successfully loads, but then nothing.

    I can reload the other hex file and wall-ah, back in business. So I'm thinking this is a configuration issue but can't find anything that looks out of place. I pretty much only use this computer for programming and pcb layouts and haven't used it since the last time and it worked.

    Thoughts on where to start poking?

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


    Did you find this post helpful? Yes | No

    Default

    Does it work on 16f chips ? My JDM won't do 18F chips, that's why I bought PICKIT2.
    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.

  4. #4
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default

    I don't know about 16F chips. I only have/use the 18f6520 chip. I went back and double checked my .inc folder to make sure it's settings were the same.

    The odd thing is I can program a hex file that I compiled 2 weeks ago onto a board and it works fine. I'm pulling the hex file straight from the folder using the MELabs Programmer software. But if I then try to compile and program the same program through the PBP and MicroCode Studio Plus (which I used two weeks ago), it compiles with no errors, and programs with no errors but the code doesn't run???

    I can turn around and reload the other program onto the same board and it's fine???

    I'm not sure what changed over the last two weeks. I even quized the 5 year old as to whether he "played" on Daddy's computer which he said no and I believe him. No jelly on the keys.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Hylan View Post
    I can turn around and reload the other program onto the same board and it's fine???
    By any chance, did one of those 'updates' include updates to PBP?

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


    Did you find this post helpful? Yes | No

    Default

    So when you program and it does not work, can you read back the hex from the chip and see the information ? How do you select the programmer when you load an old hex? Is that the same way as you load a new hex? Are you sure your programmer is using the correct COM port when called by MCS ? Same programming software in both instances ? Have you tried saving the new hex and then loading it the same way as the old hex? I am just throwing out some troubleshooting ideas, no answer required.
    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.

  7. #7
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Still slogging along

    I'm still fighting with this issue and here's where I'm at.

    I uninstalled everything PBP, MPASM, Micro Code Studio Plus and several other IDE's I had loaded a long time ago before getting this thing to work (with much help from everyone here on the forum). And life was good up until a week or so ago!

    I then reinstalled everything today and finally got the settings worked out on the programmer. So I'm sort of back to square one and looking for ideas. I can load hex files that I created literally 3 weeks ago fine. However, when I try to recompile the pbp file, nothing!

    Now when I say nothing, I mean nothing from the board with the chip. The system says that it assembles and compiles fine with no errors. Then it erases the chip, programs and verify's the load and says it programmed successfully, but does nothing.

    So, to summarize. Hex file created weeks ago from a pbp file loads and works fine on chip. Exact same pbp file now, assembles, compiles and loads with no errors, but is like it's not on the chip at all. Hmmm???

    The one thing I was looking at on the MELabs site: http://www.melabs.com/support/mpasm.htm
    was under the xp section trying to figure out what all should be in this path block? What different things should this be point to? Just to Mpasm location, or should it be pointing to other stuff too? Mine was pointing at a whole lot of nothing, so I did at least point it at the folder where Mpasm.exe is located, but that's it right now. And no change to what I posted above.

    I'm grabbing at straws here, has anyone else experienced anything like this?

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Upload a working hex and a non working hex compiled/assembled from the same code so we can take a look at it. we can ckeck the fuse settings from there.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Hex file samples

    Here is a working and non working hex file samples from the same code. Rename file extension to .hex

    There is a noticable difference in size of the files. Also, I noticed that on the drop down on the IDC Compile button I've got a couple choices listed:
    Picbasic Pro 2.50
    Picbasic Pro 2.50B
    Picbasic Pro 2.50L

    Originally I had two listed, 2.50 and 2.50L and the 2.50L was checked. So I tried checking the 2.50 just to see what would happen and then the 2.50B appeared. I don't know what the differences in these are but thought I'd throw it out there.
    Attached Files Attached Files

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    For what it is worth, The config bits are the same between the two. I have not had time to look any farther yet.
    Dave
    Always wear safety glasses while programming.

  11. #11
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    The notworking file has 17176 bytes, the working file has 5590 bytes.
    Are you sure about compiling the same program? Doesn't look like it to me...
    If the 17176 file was compiled with PBPL, that might make sense since PBPL uses all 32 bit math whereas PBP doesn't.

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


    Did you find this post helpful? Yes | No

    Question

    Hi, Hylan

    any chance you post here your source code ???

    just us to try to reproduce the probem ...

    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 " !!!
    *****************************************

  13. #13
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    I am a bit confused between your first post and the subsequent one. You indicate that the setup is 2 years old and a 2 week old compile works. IIRC, PBP2.50 is of recent vintage. Is it possible you compiled the working file with another version of PBP prior to 2.50? Is that version still available with you so you can backtrack and rule out the compiler change causing this issue? I would like to look at the listing to see if there's something broken here. If you feel insecure posting your code on the forum, you can PM it to me. Cant promise much, but I am willing to help

    PS: after loading both files, I can say that you haven't embedded the configuration into your source code. So, you are possibly setting the oscillator wrong. HS instead of XT or otherwise
    Last edited by Jerson; - 18th December 2008 at 18:03. Reason: PS added

  14. #14
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default

    Okay, so I looked and it's been less than 2 years. Maybe 2 dog years! I have been using the same version 2.50 the whole time and the same pic 18f6520.
    I did look and the use PBPL box was checked in response to Skimask's post. I assembled and compiled with it checked and unchecked and got the same result (nothing).
    Attached is the source code.
    Is there anything with the path setting under the environmental variables that needs to be set? What all should be in there?
    The only thing I have in there now is a pointer to the MPASM, nothing else.
    Thank you,
    Hylan
    Last edited by Hylan; - 18th December 2008 at 21:55.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Hylan,
    I compiled the source code you posted and got exactly what you posted as working and could not duplicate the nonworking code regardless of how I set my assembler or compiler options. Perhaps your mpasm got corrupted somehow, Maybe a fresh download is in order.
    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.

  16. #16
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default

    Joe,
    I appreciate it! Can you tell me your settings under your Compile and Program Options?
    And any other settings that might be impacting this.
    I will unload and reload MPASM and see what happens.
    Once I reload MPASM are there any setting changes I need to make there?
    Thank you,
    Hylan

  17. #17
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    I hope it's this easy for you Hylan. Somehow the on screen compile buttons got mixed up on the new version. While I thought I was hitting the compile button, I was hitting the ICD compile button! Thus, bloated code and no workie! I feel kind of stupid, but it is all working fine now!
    Let me know,
    Ron

  18. #18
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Red face Doh!!!

    Me thinks I might have done the same thing!

    So my story is that there was an auto update that moved the button location and I didn't notice!

    My wife thinks I'm an idiot savant but we haven't figured out what I'm good at yet! I'm starting to think she's right...

    Thank you to everyone for your time. I learned a lot!
    Hylan

  19. #19
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Hylan View Post
    Me thinks I might have done the same thing!

    So my story is that there was an auto update that moved the button location and I didn't notice!

    My wife thinks I'm an idiot savant but we haven't figured out what I'm good at yet! I'm starting to think she's right...

    Thank you to everyone for your time. I learned a lot!
    Hylan
    Everyone make mistakes.

    See my signature line...That is ...experience talking.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Hylan View Post
    Me thinks I might have done the same thing!

    So my story is that there was an auto update that moved the button location and I didn't notice!

    My wife thinks I'm an idiot savant but we haven't figured out what I'm good at yet! I'm starting to think she's right...

    Thank you to everyone for your time. I learned a lot!
    Hylan
    Yup! that's exactly what happened, I had to upgrade MCS on this computer to check and the hex exactly matches as compiled using PBL . Great, problem solved. Never call yourself names, too many others, wives, inlaws . . available to do that for you
    Quote Originally Posted by Hylan View Post
    My wife thinks I'm an idiot savant but we haven't figured out what I'm good at yet!
    Hylan
    If you're like me then you are good at keeping her entertained.
    Last edited by Archangel; - 18th December 2008 at 23:42.
    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.

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