![]() |
16F84 HELP!!!
i have a 16F84 assembled in a programming circuit but idk if the circuit will actually work cause i got it off the net and i cant figure out how to downlaod the code from my compiler to the PIC
|
Re: 16F84 HELP!!!
That's not a whole lot of info to go on. Could you provide a link to the website you got this from, or a schematic of the programming circuit.
|
Re: 16F84 HELP!!!
|
Re: 16F84 HELP!!!
That programming circuit requires you to use an application called IC-Prog. Once you have the hex file from whatever development tools you are using you would use IC-Prog to flash the PIC.
|
Re: 16F84 HELP!!!
what program can I use to get the hex file?
do you know of any circuts i can use that you know will work? or any other applications i can use? i got the .ASM file but not i have no way of getting the .HEX file |
Re: 16F84 HELP!!!
Calm down...
You make a .hex file every time you program the IFI controller. The linker actually creates the .hex from object code (.o files). .asm files are either source code in assembler or a compiler generated intermediate file from a higher level language like C. If you are not generating .hex files, either you have the integrated environment set up wrong or the linker had an error during its processing. Mike |
Re: 16F84 HELP!!!
Quote:
If you don't then download and install it from here. If so, then the simplest way to do this (assuming your code is only one assembly file) is to do the following: 1) Open the assembly source file in MPLAB 2) On the MPLAB menubar choose Configure->Select Device... 3) In the dialog that comes up choose the PIC16F84 or PIC16F84A depending upon what chip you have. 4) On the MPLAB menubar choose Project->Quickbuild MPLAB will launch the assembler (MPASM) and will build a hex file in the same directory as your assembly source file. Then you can use IC-Prog to flash the PIC with your newly created hex file. |
Re: 16F84 HELP!!!
i am having problems using IC-PROG because everytime i go to flash the PIC it freezes, it comes up with an error message thats says
"if you were in the middle of something, your information might be lost" then IC-PROG just freezes :( and yes i have MPLAB installed also i need a way to get a .ASM file because they way i thought would work didn't |
Re: 16F84 HELP!!!
Quote:
If this is not the case, how were you going to get the assembly file? If you could tell me exactly what your development setup is, it would help alot. Like what your MPLAB version is and what compiler you are using (if any). |
Re: 16F84 HELP!!!
i wrote the code in c but i need to convert it to assembly, and i am just using mplabs and ic-prog
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
HI-TECH Software has a free compiler called PICC Lite that targets PICs commonly used by hobbyists, including the PIC16F84(A). You have to register with HI-TECH, but the compiler is free. The compiler integrates with MPLAB, and is very easy to get up and running.
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
Quote:
and the spell check doesn't work when i click it it just comes up with a pop up that has the word error in it also what do you mean we are not on a instant messenger messenger?, i try to type correctly on a messenger too, if you cant read my post then i guess that is my problem, so therefore if you cant read it or have troubles why are you torturing youself by struggling to read it, just come into the thread see you cant read it then leave. |
Re: 16F84 HELP!!!
We're doing our best to understand what you're asking, because we sincerely want to help everyone overcome their problems. We're just frustrated by imperfect spelling and grammar, because we who want to help are generally engineers who thrive on precision.
I don't mind occasional misspellings, but continuous failure to properly use the SHIFT key and appropriate punctuation does get irritating rather quickly. Now that I've had my public rant on the topic, let's see how we can help you. Can you start with a little more detail on what you're trying to do? What you've said so far isn't very clear. It sounds like you have a PIC programming circuit with a misbehaving copy of IC-PROG, though it also sounds like you don't have a .hex file to give to IC-PROG. You say you have the third-party compiler necessary to compile your C program, but that it doesn't work. How about starting at the beginning? We'll go from there based on what we find. What exactly are you using to try to compile, and what exactly is it doing when you try it? |
Re: 16F84 HELP!!!
I am trying to program a 16f84 PIC, that is basically it. I just dont know if my programming circuit is correct or if i am doing anything right, it would really help if someone who has done it before could help me.
I gave up on compiling I deleted all the code I had so first lets start on getting a correct programing circuit, currently i have a JDM. |
Re: 16F84 HELP!!!
Quote:
Now you need something to program into the PIC. That's going to be somewhat of a problem, as you say you've deleted all your code and given up on compiling. If that's the case, I'm afraid I'm at a loss to suggest the next step. The point of the exercise is to take a program and put it into the PIC, is it not? |
Re: 16F84 HELP!!!
correct, but all of the code I had was incorrect, it was just hexadecimal numbers that were random.
If someone knows how to program in assembly can you please help me? also since this is a JDM schematic, can you confirm this one is correct? http://www.josepino.com/3/ |
Re: 16F84 HELP!!!
Quote:
Quote:
Quote:
|
Re: 16F84 HELP!!!
2 Attachment(s)
Ok, let's take this one step at a time. Let's make sure that your programming setup works. I've attached a hex file and the corresponding source for it. It's for the 16F84. If you use a 4MHz crystal and have a servo lying around, you can also verify that your programming attempt was successful. There's instructions in at the top of the source file. I'd give you simpler program, but my assmbler isn't working right now and this was all I could dig up. If I remember correctly, however, IC-Prog lets you read the flash, so you can verify that it was written properly.
|
Re: 16F84 HELP!!!
Sparks,
I think you need to take a step back and apologize to Alan, Fowler, Phil and Brian. The perceived (at least by me) attitude of your posts is childish and ignorant. Concerning the latter perception, I’m betting that you are not or you would not be attempting a project like this. Concerning the former perception, the teen angst bit may work with your parents and school teachers as they have little choice than to put up with it. In this forum, you will find it much more efficient to conduct yourself as an adult and make an effort to communicate better. All any of us are doing here is trying to help you out… Now I’ll get off my soapbox and get on to your problem. There is nothing wrong in the programming circuit proposed in Mr. Peno’s site and there is nothing wrong in using IC-PROG. It appears that you have some problem understanding the mechanisms involved in embedded microprocessors. That’s OK. We all have to start somewhere… Instead of trying to explain it all at once, I’m going to direct you to a site at the University of Texas: http://www.ece.utexas.edu/handson/robocar/ In this project, you will find that they use the same JDM compatible programming circuit (http://www.ece.utexas.edu/handson/ro...programmer.gif) as Mr. Pino. They have also provided an excellent piece of “test” code (http://www.ece.utexas.edu/handson/ro...code/TEST1.HEX) and a test circuit (http://www.ece.utexas.edu/handson/ro...picledtest.gif) to verify programming. They have also included detailed step-by-step instructions on the programming process (http://www.ece.utexas.edu/handson/ro...programmer.htm)*. After you have succeeded in getting the LED to flash, you should look at TEST1.ASM and see how it was done. Lastly, you should now try to assemble TEST1.ASM into your own TEST1.HEX using MPLAB (or whatever tool you are using) and verify that it works in your circuit as well. If at any point in this process, you hit a snag, please post here and ask for help. Just remember to try and put yourself in our shoes when you proofread your post. Have you given us all relevant information and is it easily understood? Best of Luck, Mike * This website is somewhat dated and your computer may be using COM3, COM4, et cetera as the serial port. If you have difficulty in determining which is being used, ask. Post Script: You should try a private message to Brandon Martus if you continue to have a problem with the spell check routine. I’m using Firefox 1.06 under Windows XP SP2 and I have no problems with it. |
Re: 16F84 HELP!!!
I am trying to communicate better.
and to reply to alan, I said lets start over, which means starting from the beggining as if nothing were done. so I wouldn't be trying to compile a program if I need one first, also i have no code to compile. I am not trying to learn how to program in assembly, I never said that i was anywhere. Mike IC-Prog does not work fine, everytime i hit the compile button the program just freezes up Also, where can I purchase something for it that would run at 4 mhz, I believe that I would need a Resonator, is this correct |
Re: 16F84 HELP!!!
Quote:
You do not need an oscillator to program the chip. Only the components noted here. You do not need to compile anything right away. Just use the TEST1.HEX file provided here. You do need a crystal oscillator to test the chip with the TEST1.HEX program loaded as shown here. You will also note a rather extensive debugging list here in the event that you have problems with IC-PROG. Of particular note are the special drivers required for XP operation. Are you sure that you have followed the instructions indicated? Mike |
Re: 16F84 HELP!!!
Mike, no i havent done that stuff you listed because i was using a different programming circuit, as soon as i get the parts i can try, but i do not know where to get the resonator
|
Re: 16F84 HELP!!!
Quote:
For the test circuit, you should be able to get the 3.864 MHz crystal almost anywhere. Radio Shack used to carry them for about 2.50 each (although I have been repeatedly disappointed recently by RS). Mike |
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
well I dont know what it is called, i thought it was a compile button, but it is what makes the program download
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
well yea what ever it is called, an error comes up when i click it.
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
I am aware that i need it, there is really no way to see what is going on if an error just comes up then closes the program, if there is I dont know how to check
|
Re: 16F84 HELP!!!
Quote:
Thousands of people from all over the world have downloaded and used this program. Somehow, they were successful in getting it to work. You should look over the step by step instructions and ask yourself "What did I do wrong?". If you look over your posts in this thread, we have no idea what your environment is. We are not sure which exact version of IC-PROG you attempted to use. We do not know what error messages you received when (or if) you installed icprog.sys (I had to reboot my XP SP2). In fact, we still do not know exactly what HEX file you are attempting to load. Also, I harbor a sneaking suspicion that you did not attempt to even read through the links I posted... In short, there is little more that I can do for you. You must somehow learn to do for yourself. Good Luck. Mike |
Re: 16F84 HELP!!!
Quote:
and i have decide to stop this project because whenever i say i have a problem with it everyone on here trying to "help" me just trys to say that I am doing something wrong because i dont know what I am doing, and of course they are right because I dont know what i am doing, maybe instead of everyone telling me that I am doing everything wrong be cause i apparently dont know what i am doing, they could tell me how to do it right |
Re: 16F84 HELP!!!
Quote:
You really need to grow up a bit before you can expect people to put time into responding to your posts anymore. |
Re: 16F84 HELP!!!
Alright Sparks, per Brian's observations, I decided to look back at some of your other posts/threads. I'm not trying to lecture you or anything, I just want to give you some advice.
In this thread, you were looking for help to learn about electronics. I'm not sure if your overzealousness in posting was a result of Kevin's suggestion of just asking, but you need to slow down a little. Many of your questions don't have anything to do with each other except that they are about electronics or robotics. This is a community, and we do want to help our own, but as Brian said, you need to be a little self-sufficient also. One of your questions was simply "what is I2C?" You later followed up by looking for a place to learn about it. You could have easily (and probably more quickly) found information by using Google or going to a library. You also IMed me and asked about using a certain capacitor with your 7805. I wasn't sure and asked if you knew what the spec said to use. You said you didn't even bother to check. Don't get me wrong, questions are good, but you need to try to help yourself before asking for other's help. I'm not just saying this to make you go away, it's something that you'll have to do in life. You won't always have somebody right there at your side to hold your hand and walk you along. As another comment on your myriad of questions: it's almost as if you were still looking for a direction to go by jumping around. Now that you've found something you want to do, I think you might still be moving too fast. You need to slow down a little. I don't know much about your electronics background, but it seems that you may have bitten off more than you can chew. If I'm not mistaken, your ultimate goal from all of this is to make a Segway-style balancing robot. It sounds like a fun project. But, you don't seem to have the background for it yet. In our personal conversations, you mentioned that you don't know C. However, you wanted to program your PIC in C. Before you could write the program though, you needed to figure out how to program the PIC. I feel that you're working backwards. You're starting from the specific and moving to the general. You don't build a kitchen, however, before you have four walls and a roof. And you certainly don't build your kitchen until you at least have a foundation. When others help you, they expect that you have a certain amount of expertise in the area. You have to tell them how much expertise you have. All of us have been telling you things, but we don't know what you know. If you were a three year old, we'd have to teach you about electricity first. If you have a Ph.D. in electrical engineering, you're probably only trying to figure out which buttons to press because the system is new to you. I'm not saying that you're either of those, but in order to communicate effectively, we all have to work on common ground. By asking how to flash the PIC, it makes other assume that you've already figured out how to write the program. You need to put down your microcontroller and do some thinking. You need to figure out what level you're actually at. Go back there and start working your way up. You expressed an interest in putting together an electronics kit. Maybe you should go to the library and get some books (or find some websites via Google) to learn about basic electronics. It seems that you want to move toward digital, so start with that. Learn about electricity. Then start building some circuits with resistors and learn how they work. Learn how capacitors interact with them. Start working with transistors. When you get comfortable with those, find some logic ICs. I'm not saying that this is the exact path that you should follow, but it's what I did. (and I didn't have the benefit of being able to use the internet, which made it a little harder) When I was a kid, I was taking things apart to figure out how they worked and started playing with their parts. In 4th or 5th grade, I bought an electronics kit from Radio Shack. (I'm not completely sure what compelled me to spend the $25 on it...at that age, you'd be lucky to have $30 lying around) I was still at the stage that I wanted to just see things work than actually understand them. In 6th grade, I recall taking the board out of a remote controlled car and replacing the motor with a relay to make a radio controlled switch. I wasn't too interested in the details of how it worked, just that it was cool. I knew that there was a slight problem with it, but I wasn't able to fully understand what it was and how to fix it for several years. It wasn't that I couldn't figure it out, just that I didn't have enough knowledge to understand how I coulld fix it. I still have the project lying around somewhere, but I still haven't gotten around to fixing it. My electronics development pretty much laid dormant for a few years. By the late part of my freshman year of high school, I had access to the internet. With the wealth of knowledge at my fingertips (well, Google wasn't around, so it was still a little hard finding things), I was able to do some research. I got back into electronics via robotics. I started researching robotics related information and eventually bought a Basic Stamp. I played with that a little bit. It also got me into digital logic. A couple years went by, I experimented an learned. Then, I learned about FIRST. But sadily, I couldn't get my school to let me start a team. Instead, however, some of the science teachers pointed me toward the Tech Challenge. I entered that twice with my friends that wanted to start a FIRST team with me. While the competition isn't strictly about robotics, robots are common place. That helped me expand my knowledge and skill further. I researched PICs, but didn't have the money to start working with them. The year after I graduated, one of the new physics teachers, currently our main moderator, attempted to start up a FIRST team. Having more weight than me (and having different internal school circumstances), he was able to make it happen. I still learn little things here and there, but my electronics expertise is generally beyond what FIRST can teach me in 1351's setting (it let me learn about mechanics, though). I'm still the main guy to help out the high school students with the control systems aspect of the robot, though. Seeing PICs in use, and having slightly more money, I recently started playing with them. There were a few times over the years when I tried to do too much. I tended to get frustrated and wanted to just drop it. However, if I just slowed down a little, I was able to get back on track. If you get in over your head, just back up a little and try again at a slower pace. I'm not exactly sure what I want you to get out of the story of my life, but I figured you could use some inspiration. I don't claim to be an expert in electronics, but I do know a thing or two. I have been close to where you are right now, but I found a way out. Again, as I stated earlier, I'm not trying to lecture you. I'm just giving you some advice. Whatever you chose to do is up to you. While my continued help is not contigent on you following my advice, I do prefer that you would. When I help you out, I'd like it if you helped me also. Do a little research on your own. If you get stuck, then feel free to ask. But, make your exact problem clear. Try to be as specific as possible. Also, let us know what you have done so far and what you hope to achieve by solving your problem. It will help us understand what you need to know. |
Re: 16F84 HELP!!!
OK. your acting like I know nothing about electronics, I know way more then you think. I know the most out of probally anyone at my school about circuit development and how to make complicated electronic systems, my questions about the electronics kit was simply me not know what i should get to work with, I listed something i knew i needed to get, like Logic gates and all that, i listed maybe half of the things i know how to use, I just simply thought that someone with some expertise may have known of some components that i may not have known of of that would make things easier for me, like the Resonator someone mentioned, that is something i didnt know about and it will help me greatly by simplifying circuits for a clock source.
I ask so many questions that have to do with different things because I know about lots of little bits and pieces of things, and as for little things like the I2C, or the 7805, i will admit were a little stupid but I have ADD so sometimes simple things like common sense escape from me. I also do not think i have bitten off more then I can chew because what is the use of doing something to learn if it is not a challenge, realy the only thing i need help with is the microcontroller. You cannot use your analogy of building a kitchen to apply to this because it is totally different situtaion i am in, because currently i am planning for the project and getting everything i need for it. I am just doing it like the design process, i have defined the problem, and now i am doing research, because how could i possibly build something without know what to build? like how are you going to build a kitchen with out know how to build a foundation? I dont know how to do things with a microcontroller because i know alot about electrical and mechanical but nothing about programming. |
Re: 16F84 HELP!!!
I think you are making a mistake far too many in high school make (myself included back then), that you think you know a lot more about a subject than you actually know. Although you may know more than almost everyone else at your school, that doesn't qualify you as an expert. Once you get to college and you are among people who know more than you, you begin to realize how foolish you are. As a junior and senior high school I thought I knew everything, but in college you realize you know nothing relative to what there is to learn. Looking at what I will cover until I graduate college I know I will not know anything but the basics, until I go to grad school or get a full-time job. Even then you will still be learning, but you can atleast claim a good ammount of expierence in the field.
|
Re: 16F84 HELP!!!
Quote:
Quote:
Quote:
Your comments seem to imply that you feel that I am attacking you. If I come off that way, I'm sorry. I'm just trying to get you to help us understand what level you are at so that we can communicate better. Unless we know exactly what you are doing, we can't help you much. |
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
Quote:
i am not trying to attack anyone either, basically as i said many times I am just trying to get a 16F84 microcontroller to work, should i say to answer you, exactly what i am doing is trying to get a 16F84 microcontroller to work |
Re: 16F84 HELP!!!
Quote:
But now, back to your problem. You mentioned that IC-Prog crashes and gives you an error when you try to program. Give us a step by step run through of what you do right after you open IC-Prog. Also, what error does it give you? |
Re: 16F84 HELP!!!
Quote:
-paste the code you sent me - i hit the button to lad the code to the PIC -message comes up that says error -program closes |
Re: 16F84 HELP!!!
1 Attachment(s)
Quote:
If so, connect your programming circuit, then Settings > Hardware check. I'm pretty sure that verifies that it can talk to the circuit. If it doesn't work, someone, I believe it was Mike, posted a link to setup instructions for IC-Prog. |
Re: 16F84 HELP!!!
welli got it from the link that was posted on here for it, and it lets me paste so, I dont know what is going on
|
Re: 16F84 HELP!!!
Phil, Sparks, et al,
IC_PROG does allow cut and paste but you need to know what you are doing. If you paste from a HEX file, you will paste not only data but other parts of the Intel Hex format (byte count, record type, offset and checksum). Unless you are very careful about dissecting the hex file, the net result would be that you end up with invalid op-codes at unintended memory locations. Mike Phil, IC-PROG is not a sophisticated programming interface. I have not used the function but I believe that the hardware check allows you to assert each of the 4 output lines to assist in debugging via multimeter. If IC-PROG is working and you leave all memory locations as the default FFH, an attempt to flash a device by IC-PROG will report "Verify OK" if nothing is connected to your serial port. If any data location is other than FFH, the verify will fail. Mike Sparks, The step-by-step instructions in my link specifically instructs you to File>Open the TEST1.HEX file rather than cut and paste (Step 3 under Open Your Code). Also, you are quite correct in your observation that your computer is not the same as the thousands of others. However, you still have not told us what your programming environment is. Finally, there are 4 versions of IC-PROG available for download... Mike |
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
what excatly do you mean by my programming environment?
|
Re: 16F84 HELP!!!
Quote:
What is unique about your computer? What kind is it? What operating system? What resident programs are running? How is the serial port implemented? As an example, my programming environment is an Intel PIII, 1 GHz, Laptop with 3/4 GB RAM running XP Home SP2. The laptop has no serial port so I use a Bafo BF-810 USB to Serial converter on COM3. I would think that this information might be useful to anyone who is trying to help me... Mike |
Re: 16F84 HELP!!!
emachines, intel cerleron D processor, 2.833 ghz, 256 MB ram, serial port(com4),
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
it is a physical port, i have i think 6 serial ports on my comp
|
Re: 16F84 HELP!!!
Quote:
USB stands for Universal Serial Bus and is very different from a "traditional" serial port which is RS-232 compliant. The connector for RS-232 is a 9 pin connector (called a DB9) and the connector for USB is a 4 pin connector. Both the IC-PROG and JDM interface require a RS-232 type of serial port. Please confirm if you have a "traditional" (RS-232) serial port or not. Mike |
Re: 16F84 HELP!!!
|
Re: 16F84 HELP!!!
yes i know the difference, and i have 4 serial ports the other 2 are joystick, and no i have 8 usb ports
|
Re: 16F84 HELP!!!
Sparks,
I just ran a quick experiment. I took a "virgin" computer (one which has never had IC-PROG installed) and copied icprog.exe (version 1.05A) to it without copying icprog.sys. I then attempted to use IC-PROG. When I attempted a flash: Quote:
1. Download and unzip this to the same directory as icprog.exe is in. 2. Go here and follow the directions in step 3 under "Setting up Ic-Prog". 3. After a successful installation of icprog.sys reboot your computer. Please humor me and do this. Let me know your results. Mike |
Re: 16F84 HELP!!!
it works now but i need a resonator for the programming circuit now according to that site, and now where around me sells them cuz there is only radio shack, and i dont feel like spending 10$ on one to order it from some site, so now i am kinda stuck
|
Re: 16F84 HELP!!!
Quote:
|
Re: 16F84 HELP!!!
none that I know of, I have asked around and looked in the fone books and it is electrical supply surplus that I found, you know like residential industrial and commerial electrical stuff
|
Re: 16F84 HELP!!!
Rochester, NY right?
"electronic supply rochester" on Google Maps turned up a bunch of commercial suppliers. But it looks like Allied Electronics might be able to help you. They sell the crystals and sell in single unit quantities, but I'm not sure if they're walk-in. Allied Electronics (585) 292-1670 333 Metro Park # N107 Rochester, NY 14623 |
Re: 16F84 HELP!!!
oo
I have never thought of using google for that i am checking it out now |
| All times are GMT -5. The time now is 00:10. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi