Menu

Problems programming PIC18F67K90

2017-01-12
2017-01-13
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    Hello,
    I've been playing with PIC's for a couple years and never had any issues until recently. With this project I'm using an 18F67K90. The program compiles fine with GCB (no errors or warnings), usually downloads to the microcontroller okay, but doesn't work as expected. I was using a MPLAB PM3 and sometimes got memory errors. I discovered that erasing the memory contents and then verifying the chip as blank would usually stop the memory errors. Later I tried using a PICkit 3 and MPLAB X IDE v3.50. That's when I discovered the possible source of the problem. I get a warning that says my hex file contains code that is located at addresses that don't exist on the PIC18F67K90. I'm thinking maybe the chip data file isn't quite right. Has anyone else had issues like this?

     
  • Anobium

    Anobium - 2017-01-12

    Need the version of GCB? as this is critical to answering this question.

     
  • Anobium

    Anobium - 2017-01-12

    Plus, we are fixing a very similar issue at the moment with respect to another chip but your version of GCB will help me.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    Oops, sorry. I tried with versions 0.94 and 0.95.

     
  • Anobium

    Anobium - 2017-01-12

    Grab the latest and try - but, I think this sounds like the issue we are fixing at the moment.

    Please upload your ASM and Source - I will try here to simulate. I will post an alternative HEX (based on your source code) for you to test.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    Certainly. Thankyou so much for your help. I've attached the files you requested. Some of the outputs work, but none of the inputs, if that helps.

     
  • Anobium

    Anobium - 2017-01-12

    Test this please. Does this 1) Load without the error? 2) Operate as expected? However, I have not looked at your source, so, if that has errors I have not inspected.

     
  • Anobium

    Anobium - 2017-01-12

    And, now test this. This hex file was generated by Great Cow BASIC v.09.01 which has not been released yet.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    I'll test them right away and let you know. Thanks much.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    I appear to be having some connectivity issues. I'm sure that's something on my end. The good news is, I didn't get any addressing warnings when I loaded the file! We're definately on the right track. I'll try an alternative method for the download.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    Eureka! I downloaded the second file you posted. At least some of the inputs are working now. I'm sure I have some hardware issues still, but it's trying to work. Very encouraging. Are you still developing v.09.01? Would love to have the latest and greatest as soon as it's available.

     
  • Anobium

    Anobium - 2017-01-12

    I can release once Bill has enhanced the timer capabilities. Should be later this week.

     
  • Anobium

    Anobium - 2017-01-12

    I can release once Bill has enhanced the timer capabilities. Should be later this week.

     
  • Daniel Nielsen

    Daniel Nielsen - 2017-01-12

    Much appreciated. Thanks again for your help.

     
  • William Roth

    William Roth - 2017-01-12

    Until the new release is available you might try assembling your GCB generated ASM code using the latest version of gputils/gpasm.

    If you have MPLABX 3.5 installed you might also try assemmbling with MPASMX (5.71). (Make sure to disable case sensitivity)

    William

     
  • Anobium

    Anobium - 2017-01-13

    I should have said.... for all those following this...

    I posted two HEX files.
    1. Was produced using MPASM assembler
    2. Was produced using Great Cow BASIC (compiler then assembler)

    Why?
    Using the two isolates the issue. If #1 HEX works and #2 had not worked then the root cause was likely to be in Great Cow BASIC assembler component.

    However, in this case #2 worked. Why? Fix #309 (within release v0.96.01) resolves an assembler bug on PIC18F - where config words were being incorrectly generated in some cases.

    So.. my guess is that HEX #1 would work and, Bill is correct in saying that MPASM part of the MPLABX3.5 would also work before I release v0.96.01in the next day or two.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.