Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/03/03 01:51
Read: times


 
#57703 - timer2 period code problems for rpm meas
I'm a novice programmer trying to develop a racing ignition system but I'm somewhat hooped at my first hurdle, measuring the period. I do this on my spare time which is somewhat removed from my regular work. I'm writing the code in Dunfield C with some assembler routines for the interrupt handling. The problem is the period, for the most part is no way near the frequency I'm simulating. I've also made a Shmidtt trigger out of an op amp with ~1.5v hysteresis which didn't help. I'm using a P89C51RC2HBP @ 18.432MHz. Essentially the formula for frequency is 1/[(1/(18.432MHz/6)) * (starting Capture value - ending Capture value)].I do some other stuff as the Capture registers can't be reset to zero. I'm at a loss at this point and I don't want to implement this in the PCA counters. Could someone review my code to see what I'm missing?

List of 13 messages in thread
TopicAuthorDate
timer2 period code problems for rpm meas            01/01/70 00:00      
   RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
   RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
         RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
         RE: timer2 period code problems for rpm meas            01/01/70 00:00      
            RE: timer2 period code problems for rpm meas            01/01/70 00:00      
               RE: timer2 period code problems for rpm meas            01/01/70 00:00      
               RE: timer2 period code problems for rpm meas            01/01/70 00:00      
                  RE: timer2 period code problems for rpm meas            01/01/70 00:00      
                     RE: timer2 period code problems for rpm meas            01/01/70 00:00      

Back to Subject List