K8055 Digital Input Counter Performance

Hi,

I wish to use the K8055 digital input 1 to count tachometer pulses. The maximum frequency of these pulses is around 1.5kHz. However, the counter in my demo application freezes at around 200 Hz.

I have examined the input pulses with a scope on both the ULN2803 and the input at the PIC, and the signal is very clean. I only need to read the counter value about four times a second, but I need a reliable pulse count.

What is the maximum frequency the K8055 counter input can accept?

What are some tips for achieving this performance?

Are pull-up resistors needed?

Are the internal counters on the PIC much affected by other signals connected to the K8055? I have tried it with just the tacho input and ground connected.

I am using VB6. My understanding is that the counters are internal to the PIC, and not affected by the DLL and other software. Is this correct?

Many thanks

When the debounce time is set to 0, the max counting frequency is about 2kHz. The duty cycle must be in that case 50% (both the positive and negative period >250us).
Maybe your tachometer outputs very asymmetric wave.

The other inputs do not affect the operation of the internal counter but the requests from the PC may decrease the counting accuracy at the highest frequencies.

Thanks for your help with this. I have put the tacho input through a schmitt trigger (7414), but the result is much the same, even though the pulse has 50% duty cycle.

I have temporarily solved the problem by using a divider to divide the pulse frequency by 8. However, any further thoughts on how to solve this would be appreciated.

Kind regards,

John Orme

Have you used the demo program and set the debounce time to 0ms?

Or are you using your own VB6 application? Have you send the command to set the debounce time to 0 ?

SetCounterDebounceTime 1, 0
SetCounterDebounceTime 2, 0

I made a test with a signal generator and the demo program and it counts correctly the pulse count up to 2kHz.

It is very strange that you have to divide the frequency by 8.

John,

I’m working on a similar hobby project… would you mind sharing what you are using as a pulse counter and a possible wiring diagram… or any other information you can share?

I’m looking at using a very high resolution pulse counter… 1024 cpr @ maybe 0 to 20 revolutions per second… I was hoping I could keep dividing the counts as speed of my encoder increased? I don’t have much experience building electronic circuits. Is it possible to use the digital outputs to turn on and off dividers, which I think are some kind of flip-flops?

Any other possible solutions?

Thanks!
Robbie

For a while, I had worked around this problem by using a count divider circuit, which was not ideal.

Recently, I had cause to rebuild the PC and reinstall the velleman software. I was surprised to find that everything was working OK. At this point I checked the DLL versions.

The DLL dated June 29, 2003 seems to work OK, but the DLL dated Feb 19, 2006 has the problem with the counters freezing.

Regards,

John Orme