447 Threads found on edaboard.com: 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.
Microcontrollers :: 01-24-2017 14:12 :: FvM :: Replies: 11 :: Views: 595
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
Microcontrollers :: 11-24-2016 14:56 :: Okada :: Replies: 19 :: Views: 849
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
Microcontrollers :: 09-12-2016 01:37 :: doraemon :: Replies: 5 :: Views: 484
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
Microcontrollers :: 07-19-2016 15:52 :: andre_teprom :: Replies: 8 :: Views: 490
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
Microcontrollers :: 07-09-2016 12:58 :: paulfjujo :: Replies: 2 :: Views: 422
How can i generate pwm using timers
Microcontrollers :: 07-06-2016 12:18 :: RONY11 :: Replies: 0 :: Views: 11
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
Microcontrollers :: 06-17-2016 09:59 :: akash.v :: Replies: 0 :: Views: 292
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.
Microcontrollers :: 06-03-2016 11:11 :: betwixt :: Replies: 7 :: Views: 717
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
Microcontrollers :: 02-22-2016 16:07 :: andre_teprom :: Replies: 8 :: Views: 812
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.
Microcontrollers :: 02-03-2016 08:50 :: abc_de :: Replies: 9 :: Views: 748
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 .
Microcontrollers :: 01-10-2016 22:12 :: Whiteraven :: Replies: 3 :: Views: 442
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
Microcontrollers :: 12-03-2015 07:41 :: luben111 :: Replies: 6 :: Views: 400
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:
then how i must
Microcontrollers :: 11-27-2015 08:11 :: dizgah :: Replies: 0 :: Views: 510
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?
Microcontrollers :: 09-21-2015 19:03 :: krzysn :: Replies: 0 :: Views: 631
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
PLD, SPLD, GAL, CPLD, FPGA Design :: 08-21-2015 15:20 :: andre_teprom :: Replies: 7 :: Views: 636
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.
Robotics and Automation Forum :: 08-06-2015 23:09 :: FvM :: Replies: 2 :: Views: 860
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
Microcontrollers :: 07-27-2015 19:20 :: bigdogguru :: Replies: 2 :: Views: 848
what is the difference between hardware watch dog timer and software watch dog timer?
Microcontrollers :: 07-22-2015 06:27 :: K Srinivas Pavan Kumar :: Replies: 5 :: Views: 487
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
Elementary Electronic Questions :: 07-21-2015 08:54 :: FvM :: Replies: 5 :: Views: 590
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
Hobby Circuits and Small Projects Problems :: 06-25-2015 21:36 :: SunnySkyguy :: Replies: 3 :: Views: 919
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
Microcontrollers :: 06-01-2015 12:25 :: allsey87 :: Replies: 2 :: Views: 648
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.
Microcontrollers :: 05-21-2015 14:19 :: andre_teprom :: Replies: 14 :: Views: 2842
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
Microcontrollers :: 04-26-2015 08:38 :: betwixt :: Replies: 5 :: Views: 638
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
Microcontrollers :: 04-14-2015 09:21 :: kunal5959 :: Replies: 1 :: Views: 715
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
Microcontrollers :: 02-28-2015 01:49 :: doraemon :: Replies: 1 :: Views: 636
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.
Microcontrollers :: 02-25-2015 16:07 :: andre_teprom :: Replies: 5 :: Views: 469
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
Microcontrollers :: 02-19-2015 17:04 :: jeffrey samuel :: Replies: 1 :: Views: 736
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.
Microcontrollers :: 02-13-2015 18:09 :: jonnybgood :: Replies: 0 :: Views: 427
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.
Microcontrollers :: 01-23-2015 15:21 :: paulfjujo :: Replies: 2 :: Views: 1373
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
Microcontrollers :: 01-17-2015 13:24 :: ud23 :: Replies: 2 :: Views: 696
You should find this link helpful for PIC Timer operation.
Microcontrollers :: 12-21-2014 09:15 :: esp1 :: Replies: 2 :: Views: 550
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
Elementary Electronic Questions :: 12-11-2014 01:50 :: steven834 :: Replies: 15 :: Views: 1356
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:
I hope that explains it well, SW1 and SW2 will never be c
Hobby Circuits and Small Projects Problems :: 11-26-2014 10:24 :: tincan :: Replies: 14 :: Views: 2363
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
Microcontrollers :: 11-20-2014 19:17 :: betwixt :: Replies: 5 :: Views: 1371
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.
Microcontrollers :: 11-20-2014 14:30 :: jtrao :: Replies: 1 :: Views: 796
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.
Microcontrollers :: 10-27-2014 22:32 :: FvM :: Replies: 1 :: Views: 652
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
Microcontrollers :: 10-04-2014 19:12 :: bigdogguru :: Replies: 4 :: Views: 1825
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.
Microcontrollers :: 10-01-2014 01:46 :: BrunoARG :: Replies: 2 :: Views: 432
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
Microcontrollers :: 09-04-2014 16:29 :: SunnySkyguy :: Replies: 2 :: Views: 725
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
Hobby Circuits and Small Projects Problems :: 08-30-2014 15:54 :: horace1 :: Replies: 6 :: Views: 794
Download this free loops tool, very useful.
Also I would use one of the PIC timers with an interrupt for generating the Freq.
Microcontrollers :: 08-30-2014 07:26 :: esp1 :: Replies: 14 :: Views: 1182
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
Microcontrollers :: 08-29-2014 09:50 :: paulfjujo :: Replies: 10 :: Views: 3181
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
Microcontrollers :: 08-28-2014 09:38 :: Mapuia :: Replies: 2 :: Views: 532
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
Microcontrollers :: 08-13-2014 11:28 :: phrbob93 :: Replies: 4 :: Views: 4719
Timing delays with software integers is a bad idea. You should use the dedicated timers/counters on your MCU.
Microcontrollers :: 08-09-2014 22:19 :: shaiko :: Replies: 4 :: Views: 1034
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
Microcontrollers :: 08-01-2014 16:18 :: paulfjujo :: Replies: 3 :: Views: 1785
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
Microcontrollers :: 07-29-2014 20:00 :: Disha Karnataki :: Replies: 2 :: Views: 582
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
Embedded Linux and Real-Time Operating Systems (RTOS) :: 07-31-2014 16:51 :: ftsolutions :: Replies: 4 :: Views: 1562
This should be
Elementary Electronic Questions :: 07-17-2014 08:18 :: udayan92 :: Replies: 1 :: Views: 519
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
Microcontrollers :: 07-13-2014 10:28 :: rangerskm :: Replies: 2 :: Views: 828