Search Engine www.edaboard.com

Counter Avr

Add Question

35 Threads found on edaboard.com: Counter Avr
Can you please explain what is pooling delay? Your way or coding is completly wrong. ISR should be performed as fast as possible. You only can read the input register, put the data to input buffer, increment index counter and possible start timeout timer. When buffer if fullfilled, the routine should report the err
HELLO. I wrote a code to atmega8 to Clear OC2 pin of avr in frequeny of 8MHZ AND i set cs20 of timer2 in no prescaling (clk of timer==clock of cpu);here is code but when i run this in proteus and use counter Timer component in proteus to measure Frequency of OC2 PIN IT SHOWS 31.25KHz it means that==>> 8MHz/256=31.25KHz but i chosen Timer1 clocl=
I have some problem with UART communication bettwin two avr micro-controller,I am using Microbasci For avr and two side code are here: ***Transmitter Side:*** program MyProject ''symbol Key0 = PORTB.0 ''symbol Key1 = PORTB.1 symbol MYDELAY = delay_ms(100000) dim uart_rd,counter,error_,error,cnt_whi
I don't know BASCOM avr programming. I don't have that Compiler. Where is your Timer Interrupt Routine ? Timerx and Global Interrupts have to be enabled and a counter has to be incremented in Timer ISR on every interrupt. When count reaches 200 you have to toggle an LED or do whatever you want.
hi all I'm want description of the timer counter avr which this timer counter 8 bit and consist of 3 part 1.counter 2.comprison system 3.waveform generation system by pwm designed in verilog help me thanks
Well it looks like the counter is controlled by a custom die IC. I am guessing it has no communications in or out of the die other than the buttons and the actual pins for the LCD. I would suggest desoldering the LCD and start looking for a part number or reverse engineering the pinouts.
The simplest way you can use is with a counter inside main unsigned char counter=0; while(1) { if (counnt_enable==1) { delay_ms(1000); counter++; if (counter==1) --blink led1-- ; if (counter==2) --blink led2-- ; if (counter==3) { --blink led3-- ; (...)
Your code is using timer0 which is a 8bit counter. Use timer1,3,4,5 which are 16bit counters
just wanna share this. i got it working but the problem is that its not *that* precise, but its okay for a start, i guess.. the code #define F_CPU 8000000UL #include <avr/interrupt.h> #define USART_BAUDRATE 9600 #define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1) #include #include<avr/io.h> #include
hi.. i m using atmega16 and atmega8.. i m counting some external pulse from optical detector(optical interrupter) but it giving o/p in high as 3.5v and low as 0v. i want to know what is the logic volage level for counter in avr mcu... i mean what is the minimum voltage required to make logic1 for avr???
hello all, i m making small project, digital speedometer for my bike. I want to use REED magnetic switch to detect the pulse from wheel. But i m stuck in timer. I want to use timer as it generate 1Sec interupt and another timer as counter to count pulse form reed switch. can anyone help me to make code in bascom-av
i need help in write code. how to set counter, to count external hardware pulse?? at rate of 1Hz. i need code for Bascom-avr. i want to make digital speedometer using ATmega16 and reed-relay switch(for counting rotation of wheel).
you are required 2 design decimal counter that counts from 0 to 99 and repeat. the desgin must include only the microcontroller and two seven segment display and other assistand hw. "u r not required to use a bcd 2 7-sgmnt decoder or any other logic converters" the two 7-sgmnt must be connected to the same port any idea
is there any way to reading and writing program counter of micro directly?
hey guys plzzzzzzzz help me out i want to learn these timers and counter application of 8l microcon. but unable to understand if you have some links or some simple programs to learn it plzzz share it with me thnxxx in advance ..... :-|
My counter is displaying random values. Can anyone guide me ..i need to know where i am going wrong?reply asap. #ifndef F_CPU //defining CPU clock #define F_CPU 16000000UL // setting clock frequency for Atmega 16 #endif #include<avr/io.h> #include<avr/interrupt.h> #include #include"LCD_mega16.h" int main(void) (...)
i want to make a counter with seven segment that : dont use arm or avr or other kind of microcontrollers it has a button for increasing the 7 seg number it has restart button it has 4 sevensegment and it should be noise protected so could sb help me plz :?:
A simple way to set the clock is to apply a faster clock than 1Hz to the seconds input counter. If you apply 60Hz, the minutes will advance once each second. With 3600Hz, the hours will advance once each second. You could also apply a 1Hz clock select at the hours or minutes. You could use one switch to enable the fast clock to set the hours an
Maybe because the initial value is 20 static volatile uint16_t freq_pb0=20; so the first counter cycle uses that value. If you want people to read you code you should comment your code, indent it properly and use a C code syntax highlighter. Alex
12000 Revs Per Minute = 12000/60 = 200 Revs per Second. = 0-> 200 Hz counter. Any counter will do this. Frank
avr Freaks #include <avr/io.h> int main() { //Set up the PWM signal (page 118-119, ATmega8(L)) //The PWM signal is triggered when Timer/counter register = Output Compare register. (TCNT2 = OCR2) //attemtp to make the signal 1MHz // Clk/(2*Dividor*(1+OCR2)) // 3.6MHz/(2*1*(1+1)
Maybe you could use an external counter? Like the MC14060 14-stage binary ripple counter with on-chip oscillator buffer. You can use up to a 12MHz crystal with that.
hi i want to build a high acuracy frequency meter with ATmega16 in the range of 50 HZ to 100 KHZ. about high accuracy i mean about 0.001 or 0.01 HZ. I built vary frequency counter already but they haven't high accuracy . help me how i can do it?
Hi every body ! i have a project with 8051 . I want to design a tachometer . Many people use pic or avr but with me , i'm a newbie so i start learning MC with 89s52 and use assembly for programing . Program button and lcd is so so ! But i have trouble with counter in 8051 . Please show me how to count pulses in 1s -> pulses in 60s
hello. I have a problem with counter/timer0 of the atmega16 avr. I wrote a simple code in codevisionavr and then simulate it in proteus. but the timer doesn't count up to 0xFF. I don't know why ? my code seems to be right. in proteus I put a atmega16 in designer windows. then set the CKSEL Fuses to "internal RC 8 MHz" oscillator. then (...)
hi i want to build a counter for my ecg(ekg) final project. i want do it whit " avr ". please help me ! i have a analog output in my schematic. how can i do this? can i do this whit " oc1a & oc1b " pins ? tnx ( sorry about my bad english )
Thanks, i fix my problem
Why don't you use a built-in Brown-Out-Detector (BOD)? A year ago I got a destruction of Flash in avr. It was caused by spikes in power - the program counter pointed to a random address and avr started to fulfill wrong instructions. I suspect you met the same problem.
Hi everybody, Is there any C-code (just for learning purpose or example codes) for avr controllers in order to program PLL from analog devices (specifically ADF4106 or ADF4107)? I want some idea about the programming structure of PLLs in C. I mean how to set the counter, timer for Current steering, etc.... I have gone thru the datasheet of
i need to make frequecy counter in 8051 for guitar tuning project... plz help me with the code...?i tried with timer but the code did work and couldn't count the frequecy for only 1 second?? thank you
what feature of the avr 2313 is best for counting pulses from a hall sensor to calculate distance traveled (odometer)? I'm just beginning to learn to asm.
Any counter with standard gate time 1s or 10s has low resolution so the high precision frequency measurement can not be acheived. Better results can be acheived by measuring period duration with high frequency clock. Period duration must be then converted to frequency.
A simple software counter is OK as long as pulses don't occur too fast; if the pulse drives an interrupt, you could maybe count to a few 100kHz without too much trouble. However if there's any risk of a second pulse occurring while the interrupt from the first is still being serviced, you will silently lose counts. To reduce the risk of this, y
If you have watchdog in your mcu , make active it , and start counting where counter is in memory location In avr watchdog is supplied from different oscillator . You should check watchdog implementation in your mcu for that . When watchdog reset will be happened get the counter value . Using precalculated counter values (...)
Need a kind diferent pulse counter. It may have a PIC or an avr or even discrete CMOS/TTL ics. It must have two lines with 4 digits each line, one for total counting and other with sub total. Each line must have a separe reset or the reset for subtotal desn't clear the total counting line but when you reset total both lines are cleared. When it sta