![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hello, I have problem compiling this file to Hex. Can anyone here help me to compile this file..i really need to finish this project.. | |
| |
| | (permalink) |
| Do you have a compiler that will assemble code for a PIC16F84?
__________________ We never have time to do it right; but we always have time to do it over. | |
| |
| | (permalink) |
| i already try to compile it using sourceboost IDE, but theres a lot of "illegal directive" and i don't know how to solve it.. so can anybody help me.. i think there is nothing wrong with the coding..but i still can't compile it.. | |
| |
| | (permalink) |
| Try CCS C, where did you get the file from? | |
| |
| | (permalink) | |
| Quote:
__________________ We never have time to do it right; but we always have time to do it over. | ||
| |
| | (permalink) |
| i got it from vermont ficks website.. ok i'll try to compile it using CCS C.. | |
| |
| | (permalink) |
| This is not strictly CCS C. For example the header in the code is PIC16F84.h but CCS uses 16F84.h This is CCS Code: #use delay ( clock = 4000000, restart_wdt ) /* sets appropriate compiler constants */ #use fast_io ( A ) /* don't set TRIS on each I/O statement */ #use fast_io ( B ) Code: /* Set configuration bits in the PIC processor */ #pragma XT, NOPROTECT, WDT, PUT
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) | |
| |
| | (permalink) |
| Hmm well CCS C is on the site where the code came from. You could try contacting the site owner. http://www.vermontficks.org/pic.htm | |
| |
| | (permalink) | |
| Quote:
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) | ||
| |
| | (permalink) |
| oh yes...i think it is my mistake.. i try to modified a little so it can work with sourceboost.. i already download the CCS C compiler at CCSinfo.com.. but when i try to compile the the code i found 5 error.. that is ***Error 18 'Lock.c" Line 1(9,18): File can not be opened Not in "C:\Program Files\PICC\devices\16F84.h" Not in "C:\Program Files\PICC\drivers\16F84.h" Not in "C:\Program Files\PICC\devices\16F84.h" Not in "C:\Program Files\PICC\drivers\16F84.h" Not in local "C:\New Folder\16F84.h ***Error 111 'Lock.c" Line 4(7,31): unknown keyword in #FUSES "PUT" ***Error 99 'Lock.c" Line 35(5,75): Option invalid Not a valid port: A etc.. i think the problem is, i don't know how to compile the file correctly.. why they can't find 16F84.h? Last edited by slique; 13th February 2008 at 04:55 AM. | |
| |
| | (permalink) | |
| Copy file from C:\program files\PICC\devices\16F84.h to C:\New Folder. Without the source code anything else would be guessing. Post it! EDIT: I found the code on the authors site. It was written for a 16F628A.h and you are trying to use a 16F84, why? You may also need jonsinc.h from the same place you found the C source. Do you want to learn how to use microprocessors or just build this one project? Quote:
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) Last edited by 3v0; 13th February 2008 at 11:30 AM. | ||
| |
| | (permalink) |
| thanks for the tips but i can't find 16f84.h in the folder you mention above.. maybe its because mine is demo version only.. can any body attach the 16f84.h file from ccs c here? because when download 16f84.h from the internet, the compiler detect a lots of error. | |
| |
| | (permalink) | ||
| Quote:
Quote:
I could compile the authors original code and post a HEX file for you but it would only work on the PIC16F628A. Can you get/use a PIC16F628A.
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) | |||
| |
| | (permalink) |
| Thank you. But I got PIC16F628.Is there any different? When i use this PIC, do i have to make any change to the circuit? | |
| |
| | (permalink) | |
| My Mistake. I was looking at the wrong project on the authors site. COMBO2.C does use the 16F84 But it has other problems that cause it not to compile. It may build in the authors environment but it does not on mine. Some stem from having to copy the code from a HTML file. The show stopper is *** Error 7 "C:\Documents and Settings\webmaster\Desktop\helpout\combo2.c" Line 481(39,92): Invalid Pre-Processor directive The line in question is Quote:
If you are new to micro controllers and want to learn to use them or build projects with them I suggest you find a project that either uses a free/demo compiler or better yet provides the HEX code. Stay away from the 16F84 as it is a very old (and now expensive) chip. Feel free to ask questions here when selecting a project.
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) Last edited by 3v0; 13th February 2008 at 12:43 PM. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Intel Hex to ASM converter please | devura | Micro Controllers | 3 | 8th February 2008 01:04 PM |
| Help needed ASM to HEX with MPLAB | Virus | Micro Controllers | 39 | 26th December 2007 04:30 PM |
| How a Hex code is operated in u-controller? | ibrar0 | Micro Controllers | 11 | 30th November 2007 09:15 PM |
| HEX switch | OY2L | Micro Controllers | 2 | 9th November 2007 12:49 AM |
| SimuLink and RTW compiling custom S-function | Styx | General Electronics Chat | 0 | 25th February 2004 03:51 PM |