It's a regular PBP statement, but it's in an ASM block.
Move it outside the block and it should work better.
<br>
It's a regular PBP statement, but it's in an ASM block.
Move it outside the block and it should work better.
<br>
DT
Syntex error
Ohh. Sory sir, I cut yout code and paste, I don't see there are INCON
Thanks sir, It's Working
Last edited by precision; - 25th July 2007 at 12:22.
Hi Darrel,
some days ago, I was trying to measure the "ON time" of my car´s gasoline injectors (one of the 4)
I´m using a 16F877 @ 10 Mhz, and I´m using the Timer0 as a 250 ms counter and Timer1 as a pulse counter, I ran out of possibilities of new measurements.
Bruce told me that I should use a new device with more timers available, like the 18F4431 (or similar).
The problem is : This device (or similar) is not available here in Brazil, and Microchip do not send samples to Brazil.
I was reading this post about the interrupts and decided to ask :
Is that possible to read the pulses on Timer1 on a fixed time interval (so, I would have the car´s speed and the mileage) and measure the injector on-time (so I would have the consumption) with the instat interrupts running on a 16f877 ?
Thanks !
Sergio
Sure you can.
I'd use the Capture mode of the CCP modules using Timer1, for the ON time.
Timer 2 can be the timebase used to count the speedometer pulses on the INT (external interrupt) pin.
And the same signal from the Injector can be fed to T0CKI, so Timer 0 can count the RPM's too.
Speed, Distance, Consumption and Tachometer.
<br>
DT
Wow !
thank you !
I´ll try it this weekend and post the results here !
Bye !
Hi,
how i use the instant interrupt (very nice pice of code) and the write or eeprom comand. In the manual they say to turn off all interrupts. Or is there no problem to use them together?
Many Thx for reply
Bookmarks