can anybody compile this

Discussion in 'Programmer's Corner' started by superayman, Apr 14, 2013.

  1. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    I peeked at the first zip with the two asm files. These look like standard MPLAB asm code, so that is all you need.

    MPLAB is a free download from Microchip.com. You can get it there and make these for yourself.

    Start a new project with your correct PIC device and include the asm file. Then hit build. I don't believe you will need to worry about the linker file unless it does something special, the standard link files are now included by default.
     
  3. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    i have that but iam missing p16f5x.inc file how can i get it
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You are probably not missing it. It should be here "C:\Program Files\Microchip\MPASM Suite"
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Check the case of the letters in "p16f5x.inc" against the folder mentioned.
    Strange that it isn't "p16f877a.inc" or similar.
     
  6. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    install little program called "Everything":
    http://www.voidtools.com/

    it will quickly index your HDD (on my 750Gb laptop drive, this took 5-6 seconds), then type whatever part of file name you are looking for. if it is on your computer, you will know it in a fraction of a second.
     
  7. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    Build C:\Users\Ayman\Desktop\New folder (8)\encode for device 16F877A
    Using driver C:\Program Files\HI-TECH Software\PICC\9.83\bin\picc.exe

    Make: The target "C:\Users\Ayman\Desktop\New folder (8)\enc-052.p1" is out of date.
    Executing: "C:\Program Files\HI-TECH Software\PICC\9.83\bin\picc.exe" -C C:\Users\Ayman\Desktop\encoder-parallel\enc-052.asm -q --chip=16F877A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
    Error [141] C:\Users\Ayman\Desktop\encoder-parallel\enc-052.asm; 24.21 can't open include file "p16f5x.inc": No such file or directory
    Make: The target "C:\Users\Ayman\Desktop\New folder (8)\mtxv4.p1" is out of date.
    Executing: "C:\Program Files\HI-TECH Software\PICC\9.83\bin\picc.exe" -C C:\Users\Ayman\Desktop\encoder-parallel\mtxv4.asm -q --chip=16F877A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
    Error [141] C:\Users\Ayman\Desktop\encoder-parallel\mtxv4.asm; 42.22 can't open include file "p16F5x.inc": No such file or directory

    ********** Build failed! **********
     
  8. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    it keeps giving me error
     
  9. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    first of all why are you including something for pic16f5x into project using pic16f7xx? those chips are different.

    next, if your compiler cannot find the *.inc file, you have to check your compiler settings including paths. program like Everything will allow you to quickly locate any file anywhere on a computer.
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    First you are using the wrong driver. Your project is assembler project and NOT a Hi-Tech C project. I suggest you build a new project folloewing the steps shown in this document. Of course select the correct chip for your project.
    http://www.covingtoninnovations.com/noppp/mplab.pdf
    You are using a pic16f7xx series chip. And not a 16f57 28 pin chip. If I remember correct the 16f877 is a 40 pin IC. It could be that some modifications to the code. Will be needed.
     
  11. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    the problem is i know nothing about assembly
    i never used mplab i always use micro c
     
  12. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    please can anyone compile it its not for me its for school and i really need it as fast as possible
     
  13. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
  14. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    i dont know how to start or even to init the rf unlike most of stuff i tried that got none examples with c language
     
  15. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    you don't have to use anything from that website. you can write your own code.

    sender:
    read inputs and encode them into a word of data.
    send the word data (using R232 or bit banging)

    receiver:
    receive word of data, decode it and drive outputs.

    both sender and receiver must use consistent timing, for example if using RS232, both must be set to same baud rate.


    your channel can be piece of wire between sender and receiver (convenient for development). then you can replace wire with IR or RF...

    the point is, if you want to build something that others have designed, use it as is (unless you know how to modify it). but if you can program, you can do everything yourself, and you get the understanding on how to expand or change the system when need arises.


    to compile the code i simply had to:
    1. extracted ZIP files into separate folders,
    2. started MPLAB
    3. Menu Project>Project Wizard
    4. Select PIC15F57 and give project name such as senter or receiver
    5. Navigate to one of folders to save it
    6. Import all content of the folder
    7. Hit compile (Compiles OK).

    but compiled code is for PIC16F57, a low cost device which is also available as a free sample. this means it is not worth wasting time. btw there is only some 20 instructions in PIC vocabulary, not exactly a big deal to get familiar with.
     
  16. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
  17. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    can you give me the hex file please
     
  18. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    But I doubt it will work on PIC you have.
     
  19. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    here you go
     
Loading...