Menu

18F26K80 data file issues

2015-01-12
2015-09-24
  • Peter Stone

    Peter Stone - 2015-01-12

    Hi All,

    I have been using GCB for a little while now.
    Most of the time I have sorted out any issues directly with Hugh, but I expect with his newer commitments, access to him to solve little problems might not be as easy. Hence my post.

    I am currently trying to use GCB in a CAN bus application.

    I am having difficulty getting started as the chip file for the PIC18F26K80 does not seem to be correct.
    Has anyone tested this device?

    I think the configuration bytes definition for the clock set up is wrong. It does not allow you to correctly configure the device for I/O on standard clock pins as well as I/O on RC0 and RC1 (these conflict with the secondary oscillator functions).

    It also doesn't appear to correctly set the analogue pins when they are not required.

    Does anyone have knowledge on how to correctly edit the device files? A bit beyond me at present.

    Any help greatly appreciated.

    Peter.

     
  • Anobium

    Anobium - 2015-01-12

    Please post the start of code.

    What are you using for config? Standard GCB or are you using your own config?

    Thank you.

     
  • Peter Stone

    Peter Stone - 2015-01-12

    After a little more investigation, I have attempted to modify the device file. It now appears to be a bit closer to the way it should operate.
    I am testing on a Chipino with Keypad/LCD shield.
    The code works on bot 16f886 and 18f26k22.
    I have attached a modified .dat file.
    Sample code in next post.

    Peter.

     
  • Peter Stone

    Peter Stone - 2015-01-12

    Sample code.
    Peter.

     
  • Hugh Considine

    Hugh Considine - 2015-01-12

    Updated chip data files are now checked in to SVN, at https://sourceforge.net/p/gcbasic/code/231

    If all has gone well, the settings should be added to the chip data files, and the secondary oscillator pins should default to normal I/O.

     
  • Peter Stone

    Peter Stone - 2015-01-12

    Thanks.
    Suggest the following also:
    INTOSCSEL_LOW,INTOSCSEL_HIGH should be removed from the FOSC line. These are likely to generate assembler errors. They need to be moved to a separate entry.

    Also can the system be set to default all analogue inputs to off (consistent with outer chips under GCB) after reset the pins revert to analogue inputs.

     

Log in to post a comment.