PIC Code Template


Closed Thread
Results 1 to 5 of 5
  1. #1
    asguard's Avatar
    asguard Guest

    Default PIC Code Template

    Hi,

    Was wondering if there was a template of sorts available.
    Have .asm code & HEX, but will not work on PIC.(for some reason, yet it was designed for PIC apparently). The code it seems is a bit on the messy side, And thus far I have not found any tools that will convert assembler (.asm, mpasm,tasm, or any other) in Basic, Pascal, C etc. into something that will work. So it looks as if I must rewrite the code for PIC 16f877, in some form that ICprog & JDM programmer for instance, would accept and write to PIC & work...(as it is, the HEX & .asm codes will write to the CHIP but when installed in hardware...no go).

    Thus, the question being is there template that is set out in ordered sections, whereby I can just change the variables?

    Eg: LCD,GPS,etc...

    Any input would be appreciated.

    Thank you

    All the best

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Asgard,

    You have posted a bit of a confusing post but what I think you need to know is the way to program a PIC. This forum is for users of a compiler program known as PIC Basic. Our other forum here is for users of PIC Basic Pro compiler. The compilers take the programs written in either of these two languages and convert them to .asm then to .hex. These compiled files, namely .hex can then be programmed into a PIC using one of many types of programmers available. Many people on these forums also use a companion program called Micro Code Studio which is an IDE. MPLab from Microchip is also an IDE type program and is used in creating programs in assembly language.

    As for templates, I personaly don't know of any but if you search these forums you will find many programs that have been written that form the basics for other programs. Darryl Taylor has given us "Instant Interrupts", for example, which is a program that sets up the interrupt process. He has also donated a program that helps you create bargraphs on LCDs.

    You will also find forums on Microchip.com. Google PIC and you will get many sites to investigate.

    I don't know your level of expertise in this area so if I'm off base here I'm sorry. Let me know if I can help you any further.

    HTH,

    BobK

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


    Did you find this post helpful? Yes | No

    Default Decompiler

    Quote Originally Posted by BobK
    Hi Asgard,

    You have posted a bit of a confusing post but what I think you need to know is the way to program a PIC.

    BobK
    Hi Bob, I think he wants a decompiler to turn assembly back into basic, so he can alter his asm file to work on a different PIC. JS

  4. #4
    asguard's Avatar
    asguard Guest


    Did you find this post helpful? Yes | No

    Default

    Pretty close Joe and for right for a few applications I`m looking at, Bob not so close,

    It apparently wont work on PICbasic lite as one seems to be limited to f628.
    Have MicroCode Studio, MikroBasic Compiler, MPlab etc. All good.

    I have erased the rest (another ten or so paragraphs trying to explain, which nodoubt would have confused reader). While writing this, a good example came to mind that would illustrate...The beginners or educational software called - CoreChart (h**p://www.elabtronics.com/Beginners_Templates.htm), is along the lines of what I was trying to explain, instead of sifting through forums and others mistakes, which may lead one to making the same ones, great if one has nothing better to do.

    Granted, there are those among you that subscribe to... the do it and learn, and you only learn from your mistakes/errors (funny it seems that the thought must be that people cant learn from the errors of others). Would it not be more conducive, to be shown the right way, or be assisted in the right way first...
    Learn from your errors indeed...I guess you were lucky some kept notes hey.. If not you`ld still be trying to invent gunpowder or dynamite..get it, probably not.

    Anyways, think I`ve got it sorted, I`ll have something shortly that will do the job, convert etc, found some knowledgeable persons, they`re onto it.

    Cheers fellas,
    Have a great day.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    > Have MicroCode Studio, MikroBasic Compiler, MPlab etc. All good.

    So whose BASIC Compiler are you using? The MeLabs product or the MikroBasic product?

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  4. PIC 2 PIC communication
    By Mario in forum Forum Requests
    Replies: 16
    Last Post: - 28th April 2006, 01:56
  5. PIC vs PLC (programmable logic controller)
    By pondindustrial in forum Off Topic
    Replies: 4
    Last Post: - 17th December 2004, 21:11

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