We have to underline that it is always really important to read the datasheet before to attempt to program any picmicro even if the use of this timer is common to many microcontrollers. The use of the interrupt generated by the timer1 overflow is a quite useful procedure conceptually not so different from the timer0 interrupt but, naturally, a little more sophysticated:
Pic programming
16F877 VRef - LM35
A good setting of a reference voltage can be considered a must where precision is an important matter. 90% of projects are based assuming the VDD (microcontroller 5V power supply) as voltage reference but when the voltages to be compared are very small or the precision is a critical factor, very probably, it is better to reduce the value of this reference.
Picmicro: the comparators
The comparator module(s) of a microcontroller is quite widely used to 'compare' two different levels of external voltages or to compare an external voltage to an internal reference voltage. It is a very useful module when we need, for instance, to control an external device allowing to the microcontroller to react in a proper way when the external device reaches some conditions.
Mikroc: Adc to Volt conversion using a 16F877
Here follows an example program to convert two channels of ADC values read on Porta in Volt using a four lines LCD. The program should be reaally clear and can be easily modified for any need.
Tmr0 and the prescaler
In another article we have seen, in a very simple way, how to set the registers to be used by the tmr0 to generate and interrupt (Link). An important aspect of this timer is the right setting of the prescaler. Interrupts generated by timers are an important peculiarity of any microcontroller and are widely used in any application where the time is an important matter.
Interrupt on RB0/Int
The use of the pin RB0/Int to execute an interrupt routine caused by an external pulse is a really interesting function available almost in any picmicro. This is a really easy matter to be managed particularly using high-level languages like MikroBasic/MikroC.
More Articles...
Page 1 of 2







