Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How-To Create Chip Data

2008-04-12
2013-05-30
  • Hi Everybody,

    How do someone create Chip Data for use in GCBasic?

    Is there a script or code or a basic tutorial on how to do these things?

    Please help! Thanks in Advanced

    God blesses!!!

    Best regards,
    Sanyaade

     
    • Hugh Considine
      Hugh Considine
      2008-04-13

      I wrote a program to do this automatically. It reads the .inc files from gputils/MPASM, a spreadsheet of details such as memory size and pin count, and if possible the .vdi files from MPLAB. It then makes guesses about things like the memory map, and pinout.

      If you'd like I can upload this program and the spreadsheet. However, the program hasn't really been designed to run anywhere other than from a particular folder on my PC and so you'll need to alter it a bit to make it work.

      If there is one PIC chip that GCBASIC doesn't support, I can easily add support for it. It's just a matter of getting the .inc file for it, adding its data to the spreadsheet, and running the program.

       
    • Hi Hugh,

      Thanks for your reply and being very prompt in replying me.

      Kindly upload the program. I wants to know how to create one and to be able to teach
      my Students as well. I really appreciated your response and kind gesture.

      Thanks and God blesses!!!

      Best regards,
      Sanyaade

       
    • Hugh Considine
      Hugh Considine
      2008-04-14

      The source for the program is at http://gcbasic.sourceforge.net/temp/getchipdata.bas and the chip data spreadsheet is at http://gcbasic.sourceforge.net/temp/chipdata.csv .

      The file should compile with FreeBASIC 0.18b, but might need some variables to be defined in it. Because I only intended to compile and run it myself, I used a slightly altered version of 0.18b that allows for implicit declaration of variables.

      As someone who has tried to teach PIC programming myself, I'd advise against teaching your students how to make the chip data files. I've found that at least with high school students here in Australia, a lot of students who are complete beginners lose interest as soon as you try and explain anything low level to them in detail. It would be good to give them an overview of the datasheet, and show them how it relates to what the compiler reads from its data files, but they don't really need to know how to actually make the files and there might be something more useful you could teach them.

      One thing that might be of interest is the /K:A command line switch. It will make GCBASIC store a copy of every BASIC command in the .asm file as a comment, right above the assembly code that it produces for that command.

       
    • Hi Hugh,

      Thanks for your reply and for the good advice given on the teaching of chip data to students. You are right most students get put off dealing with low level code. This is also what makes GCBasic a greate tool for me and my Students.

      I have made a preliminary version of Scite working from GCBasic folder and I am testing to make sure that Dir, path and link did not pose any problem (i.e. removing absolute path problem). Then I will complete the GCBasic keyword/api for scite lets say in the next 3 days.

      Thank you for the greate tool and every member of the forum.

      Stay blessed!!!

      Best regards,
      Sanyaade