Re: Timing pulses
- From: Joerg <invalid@xxxxxxxxxxxxxxx>
- Date: Tue, 18 Aug 2009 09:55:38 -0700
BobS wrote:
On Aug 16, 5:01 pm, Joerg <inva...@xxxxxxxxxxxxxxx> wrote:BobS wrote:On Aug 14, 12:14 am, Nobody <nob...@xxxxxxxxxxx> wrote:I wouldn't use loop times as time bases. Can blow you out of the waterOn Thu, 13 Aug 2009 08:40:16 +0100, Martin Brown wrote:From just the external I/O stand point the PIC10 series is appealing,At 25Hz PWM frequency, I wouldn't even bother with the "dedicated PWM"8 bit accuracy is adequate. A micro has not been selected pending8 bit resolution of a 12.5ms period is 50us steps? That is huge - almost
arriving at a scheme for this task, preferably the smallest micro
possible for cost and space. The micro does have to manage a 25 Hz
PWM out in addition to the input pulses.
anything should be able to do that adequately. Most of the discussion so
far has been about obtaining sub us timing precision with a micro. You
might even manage 16bit accuracy with a free running 5MHz clocked timer
register that you read whenever an edge triggered event occurs.
The cheapest PIC with a dedicated PWM output would be my choice.
bit. A PIC10F200 would be more than adequate, and I'm not sure I'd even
bother using the timer.
since could handle this as a digital task. Since there is a dearth of
internal peripherals, the initial thought for firmware is a single
loop continuously cycling through input, calculation, and output
code. The loop time would be the time base, and would be empirically
determined with constants and variables set accordingly. Is there a
possibility this would work? What else should be considered?
if something happens in the background, like a WDT handler. Take a look
at the one I suggested in anotehr post in this thread. Contains a nice
timer plus a PWM.
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.- Hide quoted text -
- Show quoted text -
Thanks Joerg, Would you consider running with the WDT disabled?
Absolutamente no, I would not disable that. The WDT just runs in the background. As long as you ping it regularly it'll be happy and if it missed a few pings it (usually correctly) assumes that the uC or the code froze up.
Also, it appears that the PIC's mentioned above, and others, can not
run a PWM out at 25Hz. with common settings. How can 25Hz PWM be
obtained without running the clock insanely slow?
AFAIU you can hang a prescaler up front on the PIC12F683 timer, via firmware commands. No soldering required :-)
But you'd have to study this for yourself, starts around page 75:
http://ww1.microchip.com/downloads/en/DeviceDoc/41211D.pdf
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
.
- Follow-Ups:
- Re: Timing pulses
- From: BobS
- Re: Timing pulses
- References:
- Timing pulses
- From: BobS
- Re: Timing pulses
- From: petrus bitbyter
- Re: Timing pulses
- From: Joerg
- Re: Timing pulses
- From: petrus bitbyter
- Re: Timing pulses
- From: BobS
- Re: Timing pulses
- From: Martin Brown
- Re: Timing pulses
- From: Nobody
- Re: Timing pulses
- From: BobS
- Re: Timing pulses
- From: Joerg
- Re: Timing pulses
- From: BobS
- Timing pulses
- Prev by Date: Re: PCB track impedence
- Next by Date: Re: A first idea for a super simple RS232 temperature probe withthetemp PIC
- Previous by thread: Re: Timing pulses
- Next by thread: Re: Timing pulses
- Index(es):
Relevant Pages
|