The original processor does use a lot of info from the hall sensor. MANY MANY things are conrtoled by the units speed. So when I do this, it needs to be as accurate as possible. I dont know how accurate I can get this, but I know the original system keeps the speed plus a single decimal point. But, its just counting a number of gears, so I should be fine using ints and whatnot.
I did get my thoery to work. The original system has a wire going to the hall sensor that is 5V, when a gear goes by the hall is grounds that signal. Thier proc. waits for the signal to go low. That way it knows whats going on.
If I divert that signal wire to my pic instead of the hall sensor and set the output to low, it effectivly grounds that signal. I set it to float b/c I have 5V coming IN to the pic, to ground it i OUTPUT low, if I were to output high, I'm not sure what would happen. Remeber I have 5V coming in already. I might be able to set it to Input to do the same thing, but it works well this way.
So I can set the pic to make a 100Hz signal that fools the gauge to go up to 400rpm or such.
Right now I'm making the pic into an imaginary hall sensor. The final goal here is to
1.read in from a hall sensor (4 large gears)
2.multiply it by a certain coeffiecent (the origal system had 100 small gears)
3.then output the 'imagainary' hall sensor info to the processor (ie: that original signal x 25 or so, and space the output over an even time so that the % of the freq is about 50%... the 50% is b/c if I sent all the pulses out real quick, like at 10% it would spike the speed and then wait untill the next signal, I want an even flow, so there is no telling that the signal is different from the original setup)
To top it all off I need this to all be in interupts so that the pic can also do two or three ohter minor functions (if input(A_2) >> output(B_4))
I'm coding in C, but I dont even have a good algorithm to go on yet.