Searching \ for '[PIC]: TTL or ST ?' 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: 'TTL or ST ?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: TTL or ST ?'
2001\02\14@155717 by Jinx

face picon face
Can anyone clarify what's going on with RB0 INT on an F84
please

Whilst writing a zero-crossing detector I measured the voltage
threshholds for RB0, to find out when the interrupt would be
generated. The results I've got are nothing like the data specs.
If someone has documentation to back up what I've found I'd
be glad to see it. I'm sure I'm not the first to run into this. If I've
got it wrong I'd like to know where

The assumption was that with RB0 as a Schmitt Trigger input
the voltages would be 0.8V and 0.2V, but my measurements
don't support this. The data sheet does say that Vhys is To
Be Determined, but aside from that it seems there's a dv/dt
limit for RB0, which doesn't sound like a Schmitt Trigger. With
a pot in the range 500R to 100k and INTEDG set for falling
voltage IRQ, it's quite easy to lower the voltage slowly (0.01V/s)
on RB0 without the PIC generating an INT IRQ. If an IRQ is
generated it happens at 1.6V. The ISR will be exited if btfss in the
ISR is true at 1.5V. With INTEDG=1 (rising voltage IRQ), the IRQ
will happen at 3.11V and exit via btfsc at 1.48V. An IRQ is
always generated no matter how slowly VRB0 rises. (I've also
tried this with RB3, and that will flip at 1.44V whichever way
V is going)

Sequence is, after Reset (using negative-going IRQ) -

- LED2 on, pot at full CW, V on b0 = 5.00V
- Turn pot CCW (ie lower voltage)
- When VRB0=1.60V LED2 goes off, LED1 comes on. This shows
  that PC is in the ISR
- When VRB0=1.50V LED1 goes off, LED2 comes back on,
  indicating completion of ISR
- Repeat, back to step 1 (no h/w reset necessary)

volts equ portb.0   ;pot wiper. Pot has 0V CCW terminal, 5V CW terminal
led1 equ portb.1   ;LEDs are transistor-switched via diode/8k2 resistor
led2 equ portb.2

org irq
goto led

movlw 00h   ;porta all o/p, nothing connected except a4 10k p-u
tris porta
clrf porta
movlw 01     ;portb all o/p except b0. Pot on b0, LEDs on b1 and b2
tris portb
clrf portb
movlw 80h   ;pull-ups off, falling edge IRQ
option
bsf inte         ;enable INT IRQ
bsf gie

wait      bsf led2     ;LED2 on, wait for INT
            goto wait
            nop
            nop
            goto wait    ;loop after ISR

led        bcf intf        ;ISR entry point
            bcf led2      ;LED2 off
            bsf led1      ;LED1 on

low       btfsc volts     ;test RB0
            goto low       ;loop until voltage drops under hysteresis

pot       btfss volts    ;test RB0
           goto pot       ;loop until voltage rises above hysteresis
           bcf led1        ;led1 off
           retfie             ;back to wait

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


2001\02\15@032250 by Roman Black

flavicon
face
Jinx wrote:
{Quote hidden}

The Microchip datasheets are all very specific showing:

The ST input MAX VIL (input low) as 0.2v.
So it must lower into the 0v-0.2v range *absolutely*
to cause a low-going trigger.

The ST input MIN VIH (input high) as 0.8v
So it must raise into the 0.8v-5v range to cause a
high-going trigger.

As these are listed as the min/max figures in
the datasheet I would expect that Microchip
takes these figures seriously??

Annoyingly they don't list typical figures
for these threshold points. :o(
-Roman

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


2001\02\15@041627 by Wollenberg, Frank

flavicon
face
> -----Original Message-----
> From: Roman Black [fastvidspamKILLspamEZY.NET.AU]
> Subject: Re: [PIC]: TTL or ST ?
>
> The Microchip datasheets are all very specific showing:
>
> The ST input MAX VIL (input low) as 0.2v.
> So it must lower into the 0v-0.2v range *absolutely*
> to cause a low-going trigger.

You mean 0.2 * Vdd , that is 1V on a 5V-System.

> The ST input MIN VIH (input high) as 0.8v
> So it must raise into the 0.8v-5v range to cause a
> high-going trigger.

You mean 0.8 * Vdd , that is 4V on a 5V-System.

Frank.

GSP Sprachtechnologie GmbH
Frank Wollenberg
HW-Entwicklung
Tel.:   +49 (0)30 769929-78
Fax:    +49 (0)30 769929-12
eMail:  .....f.wollenbergKILLspamspam.....gsp-berlin.de


--
GSP Sprachtechnologie GmbH
Teltowkanalstr.1, D-12247 Berlin
Tel.:  +49 (0)30 769929-0
Fax:   +49 (0)30 769929-12
eMail: EraseMEInfospam_OUTspamTakeThisOuTgsp-berlin.de
Web:   http://www.gsp-berlin.de

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


2001\02\15@071011 by Bob Ammerman

picon face
> The Microchip datasheets are all very specific showing:
>
> The ST input MAX VIL (input low) as 0.2v.
> So it must lower into the 0v-0.2v range *absolutely*
> to cause a low-going trigger.
>
> The ST input MIN VIH (input high) as 0.8v
> So it must raise into the 0.8v-5v range to cause a
> high-going trigger.
>
> As these are listed as the min/max figures in
> the datasheet I would expect that Microchip
> takes these figures seriously??

I didn't look, but 0.8v for a high threshold doesn't seem right.

Are these numbers really 0.2 x Vdd and 0.8 x Vdd ???

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

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


2001\02\15@081140 by Roman Black

flavicon
face
Wollenberg, Frank wrote:
>
> > -----Original Message-----
> > From: Roman Black [KILLspamfastvidKILLspamspamEZY.NET.AU]
> > Subject: Re: [PIC]: TTL or ST ?
> >
> > The Microchip datasheets are all very specific showing:
> >
> > The ST input MAX VIL (input low) as 0.2v.
> > So it must lower into the 0v-0.2v range *absolutely*
> > to cause a low-going trigger.
>
> You mean 0.2 * Vdd , that is 1V on a 5V-System.


Thanks Frank, that's a pretty serious mistake
I made! Wow.
-Roman

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


2001\02\15@104617 by Harold M Hallikainen

picon face
On Thu, 15 Feb 2001 09:58:32 +1300 Jinx <spamBeGonejoecolquittspamBeGonespamCLEAR.NET.NZ>
writes:
> Can anyone clarify what's going on with RB0 INT on an F84
> please
>
> Whilst writing a zero-crossing detector I measured the voltage
> threshholds for RB0, to find out when the interrupt would be
> generated. The results I've got are nothing like the data specs.
> If someone has documentation to back up what I've found I'd
> be glad to see it. I'm sure I'm not the first to run into this. If
> I've
> got it wrong I'd like to know where
>
> The assumption was that with RB0 as a Schmitt Trigger input
> the voltages would be 0.8V and 0.2V, but my measurements
> don't support this.


       Aren't the ST threshholds proportional to Vcc? I suspect they are
0.8*Vcc and 0.2*Vcc or 4.0V and 1.0V. This seems relatively close to what
you measured.

Harold


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

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


2001\02\15@165605 by Jinx

face picon face
>         Aren't the ST threshholds proportional to Vcc? I suspect
> they are 0.8*Vcc and 0.2*Vcc or 4.0V and 1.0V. This seems
> relatively close to what you measured.

My mistake also for saying ST limits are 0.2V and 0.8V, of
course it should be 0.2Vcc and 0.8Vcc, but I don't want that
to detract from what is puzzling me

The figures I measured are nowhere near 4V and 1V. With a
negative-going voltage the top figure is ~1.60V and the lower
is ~1.50V = only ~0.1V of hysteresis (plus there's the ability to
sneak past the 1.60V IRQ point without the PIC noticing). With
a positive-going voltage they are 3.11V and 1.48V respectively
= 1.63V of hysteresis, which is more reasonable although 50%
away from the datasheet max/min. Why the big difference between
-ve and +ve going voltages with INTEDG set appropriately ?

If someone has 10 minutes to put a pot on b0 and confirm/refute
this that would be appreciated. I've tried it on 3 new F84As with
the same result. As far as I can tell the method I'm using is OK

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


2001\02\15@173916 by Spehro Pefhany

picon face
At 10:56 AM 2/16/01 +1300, you wrote:
>>         Aren't the ST threshholds proportional to Vcc? I suspect
>> they are 0.8*Vcc and 0.2*Vcc or 4.0V and 1.0V. This seems
>> relatively close to what you measured.
>
>My mistake also for saying ST limits are 0.2V and 0.8V, of
>course it should be 0.2Vcc and 0.8Vcc, but I don't want that
>to detract from what is puzzling me
>
>The figures I measured are nowhere near 4V and 1V. With a
>negative-going voltage the top figure is ~1.60V and the lower
>is ~1.50V = only ~0.1V of hysteresis (plus there's the ability to
>sneak past the 1.60V IRQ point without the PIC noticing). With
>a positive-going voltage they are 3.11V and 1.48V respectively
>= 1.63V of hysteresis, which is more reasonable although 50%
>away from the datasheet max/min. Why the big difference between
>-ve and +ve going voltages with INTEDG set appropriately ?

The minimum and maximum figures on the data sheet are the
values that Microchip guarantees will be recongnized as a 1 or 0.
Your measurements are within the range, so it is doing what it
is supposed to be doing.

The amount of hysteresis Vhys is listed as 0.1V typical on the
current data sheet (no limits given).

Note also from the schematic (Page 15) that the RB0 input buffer will
generally have *different* thresholds from the ST interrupt
input, they are really two different circuits connected to the
same input pin. There is *no* guarantees on how they will overlap
in their thresholds.

Best regards,


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffEraseMEspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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


2001\02\15@182004 by Jinx

face picon face
> The minimum and maximum figures on the data sheet are the
> values that Microchip guarantees will be recongnized as a 1 or 0.
> Your measurements are within the range, so it is doing what it
> is supposed to be doing.

> The amount of hysteresis Vhys is listed as 0.1V typical on the
> current data sheet (no limits given).

Yes, you're absolutely right, and I'm pleased that you've been
able to show that in the documentation. I was sure I'd read the
latest pdf correctly as TBD and got distracted by the 1V - 4V
thing, but on re-reading it does say 0.1Vhys. And I'm not likely
to forget now ;-)

> > there's the ability to sneak past the 1.60V IRQ point without the
> > PIC noticing

Now that I know I'm measuring a good PIC correctly, then this
dv/dt limitation is also a fact of life, even though I expected an
ST to detect slowly decreasing voltages and generate an IRQ
(slowly increasing ones ARE detected reliably) ?

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


2001\02\15@182839 by Spehro Pefhany

picon face
At 12:22 PM 2/16/01 +1300, you wrote:

>Now that I know I'm measuring a good PIC correctly, then this
>dv/dt limitation is also a fact of life, even though I expected an
>ST to detect slowly decreasing voltages and generate an IRQ
>(slowly increasing ones ARE detected reliably) ?

Yes, for the interrupt you should have no problem with
clean slow-changing voltages. Note though that Microchip does
not guarantee the minimum amount of hysteresis. It would be
imprudent to assume it must be larger than about 30 millivolts,
IMO, or less than maybe 0.3 volt.

Best regards,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffspam_OUTspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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


2001\02\15@185725 by Jinx

face picon face
> Yes, for the interrupt you should have no problem with
> clean slow-changing voltages.

I know that I "should" have no problem, but I do. If I apply a
decreasing V at about 0.01V/s (not hard to do with a 10-t
pot) to RB0 with INTEDG=0 then no IRQ happens. I can take
V right down to 0V without the ISR being entered. Note that
0.01V/s is a guesstimate, just going by what I see on a
multimeter, and it is repeatable

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


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