View Single Post
  #4   Report Post  
Posted to alt.binaries.schematics.electronic
Oppie[_5_] Oppie[_5_] is offline
external usenet poster
 
Posts: 150
Default PIC16F877A-I/P question

I believe that you will find that the difference is in the different types
of digital inputs used on pins 7 and 8 of the MCU.
Look at pages 10-11 of the data sheet. Pin 7 (RA5) is 'ttl' input. Pin 8
(RE0) is a Schmitt Trigger TTL input. On pin 8, the Schmitt hysteresis is
giving the difference you observe.

Also look at the datasheet page 31 for details of the port structures and
how this might impact your design.

it is sometimes acceptable to use a digital input with an analog input. In
this case though, you should consider either using the analog input mode or
using an external comparator with well defined trip levels.
That's the 10 minute review, hope it helps - Oppie

"Robert Baer" wrote in message
net...
Oppie wrote:
I'm looking at pins 7 and 8. What package are you using?

* The chocolate bar..(40 pin).

What voltage supplies are you using? The OPA237 in your diagram is not
marked with inverting/non-inverting inputs....

* 5V; op amp drawn in standard configuration = = inverting input on top.


Are you using the digital or analog inputs of the MCU? Don't depend on
feeding an analog signal to a digital input to give consistent results.
You have to consider all the port parasitics.

* All ports being used for input are set as digital; threshold seems to be
similar to TTL (1.4V) altho i have not measured every pin.


You might also have capacitive coupling between primary and secondary of
your current transformer that affects the measurement.

* Cannot be relevant to the fact of the observed differences (hysteresis
vs "normal") as well as the fact the 2 channels are identical (ignoring
pin number).
Besides, the current transformer capacitance is about 2pF and (again)
the circuits are identical (same layout, same part types, etc).


http://www.microchip.com/wwwproducts...cName=en010241
http://focus.ti.com/docs/prod/folders/print/opa237.html

"Robert Baer" wrote in message
...
I have two identical motor current sense circuits like the one shown'
MOT1 to MCU pin 7, and MOT2 to MCU pin 8.
The MOT1 circuit has no hysteresis with the most sensitive setting
giving about 0.6A trip point.
The MOT2 circuit has a lot of hysteresis with the most sensitive
setting giving about 1.2A trip point current increasing; does not "drop
out" until 0.75A.
This hysteresis is consistent: at same pot settings MOT1 trips at
4.1A and MOT2 trips at 10.5A dropping out at 6.2A.
Not MOT2 dropout is near, but higher than MOT1 trip point (always
when pot settings are same).
Is there something special about pin 8 that would deliver such an
unexpected result?