Ultrasonic sensors use sound to determine the distance between the sensor and the closest object in its path. The sensor sends out a sound wave at a specific frequency. It then listens for that specific sound wave to bounce off of an object and come back. The sensor keeps track of the time between sending […]
Category: Timer/Counter
DHT11 digital temperature and humidity sensor is a composite Sensor contains a calibrated digital signal output of the temperature and humidity. The sensor includes a resistive sense of wet components and an NTC temperature measurement device and connected with a high-performance 8-bit microcontroller. RT: Typical application circuit recommended in the short cable length of 20m
Let’s make a Digital Clock to display seconds, minute & hour to seven segment displays. Here 6 seven segment display are used. We make it in 3 steps. First initial timer1 interrupt at 1s delay. In this project we use ATmega32 with external crystal with 8MHz at HFUSE=0x89 LFUSE=0xEF Timer1 interrupt with 1s counting In
In this project we use IR Tx diode and IR Rx diode. The sensor circuit diagram is as follow- The RPM meter based on two procedures It is easy to calculate pulse using external interrupt pin. Let use ATmega8 for this purpose. The logic should be as soon as any falling edge is found, it
Previously we learn about timer CTC. Now what happen if we do not compare the value? In that case the timer starts from BOTTOM to the MAXimum value i.e. 0xFF (for Timer0/2) or 0xFFFF (Timer1) and that is timer overflow. In this case when the timer overflows an interrupt available i.e. Timer Overflow Interrupt vector.
This mode is similar to the normal port operation. The difference is that the compare value is store in the OCRx register instead of TCNTx. In order to use the OCRx register, the timer should operate in CTC mode, that The main program is Download the full program with proteus simulation As soon as OCRx
Timer/Counter – Clear Timer on Compare Match (CTC)Read More »
A Timer/Counter is actually a register which increases/decreases automatically according to the logic you provided. In AVR there are two types of timers 8 Bit timer 16 Bit timer Now what is the meaning of 8bits? As we already learn that 1byte is equal to 8bit. Now the formula of counting is- n bit=2^n