Search Engine


Add Question

Are you looking for?:
8051 timers , 555 timers , projects for timers
447 Threads found on Timers
The suggested multi-period measurement is performed by most industry standard frequency meters. It can be implemented with the capture feature of microcontroller timers.
I am using PIC12F1840. INTRC 4 MHz. I want variable frequency and variable duty PWM. Freq range is 9 Hz to 14 Hz and duty 0 to 100%. Can I use Two timers and a Pot to make Variable PWM ? or do I need Two timers and two pots ? Pots are used for ADC. ADC value is converter to timer reload values. I am planning to do like this. 1. Enable t
Hello! There are many things to be better explained. 1. What kind of switch is it? Is this device external to MSP430? If yes, how tis it controlled? By one bit (GPIO)? By SPI? etc... 2. If you provide a timing chart describing exactly what you want to do, it would be quite easier to reply. 3. There are expressions that need to be better expl
So, if I want to program Microcontrollers, should I know all of their registers? and If I want to choose another micro from other companies, I should learn all of their registers too from the first? You firstly need to know the main registers, usually related to timers, Watchdog, Pinout, etc... As you start managing the builtin peri
Hello Specify what is your FOSC value ? it is the key point to define Prescaler,initial value ... init of timerX you allways can build an elementary Time from each timers for example 100mS After count the events ,into the interrupt treatment How many subtime do you want to arme a flag 10 times 100mS for 1sec or 20 times for 2sec example [COD
How can i generate pwm using timers
Hi, Based on the example projects I tried working on timers in lpc2148 and set the time for 5 minutes duration to test, but it's not working. So checked in the debug session in keil ide there in the peripherals checked the Timer0 block there TCR and TC registers are enabling and resetting with the step by step execution. Below is the part
Arduino != PIC Almost any PIC can be used although one with a hardware PWM module makes life easier. If that's all it has to do, I suggest using PIC12F683 which has the necessary timers to decode the IR signal and has a PWM module. It only has 8 pins and has it's own internal clock generator so the hardware around it can be very simple. Brian.
when i enable any one timer ISR function works fine. But when i enable any two/three timers in main function ISR and other codes misbehave Not clear what exactly do you mean by "misbehaving", anyway the content itself of each interrupt routine may affect the overall working of the code. I'm assuming you suppr
Ok For 3 phase motor control pic18f4550 is insufficient because 2 phase pwm generation is possible but for 3rd phase you have to use timers. Till now are you able to generate 3 pwms ? If yes then you can go for V/F ratio.
hello and thanks for trying to help, im looking for a working already written code that allows you to write text like"HELLO EVERYBODY" on the msp430fg4618 lcd. ive seen timers and all kinda lcd applications i need only basic modifications of the code . thanks again, daniel
You can use XMega parts with big success. PIC controllers divide the clock on 4 to execute instructions (so 20 MHz clock results in 5 MIPS performance) where AVR parts use directly the clock - 20 MHZ results in 20 MIPS. So even smaller AVR controllers like ATMEGA88 which run on 20 MHz can outperform the PIC18F252. AVR timers are more complex than P
As you know in the last CMSIS drivers we configure EMC,timers & ... with thier own CMSIS drivers while in the latest CMSIS drivers which i downloaded with KEIL 5.16 there are not any library for thems,like: lpc177x_8x_emc.h lpc177x_8x_clkpwr.h lpc177x_8x_timer.h lpc177x_8x_exti lpc177x_8x_adc lpc177x_8x_wwdt then how i must
Hello, I'd like to configure two timers with stmcubemx. I configure timer TIM2 as gated mode with trigger source from TIM3. Timer counts impulses from ETR2 external clock. Now I'm not sure how to configure TIM3. I set 'Clock Source' as Internal Clock but what should I set as trigger source so that I could recieve PWM at Channel3 output?
I am interested in supplementing a low-power microcontroller (MSP430) with an FPGA (undecided) to add 8 custom timers Why don´t you simply insert an IP microcontroller core inside the FPGA with as many timers as you want, so that you can take the estimation of the power consumption of whole circuits at a singl
The basic sequence can be programmed with a chain of timers (e.g. on-delay timers) and some additional logic. Timer blocks look slightly different in each PLC vendor's tool, you should review the documentation of yours. I guess there are also programming examples in the manuals, otherwise you'll find plenty of ladder tutorials on the net.
While FenTrac's recommendation for utilizing the device watchdog timer is certainly valid, if you find the system repeatedly suffers from such "lockups" then it would be prudent for you to determine what exactly is causing the issue and modify the code or hardware accordingly. Watchdog timers are intend as a last resort "fail-safe" when the unexpec
what is the difference between hardware watch dog timer and software watch dog timer?
Can't be answered without talking about timing accuracy first. Precise analog timing in a second range can be only achieved with film capacitors. If you don't worry about some ten percent variation over temperature and between production lots, electrolytic and high permittivity ceramic capacitors can be used. But since decades, precise timers are p
When you are a beginner, gobs of function get lost when reliability is a problem due to fine details difficult to communicate. Digital timers mass produced make it easier to integrate. Consider a furnace digital thermostat with programmable setpoints daily. The contact closures are usually rated for low voltage , but sufficient to drive Triacs o
Assuming you have your compiler and linker already set up to compile/build and upload the code and you don't need much. Once you are in the main function, set up the output pin (i.e. via the direction register) and toggle it after a delay of 100us. A much better way is to use hardware timers, which allow you to configure a couple registers to gene
I did not take a look on the code above, however I can´t see much issues in generating DTMF tones, if there is available 2 timers to store the fundamental frequency of each tone. Just reload the timer register accordingly.
Basics: 1. set port pin(s) to output mode so you can control the LED 2. configure a timer, TMR1 would be best choice in your application because it has 16 bits so can be used to create longer delays. 3. configure the source to the timer, internal clock or external clock and set the pre-scaler to a suitable divisor. 4. timers count UP and it's easi
This is an example of my Multithreading application program. Since the actual code is too big i have attached here a small part of the code.. Actaully i am controlling three threads through TIMER0 Interrupt such that each thread is called for t=70 that is 10ms approx. everytime,.. But i have to switch on TIMER0 only when a Microocntroller receives
Hello! You don't say what is your "desired output", so it's difficult to fix it for you. Beside this, in the case you want to generate 2 PWMs at 180 degrees (like sin and -sin), why don't you just invert one signal instead of bothering with 2 timers? Another thing. Why this while loop in the interrupt function? You get interrupts at regular
I want to create C code for measuring the time of an event without using timers of any particular micro Controller The original question should be reformulated, due to even operating under some RTOS, the system much likely would stay still dependant of an internal timer to supply the tick cadency.
URL spitted out by google seems really helpful regarding timers in STM32 Try the sample program there. Also do specify other data like Pulse width, and periodicity of the output pulse that will help us to help you further
Hi, clearly, the LPC21XX is not supported much on the net. There are very few books about it. I would like some exercises involving GPIO, Interrupts, timers, ADC, UART etc. to give my students in order to start practicing on their board. Currently I am using the LPC2119 from futurlec. Regards, jonny
hello, i think 50Hz frequency for PWM control is outside of spec of CCP module... or decrease the FOSC ... or you simply can use timers .. to built your commande.
does timer1 is ok? In AVR, PWM Mode is available in all timers. TIMER0 and TIMER2 provide 8bit accuracy whereas TIMER1 provides 16bit accuracy. In 8bit accuracy, you have 256 individual steps, whereas in 16bit accuracy, you have 65536 steps. which mode is better ? If you want to control the speed of DC motors
hi, You should find this link helpful for PIC Timer operation. E
I have (about 22) momentary SPST switches which I want to control corresponding relays ( And I want the relays to fire for 3 seconds). I saw a one shot monostable multivibrator circuit Consisting of a 555 and two resistors and two capacitors. So 22)555s and 44) resistors and 44) capacitors should do the job nicely. My question is can I do this
Hello all, there are quite a few topics on timers but I couldn't find the one that fits my project. I hope someone will provide a proper circuit diagram. I have used NE555 before, but I do not know how to design circuits. Anyway, here's what I need: 111702 I hope that explains it well, SW1 and SW2 will never be c
timers (when set up properly) count pulses from either an external source conneced to a pin or from the PICs own internal clock. You don't need to increment or decrement them in your code, just check the value in them and it will change by itself. Typically, the way they are used is to load a value into them then go into a program loop waiting for
I suggest to go for STM8 or STM32 Cortex M0 family. They have 3phase Motor Control PWM timers and 12 bit ADC. I think best microcontrollers - low cost @ high performance.
Yes, ECCP has the same functionality. But 0.5 Hz is beyond the minimal frequency of most PWM timers. Slow blink action can be better performed in periodically executed code controlled by a timer tic.
lpc2129 and lpc2148 belongs to which family ? then do the peripherals in both controllers have same functions if they available in both ?for eg timers,uart etc.. what all the header files comes in both controller? Both LPC2129 and LPC2148 are based on the ARM7TDMI-S core architecture and members of the LP
As KlausST said, the maximum number is the difference. I don't know how your program is, but the timer size can change the working principle. One way to measure frequency is counting pulses (with timers) and reseting the count every a determined time. If you know how many pulses has been in a time period you know the frequency, basic mathematics.
This will end up being slower than the internal PWM hardware. Have you tried to see what F you need and what pre-scaler changes can be made to default counter clock? For standard Arduinos the system clock is 16MHz so that the timers are clocking at 250kHz by default. Phase correct 8-bit PWM mode takes 510 clocks to cycle and fast 8-bit PWM mo
I note that you are calling the function RunCountdown() from the interrupt service routine which is not recommended - you should keep your interrupt service routines as short as possible because you may be missing interrupts - this could give the effect of timers appearing to stretch out the interrupt service routine can use a flag (a glo
hi nea, Download this free loops tool, very useful. Also I would use one of the PIC timers with an interrupt for generating the Freq. E
hello, I wrote a little program to do a 50Hz square wave, with adjustement of duty cycle from 2%up to 98% so 50Hz is periode of 20mS.. dedicate for Radiocommande Servo written in MikroC and using 2 timers , duty cyle made by a potentiometer -> analog value 0 to 5V -> ADC input of MCU. have a look
How do I start learning about microcontrollers? Which platform do you suggest? I can hear experienced regulars and old-timers groaning :) and I don't blame them. These questions must have been asked and answered in this and other forums over and over again. However, my situation is probably a bit different from that of most other beginners. So p
i am Generating 1 second delay using timers in 8051 my concept is like this iam using 11.0592 crystal frequency time required for 1 machine cycle is1.085 micro second if timer is set to 0000h then time required for timer to run once is 65536*1.085= 7.11 ms now if 7.11*142(times the loop runs) = 1000ms=1sec so here is my code [syntax=
Timing delays with software integers is a bad idea. You should use the dedicated timers/counters on your MCU.
hello, I tested the soluce with 2 timers Timer0 interrupt every 40?S Timer1 interrupt every 20mS ADC reading is done inside Timer1 interrupt ,wich arme Output RA4 to 1 and Output RA2 to 0 Timer0 count until it reach the value of ADC divided by 2 .. so 0 to 512 and some limits are applide on duty value : mini=10 and maxi=490 During my
i am now getting started with AVR atmega8 12mhz crystal so as i was learning about timers. my doubt is : suppose i want use timer-0 with no prescaling then total counter value=255. so the max delay is 255*(1/12mhz)=21.25microsec. suppose i want to blink leds on portb with delay of say 2 seconds so can i just do it without using pre
Maybe you haven't done a thorough job of porting the code. Are the timers still running? The OS needs the timers to be running (and generating interrupts) to know to switch tasks. If the interrupts aren't properly cleared/re-enabled in the ISR, then simply exiting the ISR and returning to whatever task/function that was on the stack when it wa
This should be
hi friends, I am new to arm .i had just tried gpio programs in lpc2148 and successfully got the output, now i need to try blinky programs by using arm in build timers. please guide me to calculate for 1 second delay by using timer 0,i had gone through the registers in arm . but i need to familiar with pll and calculation. ide -keil ide