Reply by Thad Smith May 4, 20082008-05-04
Tom�s � h�ilidhe wrote:
> On May 3, 3:19 pm, rickman <gnu...@gmail.com> wrote: > >> Why can't you just measure it? As soon as the CPU start executing >> code, toggle a pin from low to high to low. No matter what state the >> pin was before initialization, you will get an edge from this >> sequence. > > My stopwatch only measures accurate to a tenth of a second, plus my > reflexes aren't quick enough to stop it accurately. > > Seriously though what kind of device would I use to measure this? I'd > need it to start measuring from when power was applied and get it to > mark when the pin goes high.
My primary debugging tool is a digital oscilloscope. For you application the trigger is CPU power and the other channel is your toggle pin. -- Thad
Reply by Robert Adsett May 3, 20082008-05-03
In article <33bd93fc-b031-4a4c-8366-8ad006ada7e3
@f24g2000prh.googlegroups.com>, linnix says...
> On May 3, 3:39 pm, Robert Adsett <s...@aeolusdevelopment.com> wrote: > > In article <d2913c07-414d-458f-b3bd-5a0c7361f541 > > @p39g2000prm.googlegroups.com>, linnix says... > > > > > On May 3, 2:50 pm, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> wrote: > > > > linnix wrote: > > > > > On May 3, 11:26 am, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> > > > > > wrote: > > > > >> You might be amazed what people will notice... A 10ms flash of an LED > > > > >> at full throttle is quite noticeable. > > > > > Yes, but does it really matter. We expect something strange at > > > > > startup anyway. > > > > > > Well, for the devices we build at my place of work, random flashing at > > > > power-up like that would eventually put us out of business. Customers > > > > will not accept such glitches, period. > > > > > I can't image what application would be so mission critical at power > > > up, > > > > As an example http://www.navitastechnologies.com/hydraulic.html > > > > But that's not driving LEDs. Driving pumps and motors are certainly > different from flashing LEDs.
Well if you are going to restrict your outputs to flashing LEDs .... :) I can certainly imagine it being a quality issue though, even with LEDs. Robert ** Posted from http://www.teranews.com **
Reply by May 3, 20082008-05-03
linnix wrote:
> On May 3, 2:50 pm, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> wrote:
>> Well, for the devices we build at my place of work, random flashing at >> power-up like that would eventually put us out of business. Customers >> will not accept such glitches, period.
> I can't image what application would be so mission critical at power > up, but I'll take your words for it.
There's no need to make mission-critical mistakes to disgruntle our customers' customers, and eventually drive our customers to take their business elsewhere. Nagging glitches are perfectly capable of having that effect in a pretty expensive extra for cars.
Reply by linnix May 3, 20082008-05-03
On May 3, 3:39 pm, Robert Adsett <s...@aeolusdevelopment.com> wrote:
> In article <d2913c07-414d-458f-b3bd-5a0c7361f541 > @p39g2000prm.googlegroups.com>, linnix says... > > > On May 3, 2:50 pm, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> wrote:=
> > > linnix wrote: > > > > On May 3, 11:26 am, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> > > > > wrote: > > > >> You might be amazed what people will notice... A 10ms flash of an =
LED
> > > >> at full throttle is quite noticeable. > > > > Yes, but does it really matter. We expect something strange at > > > > startup anyway. > > > > Well, for the devices we build at my place of work, random flashing at=
> > > power-up like that would eventually put us out of business. Customers=
> > > will not accept such glitches, period. > > > I can't image what application would be so mission critical at power > > up, > > As an examplehttp://www.navitastechnologies.com/hydraulic.html >
But that's not driving LEDs. Driving pumps and motors are certainly different from flashing LEDs.
Reply by Robert Adsett May 3, 20082008-05-03
In article <d2913c07-414d-458f-b3bd-5a0c7361f541
@p39g2000prm.googlegroups.com>, linnix says...
> On May 3, 2:50 pm, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> wrote: > > linnix wrote: > > > On May 3, 11:26 am, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> > > > wrote: > > >> You might be amazed what people will notice... A 10ms flash of an LED > > >> at full throttle is quite noticeable. > > > Yes, but does it really matter. We expect something strange at > > > startup anyway. > > > > Well, for the devices we build at my place of work, random flashing at > > power-up like that would eventually put us out of business. Customers > > will not accept such glitches, period. > > I can't image what application would be so mission critical at power > up,
As an example http://www.navitastechnologies.com/hydraulic.html Robert ** Posted from http://www.teranews.com **
Reply by linnix May 3, 20082008-05-03
On May 3, 2:50 pm, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> wrote:
> linnix wrote: > > On May 3, 11:26 am, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> > > wrote: > >> You might be amazed what people will notice... A 10ms flash of an LED > >> at full throttle is quite noticeable. > > Yes, but does it really matter. We expect something strange at > > startup anyway. > > Well, for the devices we build at my place of work, random flashing at > power-up like that would eventually put us out of business. Customers > will not accept such glitches, period.
I can't image what application would be so mission critical at power up, but I'll take your words for it. For us, we only power up the device once, when we install the batteries. The power button is really talking the uC out of standby. Our device goes into standby after 2 minuties of idle time. That way, a button cell battery can last for a few hundred days.
Reply by May 3, 20082008-05-03
linnix wrote:
> On May 3, 11:26 am, Hans-Bernhard Br&#4294967295;ker <HBBroe...@t-online.de> > wrote:
>> You might be amazed what people will notice... A 10ms flash of an LED >> at full throttle is quite noticeable.
> Yes, but does it really matter. We expect something strange at > startup anyway.
Well, for the devices we build at my place of work, random flashing at power-up like that would eventually put us out of business. Customers will not accept such glitches, period.
> Everytime I plug in a header, the outlet flash. Is something wrong > with my heater or the outlet?
Well, the difference is that there you're switching a couple kilowatts at 100+ volts, i.e. it's quite unavoidable that there will be some sort of spark. That's a whole different story from a multi-MHz microcontroller apparently failing to keep a measly 100 mW LED from turning on for a hundred thousand CPU cycles' time.
Reply by Jim Granville May 3, 20082008-05-03
Tom&#4294967295;s &#4294967295; h&#4294967295;ilidhe wrote:
> In college, I was always told not to leave input pins floating on a > device such as a 74HCT chip. I was told that the device might behave > erratically if any of its inputs are floating. > > I have the PIC16F684. One of its inputs goes to the data input of a > shift register, and the other goes to the clock input of the same > shift register. > > On the shift regsiter, there's an RC circuit on the master reset with > a charge time of about a microsecond (which is plenty slow enough to > have it set to all zeroes initially).
Shift registers are 'plain dumb' so even if they DO get bit-confused, they can always be flushed. Send it 8 (or whatever) clocks, and you now KKNOW what state it is in. <paste>
> I still haven't figured out how long it takes the PIC16F684 to boot up > so I guessed it to be about 20 milliseconds. If anyone has exact > figures I'd be appreciative
Read the data, and check your Reset Timeconstant. Some micros have a clock-stabalise counter, that additionally delays reset exit, others (like the 8051) are out of reset in 2 clocks, and starting your reset opcode. RC clocks havs very fast start times, Xtals, and especially Clock crystals, take longer to get going. -jg
Reply by linnix May 3, 20082008-05-03
On May 3, 11:26 am, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de>
wrote:
> linnix wrote: > > If you are driving LEDs with the Shift Registers, what difference does > > it make to have random outputs for a few milliseconds? Noboby can > > really catch it anyway. > > You might be amazed what people will notice... A 10ms flash of an LED > at full throttle is quite noticeable.
Yes, but does it really matter. We expect something strange at startup anyway. Everytime I plug in a header, the outlet flash. Is something wrong with my heater or the outlet?
Reply by Bill Leary May 3, 20082008-05-03
"Mark Borgerson" <mborgerson@comcast.net> wrote in message 
news:MPG.22861c9cea992cd6989860@newsgroups.comcast.net...
> In article <da6e9bf6-4659-4fc5-8d47-8f09f33f7cd7 > @l42g2000hsc.googlegroups.com>, toe@lavabit.com says... >> When the PIC boots up, all of its IO pins are set as inputs initially. >> What I'm concerned about though is that shift register's input pins >> must be either high or low, so I'm wondering if I'll get erratic >> behaviour at the very start because the pins are effectively floating? >> > A couple of 100K pullups or pulldowns should eliminate your doubts. > The 100K value is subject to change if the PIC pins have internal > pullups of their own.
The note I read said "weak" pull-ups, programmable to enable or disable, power up enabled. I also thought I recalled that one or two didn't have these for one reason or another. I expect it says somewhere in the data sheet what the exact values are, but I didn't get that far before running across the above info. - Bill