Searching \ for '[PIC]: I Am Going Slightly Mad' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'I Am Going Slightly Mad'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: I Am Going Slightly Mad'
2002\05\16@183310 by Mike Singer

picon face
part 1 821 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

  Gentlemen,

  Help me catch the idea of postings on bouncing-debouncing.
(I counted more the dozen postings) I was not at home all day.
I'm tied a little, so my question may be stupid.
  It goes about attaching a button to RB0. I know, this gang of
chipmakers has a strong position, that interrupt pin must be
a Schmitt Trigger input.
  Have look on DS30292B-page 7 (PIC16F87X):
"Note 1: This buffer is a Schmitt Trigger input when configured
as the external interrupt."
  Schmitt Trigger is a thing to construct with a bounceless input
by hardware design. I've attached a .jpg with it. May be I'm wrong?
  What is the sense in programmatic debouncing with a Schmitt
Trigger. Is not it enough simply to desable interrupt while interrupt
handling?

  Thanks.
  Mike.

part 2 8688 bytes content-type:image/jpeg; name="RB0.jpg" (decode)


part 3 105 bytes
--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2002\05\16@205550 by Jinx

face picon face
>  What is the sense in programmatic debouncing with a Schmitt
> Trigger. Is not it enough simply to desable interrupt while interrupt
> handling?

If I understand you, you wonder whether a ST input should
cope with a bouncing switch

A ST has boundaries for noise immunity and will square up a
wave that meets those conditions. A bouncing switch could
quite easily produce noise that alternates between Vss and Vcc
with some intermediate rubbish thrown in for good measure. The
ST will square everything, so making a series of Vss to Vcc
pulses. It will not integrate the mess into a once-on pulse. Two
solutions - use conditioning (eg RC) on the input to integrate the
bouncing before it gets to the ST or use a s/w timing routine.
I prefer to use both, as dirty pushbuttons can create noise even
when pushed firmly, which could trick s/w

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2002\05\17@013511 by Mike Singer

picon face
part 1 2579 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

***********************************************************
Jinx wrote:

{Quote hidden}

*************************************************************
Mike Singer  wrote:

{Quote hidden}

************************************************************
Mike Singer (it is me)  are writing now:

I've attached the  schematic drawing in .jpg to that posting.
I've attached the  schematic drawing in .jpg to that posting.
I've attached the  schematic drawing in .jpg to that posting.

I'll attach the  schematic drawing to this posting.
I'll attach the  schematic drawing to this posting.
I'll attach the  schematic drawing to this posting.

Thank you.

----------------------------------------------------------------------------
  Thanks to James Newton, Dale Botkin & others for supporting this forum.
(James forgive me for the attachments, please.)

part 2 8688 bytes content-type:image/jpeg; name="RB0.jpg" (decode)


part 3 154 bytes
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\17@073504 by Olin Lathrop

face picon face
Please get rid of you private REPLY address to that default replies go to
the list.

>    Schmitt Trigger is a thing to construct with a bounceless input
> by hardware design. I've attached a .jpg with it. May be I'm wrong?
>    What is the sense in programmatic debouncing with a Schmitt
> Trigger. Is not it enough simply to desable interrupt while interrupt
> handling?

Your circuit will work *IF*:

1 - The switch is SPDT as you showed.

2 - The switch performs break before make.

3 - The voltage resulting from the resistor divider when the switch is
completely open is guaranteed to be within the hysterisis dead band of the
schmitt trigger input.

That's a lot of IFs, particularly the one about needing a SPDT switch.  This
discussion had to do with the more normal low cost SPST switch to ground
with a passive pullup to power.  If using port B with internal pullups
enabled, this requires no other parts than the switch itself.  This scheme
does, however, require software debouncing if you are trying to resolve both
the press and release states.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\17@073915 by Olin Lathrop

face picon face
> I've attached the  schematic drawing in .jpg to that posting.
> I've attached the  schematic drawing in .jpg to that posting.
> I've attached the  schematic drawing in .jpg to that posting.
>
> I'll attach the  schematic drawing to this posting.
> I'll attach the  schematic drawing to this posting.
> I'll attach the  schematic drawing to this posting.

We heard you the first time!


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\17@171052 by Mike Singer

picon face
  Thank you Olin for reading my postings and replying.

  I agree with you, but with some remarks. *IF*s are not so big as
it may seems.
  Price of SPDT is quite low. To check it, I bought today new
chinese mouse with 3 SPDT, PS2 cable, a lot of components
inside for slightly more then one US$.
  I crashed one SPDT just for curiosity. It can't "perform
break with make" simultaneously by design.
  "Hysterisis dead band of the schmitt trigger input" is as described
in DS30292B-page 156 (for PIC16F873/874/876/877,
PIC16LF873/874/876/877):
Input Low Voltage with Schmitt Trigger buffer 0.2VDD
Input High Voltage with Schmitt Trigger buffer 0.8VDD

  Nevertheless, I agree with you, that even in this case software
debouncing should be implemented as you mentioned.

  Let me keep for a while my private REPLY TO address in my
postings to the list, since as I've noticed, James Newton also
did so. Look at REPLY TO address of his posting:
[SX]: SXLIST EMBEDDED STARTER CONTEST: April Winner(s)

  Let us ask James Newton (Admin 3), what option is preferred for the list.

  Mike Singer.



Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\05\20@122915 by Jinx

face picon face
> I've attached the  schematic drawing in .jpg to that posting.
> I've attached the  schematic drawing in .jpg to that posting.
> I've attached the  schematic drawing in .jpg to that posting.
>
> I'll attach the  schematic drawing to this posting.
> I'll attach the  schematic drawing to this posting.
> I'll attach the  schematic drawing to this posting.

I heard you twice the first time - I'm not too sure what to
make of the reply. A gif works better with line drawings
btw if you've got s/w that can do gifs

If you want to use two components on the pin, then why
not put the switch wiper to ground through RC. The pin
connects to the junction of the R and C

I don't see how biasing the pin at 1/2 Vcc is any better
than no resistors with respect to noise

> Is not it enough simply to desable interrupt while interrupt
> handling ?

Interrupts are turned off automatically when the ISR is entered
(DS30292B page 131) so the ISR cannot be re-entered once
IRQ handling is under way. Only when executing a RETFIE
does GIE get enabled. You must clear INTF in the ISR so that
the PIC doesn't think there's a pending IRQ to deal with. Also
the INTEDG bit in the OPTION_REG can be set for a specific
edge when using switches. For example if using a pushbutton
you can make the ISR be entered on press or release

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2002\05\20@143910 by Jinx

face picon face
> 3 - The voltage resulting from the resistor divider when the
> switch is completely open is guaranteed to be within the
> hysterisis dead band of the schmitt trigger input

Olin, taking Mike Singer's diagram as an example, if you
are using a switch that alternates between Vss and Vcc
does it really matter if you use a divider or even a pull-up ?

I would expect noise to be unpredictable in both voltage,
polarity and possibly impedance (dirty contacts)

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2002\05\21@074445 by Olin Lathrop

face picon face
> Olin, taking Mike Singer's diagram as an example, if you
> are using a switch that alternates between Vss and Vcc
> does it really matter if you use a divider or even a pull-up ?

Considering that he had a schmitt trigger input, you can probably connect
the input to the switch without additional parts.  You'd be counting on the
line capacitance to hold the open circuit voltage at its last level until a
contact closes.  You might need to add a few pF depending on the speed of
the switch and the maximum input leakage current.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...