x_ngine
Junior Member level 3
tmr-1
Hello everybody,
Since I want to learn Proteus, I'm developing simple circuits with pic 16f877a writing the firmware with Hi-tech Picc 9.50pl2.
Currently I'm trying to use TMR1 to create a 16-bit counter.
The circuit I designed is very simple: it consists in a push-button connected to RC0 with a pull-up resistor. My purpose is simply to see the increase of counts in TMR1L when I press the button.
In this situation I suppose the oscillator between RC0 and RC1 should be disabled, because I don't need to make something oscillates because I generate the "clock" by the means of the button.
The problem is that if I disable the oscillator setting T1CON=0b00000111 TMR1L is incremented twice everytime I press the button, while if I activare the oscillator setting T1CON=0b00001111 all is right.
What does the oscillator do? I can't see its role in the circuit... this is also because watching the internal scheme on 16f877a's datasheet it seems the pin RC0 is DIRECTLY connected to TMR1L without passing through the oscillator...
Help me please!!
Hello everybody,
Since I want to learn Proteus, I'm developing simple circuits with pic 16f877a writing the firmware with Hi-tech Picc 9.50pl2.
Currently I'm trying to use TMR1 to create a 16-bit counter.
The circuit I designed is very simple: it consists in a push-button connected to RC0 with a pull-up resistor. My purpose is simply to see the increase of counts in TMR1L when I press the button.
In this situation I suppose the oscillator between RC0 and RC1 should be disabled, because I don't need to make something oscillates because I generate the "clock" by the means of the button.
The problem is that if I disable the oscillator setting T1CON=0b00000111 TMR1L is incremented twice everytime I press the button, while if I activare the oscillator setting T1CON=0b00001111 all is right.
What does the oscillator do? I can't see its role in the circuit... this is also because watching the internal scheme on 16f877a's datasheet it seems the pin RC0 is DIRECTLY connected to TMR1L without passing through the oscillator...
Help me please!!