"Norayr S. Elmayan" wrote: > > I don't know if this was discussed before, my question to you is resolution > at 4.0 Mhz. If I were to display decimal frequency in the range of 0 to > 120 Hz, the max resolution I can achieve is per bit 0.48 Hz. It means if I > were to display a decimal point, each display advancement is 0.48Hz. Is > there a way to improve this. You can improve the resolution by increasing the capture time. A 1 second capture time can give you 1 Hz resolution and 10 seconds will give 0.1 Hz. But I think you misunderstood how the system works, the count range is not only 8 bit. The minimal range is 16 bits and can be expanded by polling the TMR0 overflows which is easy because it will only occur at minimum every 1/760 second. The frequency is read via RA4/TMR0 which a pre-scaler/divider is set in between the TMR0 register. Reading the TMR0 for each second or a fixed period, will give you the frequency per time period divided by the prescaler value. To make it simple, the prescaler is set to 256 divisions, so the TMR0 can be the high byte of the 16 bit number. Reading the pre-scaler is tricky because it is not mapped as a register. The trick is self clocking, RB0 is connected to RA4 and is clocked until TMR0 changes. The value of the pre-scaler will be 256 - no. of clock pulses. I hope this answers your question. Reggie