Karen, don't be too hard on them. By nature, we (PIC'ers) want to fix every problem in the world, even if it's not broken. They meant well and I don't think anyone thinks your project is stupid. Chock it up to TGIF brain fog!
Karen, don't be too hard on them. By nature, we (PIC'ers) want to fix every problem in the world, even if it's not broken. They meant well and I don't think anyone thinks your project is stupid. Chock it up to TGIF brain fog!
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
I compared my satnav against my speedometer and found it to be 5mph different. Unfortunately i dont have access to police speed checking devices unless i want to pay a fine. Come to think of it i cant remember how i worked out my speedometer was 2mph out. I do remember that it was about that though. Obviously it is just "about" i dont have a way of testing things accurately.
My satnav is usually connected to about 5 satellites at a time but i have noticed that even a little bad weather can cause problems. I dont think its that reliable and my satnav is supposed to be one of the best ones out.
Why exactly do you need something thats more accurate than a speedometer? I can understand if you would rather see a number instead of a dial but why go to the extreme of GPS?
I understand that wheel size and tyre pressure can affect your mph but i thought you should have it callibrated for different wheel sizes. as for tyre pressure i dont think it will affect it that much. Will your display have a decimal point? Can it display "10.54mph"? Unless you have a decimal point then i dont think it would make a difference
Question : Can you get a pic to do more than one thing at once?
Definitive Answer : Yes and No (answers like this is a girl thing).
Explanation : The PIC can ONLY execute one program instruction at a time at any instant in time. So technically the answer is NO. However there are two riders to this...
1. Some PICs are packed full of additional hardware. Those hardware elements operate independently from the controlling processor (although they may be synchronised and share things like the clock). So, YES, you can SIMULTANEOUSLY perform an ADC operation, Hardware PWM, Comparator Function, Capture Compare, SERIAL I/O, Op-Amp operation etc etc (providing you have a PIC with the appropriate hardware built-in) whilst your software is doing something completely different AT THE SAME TIME.
2. Whilst I said that the PIC can only execute one instruction at any given instant (and this holds true) the definition of an 'instant' is something else altogether. If you now define 'an instant' to be 1mS (one millisecond), a 40MHz PIC can execute 10,000 instructions in that 'instant'. To the casual observer, the PIC can be handling multiple software tasks simultaneously, in truth though, it is still only doing ONE thing at a time (just happens to be doing it damn quick).
So, here is where you work out EXACTLY what you need your PIC to do, and what your particular definition of 'an instant' is going to be. That will define if you can get your single PIC to perform all the tasks you need it to in your available time slot.
Thanks Melanie, that was exactly what I was looking for and it answered all my questions in one go
I realise I've got a lot of learning to do yet as regards and interupts and various other functions, but It's given me the urge to learn a lot more and work hard at ait till I get it doing exactly what I want,
I'm reasonably good with analogue electronice and originally I was just going to do something the old fashioned way, untill I realised that If I learnt how to program I can do loads more.
By the way, sorry to all concerned if my previous post seemed to be a bit "hostile" I was getting pretty wound up with everyone assuming things and not taking any notice of what I'd already said.
Don't worry though, I wont ask stupid questions again, I'll just sit and read from now on![]()
I should probably keep quiet...but
I thought post #3 did a fair job at answering the question too.
And about the stupid questions and reading more.
If people would do that, then we would not need this forum.
Personally I am happy to see new people come in that want to learn and not just copy paste code.
As far as the accuracy of the GPS. The only way to be more accurate is to use a DGPS set up. Now that the WAAS system has been in place for a few years, I think most commercial products have that built in.
Dave
Always wear safety glasses while programming.
A PIC can indeed do several things at once. It's just a matter of getting familiar with
hardware options the PIC you're using has. Like Melanie already said, firmware is going
to execute line-by-line, but built-in hardware goodies open up a whole new avenue to
real multi-tasking. You just need to get familiar with all your options.
And don't hold back on posting or asking questions here. That's what this forum is for.
I learn something new just about every time I login here just by reading & thinking about
some of the questions asked, so keep em coming. I still have a lot to learn myself..;o}
<font color=red> <h3><b>It did seem hostile, funny thing, big red letters are like that. . .</font color></b></h3>Apology accepted!
I cannot grasp what <b>Automotive</b> purpose requires a speed measurement which requires accuracy equaling two hundred thousandths of an inch per second (5mmps), weapons systems yes, cars, no.<br>Questions are seldom stupid or unwelcome, often they are well worn due to having been asked several times in the past, but not stupid. Please ask your questions, learn from those who exceed your personal knowledge<b> and</b> from those who do not.
Last edited by Archangel; - 12th April 2008 at 01:17.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi, Karen
You seem tired ... and should rest some little time.
I was just explainng you HOW and WHY your different things could be done by the same Pic ...
By the way, add the regulating calculations to the duties the Pic will have to do ...
Will you use PID or Fuzzy to drive your Solenoïd ???
a little question :
Must I think from that it can't work in a deep forest, a narrow mountain valley, or between high buidings, ???
This Doppler shift is directly
proportional to velocity of the receiver along
the direction to the satellite, regardless of the
distance to this satellite.
Alain
PS: That's you who talked about "blondes" at first ... not me !
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
LOL
thanks everyone
The need for 100% accuracy 24/7 isnt essential, I was actually thinking of having the display so I can see when I'm getting near the speed limit the cops WILL ticket me
and
Its mainly going to be there as a backup to the actual speedo (they have been known to break) and the other reason.. is the reason someone (wish I could remember who) when asked why he did something said:
because I can.
I just thought it would be a good way of learning how several part of the pic work, how to program the various bits, see it working everytime I drive, and more important,. anytime anyone asks about it I can not only say waht it was, but also say "I did it"
yes.. I admit i'll like boasting once its finished![]()
If you are interested in accuracy, don't forget that most commercial GPS units don't display instantaneous velocity. Most of them average over a 5 second window. That is to say that what you see on the screen is the averave velocity of the last 5 seconds. The fastest it can update is once per second. If you really want accuracy and readability, make a speed pickup from a magnetic or optic sensor and put it on the drive shaft as was suggested. Then write the code to read it, translate it, and display it. If you want to split hairs, calibrate it through the operable speed range to compensate for tire expansion.
This is not PIC related, but it is an example of what can be done with a GPS head.
A while back the radio guy at work was walking all over the plant with a signal strength meter trying to map blind spots in our radio coverage. It was going to take him a month to get a minimal amount of data. I bought a Garmin GPS head with an RS232 output and fed it into the serial port on a laptop. I routed the signal strength output from one of the hand held radios into a DAQ board in the PCM-CIA slot and wrote some labview code. All he had to do was put the laptop, GPS head and radio into a car and drive around the plant. The code sampled position and signal strength and plotted a colored representation of the signal field overlaid on a map of the plant property. It took about 3 days to put it together and write the code and about 30 min for him to collect all the data needed. If you really want to interface the GPS with the PIC, I suggest you use a 16F876 and get a GPS head with an RS232 output. The NEMA format is real easy to handle.
Edward A. Nauman
Senior Staff Engineer
Lockheed Martin Aeronautics
"The Skunk Works"
Mail Stop 0157
1011 Lockheed Way
Palmdale, CA 93599
Voice: (661) 572-7350
Fax: (661) 572-3507
Cell: (661) 305 7636
Bookmarks