Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

P.R.O.T.E.U.S / Reality differences ??

Status
Not open for further replies.

neuralc

Full Member level 4
Joined
Nov 6, 2001
Messages
236
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Activity points
2,202
Hi all,

I have made an application in P.R.O.T.E.U.S where I connect PORTA bit 0,1 (output) in one side of 4 press buttons and PORTA bit 2,3 (input) in the other side of the button.

The idea it's scan the key press of the buttons. So, I put one output equals to one an I see if the input's remains to one. Next I make the same thing to the other output. In the simulation everything work's fine.

The problem it's reality, when I implement the circuit (with 16F870) and I power it I get some "auto" key press's without pressing the key's.

Some one have some idea what probably appends? Maybe some caps on the buttons?

ThX

NeuralC
 

james

Member level 2
Joined
Sep 14, 2003
Messages
49
Helped
6
Reputation
12
Reaction score
4
Trophy points
1,288
Activity points
1,883
neuralc,

Pullup, pulldown resistors missings?

I would esclude for my experience button capacitance.

If I could see schematic..... if not top-secret :smile:

james
 

neuralc

Full Member level 4
Joined
Nov 6, 2001
Messages
236
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Activity points
2,202
Hi James,

Thanks for help. I d'ont have here the schematic, but when I go home I will upload it on this post.

Th pull up/down in the case of 16F870 I think it is not necessary (because internally it as two fets, one connected to VCC another connected dto GND) and in P.R.O.T.E.U.S it works fine!

But let's see the schematic...

ThX

NeuralC
 

james

Member level 2
Joined
Sep 14, 2003
Messages
49
Helped
6
Reputation
12
Reaction score
4
Trophy points
1,288
Activity points
1,883
Hi neuralc,

What you said is true for output not for input. An high impedence input left floating might generate the problem you've described, in phisycal realty.

Pro**t*eu**s DSIM couldn't know about input impedence, input stray capacitance etc. This side effects are simulate in PROSPICE only not in DSIM. Otherwhise you would forget it about real time micros simulation. DSIM is a 9 discretes state simulator.
That's the difference between phisycal realty and DSIM virtual realty.

james
 

neuralc

Full Member level 4
Joined
Nov 6, 2001
Messages
236
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Activity points
2,202
Hi James,

You are right, if I put one 10K resistor from the input pin to GND, every thing work's well; so I thing that is a important point that everybody must pay attention. In simulator noise in floating pin's are not taken in consideration, but in reality yes.

ThX

NeuralC
 

james

Member level 2
Joined
Sep 14, 2003
Messages
49
Helped
6
Reputation
12
Reaction score
4
Trophy points
1,288
Activity points
1,883
Hi neuralc,

Happy to know it works.

The use of pulldown or (where needed) pullup resistors, forcing a known state for CMOS inputs is a "good engineering practice".

Indeed, it is a good practice too for TTL although, as you know, an open TTL input is similar to logic state "1". Not a case, Pro**te*us has two primitives, pullup and pulldown resistors, in digital primitive library DSIMMDLS.LIB.

Prot****eus cannot take care about noise in digital simulations (DSIM module) for speed concerns. Only digital states are considered.

Nevertheless, also when analog simulations take place (PROSPICE module) it cannot be aware about external world noise or others parameters of influence, unless you specifically include them in your models or schematic drawing. (the reverse of coin is long simulation time)
This concept is true for PROSPICE in Pro**te*u*s, as well as true for every kind of analog simulator (SPICE, PSPICE, HSPICE)

However, when pro**teus start simulation it extracts the circuit netlist, and as it reduces all schematic in currents and impedences, every node in your circuit must allows a path to ground. If not, PROSPICE includes automatically a virtual impedence to ground node as higher as possible to be not circuit invasive, but suffice to allows simulation results can converge to. This aspect too, has to be considered some time.

All that, only to say that who is simulating must adopt every care as a way for his circuit be adherent as much as possible with real world.

See you.

james


<font size=-1>[ This Message was edited by: james on 2002-04-26 00:00 ]</font>
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top