Also, Microchip appnote DS41214A (CCP tricks and tip) is also a good reference
Also, Microchip appnote DS41214A (CCP tricks and tip) is also a good reference
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
mmm another idea here, as you already have something workable, you can probably modify it. Is this a Cable system? If so, you can probably modify the dash end and attach a Optical Encoder to create your VSS signal. Optical encoder OR Using some optocoupler stuff.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
mataston
If you have the pulse already and it is 5VDC, you can use the PBP to read that port (make it an input) and debouce it (hard way). I have been told PBP has interrupts. So the best way, is to use the hall effect device to trigger an interrupt pin on the PIC and your interrupt routine to count the turns, when you hit the mile number, you increment the mile counter and clear the hall effect counter. You will have to find a mile road, run down it and get the count for when you reach a mile for your base number.
Last, you will want to write the number (of miles and if you want to be closer on real miles, save the current hall effect count) in the EEPROM of the pic chip. Then you can kill the power and the numbers (miles and last faction of a mile) will be there next power up. So when you power up you will want to read them back, and keep adding to the counter and the miles counter.
Do you have the schematic for this items. I would be happy to look at it and help.
Also, you only have so many write to the EEPROM, and on the PIC it is fair, not great but a big number (maybe 100,000 writes). You also need to determine when to write the number to the EEPROM. I would say everytime you are not moving (no pulse for so many seconds), and set a variable so you only write it only once until you are moving again.
IMHO, i would avoid to write too much to the EEPROM and avoid to reduce his lifetime.
2 Possible solutions:
1. write to EEPROM when you remove the key from the ignition switch. You must have a switched 12 volt and a constant 12 volt routed to your cluster..
2. Write to the EEPROM only when the battery is disconnected. For that you'll need to add some extra hardware but not impossible.
Option 1 is still good enough to me so far
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
In My Humble Opinion.
Here's a link wich explain some of the common chat abreviation => http://www.stevegrossman.com/jargpge.htm#Dictionary
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Originally Posted by mister_e
I think U cant make odometer with just Hall sensor. What U need is Quadrature optical unit. By this U can sense whether car is going forward or reverse!!
Unless U want the reverse distance travelled also added. With quadrature opto unit and 2 JK flipflops U can generate + & - ve pulses per
revolution and then just count them and divide by pulses/mile or Km whatever
is Ur unit. Also then U can calculate the speed also to be alternately displayed. All cumulative distance should be written to EEPROM when switching off occurs and read again after next switch off.
I leave it to masters for genarating code on this line. I have serviced
such Odometer used in runway painting. It was based on Z80.
Last edited by psdayama; - 2nd June 2006 at 13:14. Reason: Forgot email notification
i can still use a hall effect, basicly when you put the car in reverse it activates a switch which obviously turn your reverse lights on, therefore i can use that signal to turn off the signal from the hall effect device therefore no counting while in reverse.
Bookmarks