Log in

View Full Version : 16F84 HELP!!!


John Gutmann
31-08-2005, 22:34
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

fowlerm
01-09-2005, 00:00
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.

John Gutmann
01-09-2005, 18:27
http://www.josepino.com/3/

fowlerm
01-09-2005, 20:47
That programming circuit requires you to use an application called IC-Prog (http://www.ic-prog.com/). Once you have the hex file from whatever development tools you are using you would use IC-Prog to flash the PIC.

John Gutmann
01-09-2005, 20:57
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

Mike Betts
01-09-2005, 21:58
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

fowlerm
01-09-2005, 23:15
i got the .ASM file but not i have no way of getting the .HEX file
First off - do you have Microchip MPLAB installed?

If you don't then download and install it from here (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002).

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.

John Gutmann
02-09-2005, 12:32
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

fowlerm
02-09-2005, 14:50
also i need a way to get a .ASM file because they way i thought would work didn't
I'm not exactly sure what you mean by this. Correct me if I'm wrong, but from what I understood from your other posts was that you had written the code in assembly.

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).

John Gutmann
02-09-2005, 17:28
i wrote the code in c but i need to convert it to assembly, and i am just using mplabs and ic-prog

BrianBSL
02-09-2005, 17:39
i wrote the code in c but i need to convert it to assembly, and i am just using mplabs and ic-prog

You can't do that with a 16F84 without using a 3rd party compilier. We told you that in another thread. The C18 compiler does not compile for 16F's, only 17's and 18's. You have to write the code in assembly by hand or buy a 3rd party compilier to use it with a 16F84, as you were told in another thread.

fowlerm
02-09-2005, 18:08
HI-TECH Software has a free compiler called PICC Lite (http://www.htsoft.com/products/PICClite.php) 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.

John Gutmann
03-09-2005, 18:14
You can't do that with a 16F84 without using a 3rd party compilier. We told you that in another thread. The C18 compiler does not compile for 16F's, only 17's and 18's. You have to write the code in assembly by hand or buy a 3rd party compilier to use it with a 16F84, as you were told in another thread.

i WAS TRYING to use a 3rd party compiler to assemble it but it didnt work, that is why i asked if anybody knew how i cud get it from c to assembly

BrianBSL
04-09-2005, 20:33
i WAS TRYING to use a 3rd party compiler to assemble it but it didnt work, that is why i asked if anybody knew how i cud get it from c to assembly

First of all, you never said that. Second, your sentences have so many case, grammar, and spelling problems that they are very difficult to read. This isn't an instant message, it would be nice if you would use full words. Could is spelled "could" not "cud". Is English your first language?

John Gutmann
05-09-2005, 19:54
First of all, you never said that. Second, your sentences have so many case, grammar, and spelling problems that they are very difficult to read. This isn't an instant message, it would be nice if you would use full words. Could is spelled "could" not "cud". Is English your first language?

yes english is my first language, and i try to type the right way, not like i type like a freak just to piss you off, and dont say my sentance are FULL of errors, when i spell one word wrong, is a bucket of water FULL after one drop?
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.

Alan Anderson
05-09-2005, 23:14
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?

John Gutmann
06-09-2005, 13:55
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.

Alan Anderson
06-09-2005, 16:12
so first lets start on getting a correct programing circuit, currently i have a JDM.
A JDM-compatible circuit is perfectly usable for what you want to program, and IC-PROG can talk to it just fine, so that should take care of the hardware end of things.

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?

John Gutmann
06-09-2005, 18:38
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/

Alan Anderson
06-09-2005, 22:03
correct, but all of the code I had was incorrect, it was just hexadecimal numbers that were random.I don't know how to respond to that. You don't seem to want to give enough information for me to help you.If someone knows how to program in assembly can you please help me?I'm quite lost now. You seem to have changed your direction drastically. What happened to wanting to compile a program? I don't think this forum is going to be a useful way for you to learn to write PIC assembly language.also since this is a JDM schematic, can you confirm this one is correct?
http://www.josepino.com/3/It seems to be consistent with other JDM-inspired programming circuits. I see no reason to disbelieve its claim to work with IC-PROG.

sciguy125
06-09-2005, 22:16
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.

Mike Betts
06-09-2005, 23:59
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/robocar/programmer.gif) as Mr. Pino. They have also provided an excellent piece of “test” code (http://www.ece.utexas.edu/handson/robocar/code/TEST1.HEX) and a test circuit (http://www.ece.utexas.edu/handson/robocar/picledtest.gif) to verify programming. They have also included detailed step-by-step instructions on the programming process (http://www.ece.utexas.edu/handson/robocar/testprogrammer.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.

John Gutmann
08-09-2005, 14:52
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

Mike Betts
08-09-2005, 19:24
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

As you stated, let's start over. From now on, I am making all references to the University of Texas web site (http://www.ece.utexas.edu/handson/robocar/)...

You do not need an oscillator to program the chip. Only the components noted here (http://www.ece.utexas.edu/handson/robocar/programmer.gif).

You do not need to compile anything right away. Just use the TEST1.HEX file provided here (http://www.ece.utexas.edu/handson/robocar/code/TEST1.HEX).

You do need a crystal oscillator to test the chip with the TEST1.HEX program loaded as shown here (http://www.ece.utexas.edu/handson/robocar/picledtest.gif).

You will also note a rather extensive debugging list here (http://www.ece.utexas.edu/handson/robocar/testprogrammer.htm) 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

John Gutmann
08-09-2005, 19:35
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

Mike Betts
08-09-2005, 20:57
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

If you look carefully, both http://www.josepino.com/3/ and http://www.ece.utexas.edu/handson/robocar/programmer.gif are close to identical. The latter is just easier to read (in my humble opinion) and the likelihood that you have made (or will make) a wiring error is not outside the realm of possibility.

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

Alan Anderson
09-09-2005, 16:43
Mike IC-Prog does not work fine, everytime i hit the compile button the program just freezes up
I've never noticed a "compile button" in IC-PROG. Did you get the program from http://www.ic-prog.com/?

John Gutmann
09-09-2005, 22:14
well I dont know what it is called, i thought it was a compile button, but it is what makes the program download

sciguy125
09-09-2005, 22:25
well I dont know what it is called, i thought it was a compile button, but it is what makes the program download
The button to flash the chip should be the button with a lightning bolt over a microchip. When you hover your mouse over it it will say "Program All".

John Gutmann
10-09-2005, 14:24
well yea what ever it is called, an error comes up when i click it.

Mike Betts
10-09-2005, 15:46
well yea what ever it is called, an error comes up when i click it.

Have you investigated why? You are going to need IC-PROG for your project.

John Gutmann
10-09-2005, 20:42
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

Mike Betts
10-09-2005, 23:34
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

I will leave you with this thought:

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

John Gutmann
11-09-2005, 11:59
I will leave you with this thought:

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

well thousands of people all around the world do not have the same computer and all that as me, I dont know what version i downloaded because I downloaded the one in the link you sent me

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

BrianBSL
11-09-2005, 12:18
well thousands of people all around the world do not have the same computer and all that as me, I dont know what version i downloaded because I downloaded the one in the link you sent me

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

They have tried to tell you how to do it right, but that is very difficult when you don't give any details about what you are doing it with. You must also remember that this is a forum about FIRST robotics, not your own helpdesk for every question you have. If you look in the electrical forum, nearly half the threads there are you asking questions about your own side projects, many of which have little to do with FIRST other than the fact they are robotics based. Learn to use google - there are tons of people out there who have done much of the stuff you ask about before and have written about it.

You really need to grow up a bit before you can expect people to put time into responding to your posts anymore.

sciguy125
11-09-2005, 14:21
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 (http://www.chiefdelphi.com/forums/showthread.php?t=38562) 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 (http://www.chiefdelphi.com/forums/showthread.php?t=39007) was simply "what is I2C?" You later followed up (http://www.chiefdelphi.com/forums/showthread.php?t=39158) 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 (http://www.chiefdelphi.com/forums/showthread.php?t=39424). 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 (http://www.chiefdelphi.com/forums/showthread.php?t=39452). 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 (http://techchallenge.thetech.org/). 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.

John Gutmann
11-09-2005, 14:57
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.

BrianBSL
11-09-2005, 16:20
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.

sciguy125
11-09-2005, 17:09
OK. your acting like I know nothing about electronics, I know way more then you think.

I wasn't questioning how much you know, just what you know. I didn't mean to insult you by saying that you should go back to resistors and caps, I was just using that as an example because I have no idea where you are. But again, you didn't really give us any indication of what you know. Like I said, we all have to work on common ground. If you ask me the proper way to merge onto the freeway, I'm going to assume that you know how to operate the car, unless you tell me otherwise. If you didn't know how to use the car in the first place, you'll probably get discouraged when my instructions don't help you.

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

Go to the grocery store and buy a box of Hostess individually packaged cake products. Stuff as many cakes into your mouth as you can. It might be fun and taste good, but you won't be able to chew and swallow it. There's a difference between having a challenge and doing too much. If you want to learn how to use a computer, you don't try learn C++ if you've never touched a keyboard before. You have to take it a little bit at a time.

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 was refering to building knowledge. You can't learn how to write until you know how to use a pencil. In your specific situation, you can't learn how to program something until you know how it works.

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.

John Gutmann
11-09-2005, 17:12
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.
when did i say i think i am an expert???? i never said anything like that, i do not have a super ego, i am just saying as far as I know i am the only one in my school that is that interestedin electronics and i am the only person i know that knows that much, mechanically i am not, but everyone I know in robotics just knows how to assemble the electronics system, which is basically just following a schematic

John Gutmann
11-09-2005, 17:14
I wasn't questioning how much you know, just what you know. I didn't mean to insult you by saying that you should go back to resistors and caps, I was just using that as an example because I have no idea where you are. But again, you didn't really give us any indication of what you know. Like I said, we all have to work on common ground. If you ask me the proper way to merge onto the freeway, I'm going to assume that you know how to operate the car, unless you tell me otherwise. If you didn't know how to use the car in the first place, you'll probably get discouraged when my instructions don't help you.



Go to the grocery store and buy a box of Hostess individually packaged cake products. Stuff as many cakes into your mouth as you can. It might be fun and taste good, but you won't be able to chew and swallow it. There's a difference between having a challenge and doing too much. If you want to learn how to use a computer, you don't try learn C++ if you've never touched a keyboard before. You have to take it a little bit at a time.



I was refering to building knowledge. You can't learn how to write until you know how to use a pencil. In your specific situation, you can't learn how to program something until you know how it works.

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.


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

sciguy125
11-09-2005, 17:42
exactly what i am doing is trying to get a 16F84 microcontroller to work
That still doesn't say much. I refer you to a problem that I had with my car last year. If you feel the need to read it, the details are on this (http://www.mpvclub.com/forum/viewtopic.php?t=7129) forum. Essentially, my suddenly car died while I was driving it. If I had gone to the forum and said "My car died. Help me fix it." I wouldn't have gotten much of a response. I gave the year and model and a description of the problem. I also took it upon myself to run some diagnostics to get more info about the problem. Without this info, nobody could have helped me unless they were sitting with me and my car to see it for themselves. Unless you can find someone in your area, none of us can help you like that.

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?

John Gutmann
11-09-2005, 18:02
That still doesn't say much. I refer you to a problem that I had with my car last year. If you feel the need to read it, the details are on this (http://www.mpvclub.com/forum/viewtopic.php?t=7129) forum. Essentially, my suddenly car died while I was driving it. If I had gone to the forum and said "My car died. Help me fix it." I wouldn't have gotten much of a response. I gave the year and model and a description of the problem. I also took it upon myself to run some diagnostics to get more info about the problem. Without this info, nobody could have helped me unless they were sitting with me and my car to see it for themselves. Unless you can find someone in your area, none of us can help you like that.

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?

-I open the Program
-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

sciguy125
11-09-2005, 18:14
-I open the Program
-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

I'm not aware that you can paste. I've attached a screenshot of IC-Prog. Do you have the correct program?

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.

John Gutmann
11-09-2005, 22:23
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

Mike Betts
11-09-2005, 23:50
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

sciguy125
12-09-2005, 00:15
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.
Yes, I believe you're right. I vaugely remember using it. It will let you set individual output lines. Thanks for correcting me, it's been awhile since i've used IC-Prog. I do remember a program that is able to determine the device in the programmer though. But, I don't remember what program it was. It had a "detect" button that would figure out the exact chip (PIC16F84, PIC16F877, etc.).

John Gutmann
12-09-2005, 16:52
what excatly do you mean by my programming environment?

Mike Betts
13-09-2005, 01:44
what excatly do you mean by my programming environment?

Sparks,

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

John Gutmann
13-09-2005, 16:22
emachines, intel cerleron D processor, 2.833 ghz, 256 MB ram, serial port(com4),

BrianBSL
13-09-2005, 17:23
emachines, intel cerleron D processor, 2.833 ghz, 256 MB ram, serial port(com4),

Is it a usb to serial converter, or is the physical port really com4? Usually physical ports are com 1 and 2, or com 1 and 3 if com 2 is used by a modem. If you haven't done anything else using com4 before, you might want to double check that.

John Gutmann
14-09-2005, 08:20
it is a physical port, i have i think 6 serial ports on my comp

Mike Betts
14-09-2005, 08:50
it is a physical port, i have i think 6 serial ports on my comp

You very likely have 6 USB ports.

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

sciguy125
14-09-2005, 09:24
To add to Mike's description:
serial port (http://images.google.com/images?q=serial+port&hl=en&btnG=Search+Images)
USB port (http://images.google.com/images?q=usb+port&hl=en&btnG=Search+Images)

John Gutmann
14-09-2005, 16:07
yes i know the difference, and i have 4 serial ports the other 2 are joystick, and no i have 8 usb ports

Mike Betts
14-09-2005, 17:25
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:


"if you were in the middle of something, your information might be lost"

then IC-PROG just freezes :(

Even though you claimed to have followed directions in an earlier post, I'd like you to do the following:

1. Download and unzip this (http://www.ic-prog.com/icprog_driver.zip) to the same directory as icprog.exe is in.
2. Go here (http://www.ece.utexas.edu/handson/robocar/testprogrammer.htm) 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

John Gutmann
18-09-2005, 00:11
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

sciguy125
18-09-2005, 01:06
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
I don't think the programming circuit needs it, but you will need a crystal to run the chip after it's been programmed. Do they have a Fry's in your area? I think they might only be in California, Texas, and Nevada though... If there is one, they'll have it, but it'll probably take you awhile to find it in their store. (I hate Fry's almost as much as I hate Radio Shack) What about some sort of surplus electronics store? There has to be some other electronics distributers in you area. Don't look at me funny. I live in Silicon Valley and there's practially something on every street corner.

John Gutmann
18-09-2005, 10:15
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

sciguy125
18-09-2005, 11:50
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

John Gutmann
18-09-2005, 12:21
oo
I have never thought of using google for that
i am checking it out now