Microprocessor Programming in Orcad/Pspice?

P

Patrik Weibull

Guest
Hello. I am a 17 year old Swede playing around with Orcad/Pspice for fun,
and in hope of learning something. It didn't take me long to realize how
powerful this application is, and since I know quite a bit of Assembly
programming for Z80, M68K and others, and seing that these are in Orcad,
I'd like to try making some boards with them.

What I don't understand (since I do not know the program) is how to use
these microprocessors. I can wire the data- and addresspins to external
pheripherals, but where is the input for +5V and GND?

Maybe I can't see it since I'm not using the full version, but I will get
ahold of that soon. Also, how do you put your .BIN files in PROMS?
It would be pretty pointless to play around with microprocessors without
the capabillity of programming them.
 
Patrik Weibull wrote:
Hello. I am a 17 year old Swede playing around with Orcad/Pspice for fun,
and in hope of learning something. It didn't take me long to realize how
powerful this application is, and since I know quite a bit of Assembly
programming for Z80, M68K and others, and seing that these are in Orcad,
I'd like to try making some boards with them.

What I don't understand (since I do not know the program) is how to use
these microprocessors. I can wire the data- and addresspins to external
pheripherals, but where is the input for +5V and GND?
looks like you have to create a powersupply section with +5v Vcc and
Gnd output.
Maybe I can't see it since I'm not using the full version, but I will get
ahold of that soon. Also, how do you put your .BIN files in PROMS?
It would be pretty pointless to play around with microprocessors without
the capabillity of programming them.
you need some other device, like eprom burner, to transfer or program
.hex or .bin files into an eprom (prom)
rw
 
In article <3f6616f7$1@news.cadence.com>,
edmondson.ns@ieee.nw.org.invalid says...
Patrik Weibull wrote:

Hello. I am a 17 year old Swede playing around with Orcad/Pspice for fun,
and in hope of learning something. It didn't take me long to realize how
powerful this application is, and since I know quite a bit of Assembly
programming for Z80, M68K and others, and seing that these are in Orcad,
I'd like to try making some boards with them.

What I don't understand (since I do not know the program) is how to use
these microprocessors. I can wire the data- and addresspins to external
pheripherals, but where is the input for +5V and GND?
patrik:

you use them to draw schematics and ECO into layout. you'll notice these
parts, when highlighted in the selector dialog, don't have a PSpice icon
which would display if there were a model/subcircuit. actually, you
won't find the layout icon either, so be prepared to search for the
footprint to stick into the capture part property sheet.

Maybe I can't see it since I'm not using the full version, but I will get
ahold of that soon. Also, how do you put your .BIN files in PROMS?
i'll wager you won't find a spice model for those, either. in fact, i
haven't even found a memory chip in the libs, yet.

ain't i just a boatload of good news, today?

It would be pretty pointless to play around with microprocessors without
the capabillity of programming them.
thus the market for PIC simulators, in-circuit emulators and
developement systems.
Patrik,
Sorry to disappoint you, but you don't need the bin files in PSpice.
While you can simulate some pretty complex analog circuits in PSpice, no
one (and no one in their right mind! ) has created a model for a micro
processor or microcontroller that will run in PSpice. Its digital
modeling capabilities are not that extensive. (Although there was a
rumor that MicroChip had created a PSpice model for one of their
controllers...)

Also, most digital parts do not show the power connections. They are
assumed to be VCC, VDD, etc and are usually hidden. To make connections
to them, you have to make the pins visible, or just make connections to
a node named VCC.
charles:

you mean make them visible *and* connect to a *power* source, which is
required *if* the pin is visible (per the lame documantation. i haven't
tried to break that, yet.) there's no need to ["or"] connect a source to
a node named VCC. there's also no need to ["or"] connect a visible pin
to a node named VCC which would be useless unless VCC were also
connected to a power source.

charles and patrik:

i'm see i've raised as many questions as i planned to answer here -
some, no doubt, implied. i think PSpice generates more bytes of
questions than all the bytes in the pdf docs. oh, i forgot all about the
so-called "help" menu. if pspice were linux it would say, "no help on
'help'. try help help." :)

for invisible PWR pins...

you have DGND and DPWR statements in the model file. unless you edit the
model file or maybe the pin name to correspond to a VCC/VDD (or, i
guess, any) node, the part will be powered by a default net. in my case,
i had a CD4xxx part with visible pins connected to a source (thru node
VCC) which was different from the default power (whatever PSpice thinks
that is) for a 74HC part which may have caused an interface problem. Jim
T. suggested, (i.e., if i understood him,) changing DPWR to VCC (VCC was
what powered the CD4xxx part - yeah, it should have been VDD) in the
model file. maybe he meant the pin name, which i guess would work, also.
but that doesn't make sense because then i'd be running an HC part at
the 9 or 10V that was connected to the CD part. i entered that voltage
without thinking cause it was on another schem. later, i found the CD
equiv of the HC part.

funny. if the pin name is VCC and DPWR=$G_DPWR, and i have a VCC node on
the page. which source prevails? if VCC, i overpowered the HC part. if
DPWR/$G_DPWR, the interface prob was due to level mismatches. but
changing the source of the VCC node to 5V didn't fix anything. it turned
out to be a slow rise time on an input. that is, changing the rise time
made the prob go away.

now in special.lib we have CD4000_PWR and DIGIPWR parts which i would
think do the fix up for you, but they throw an error on the reference to
X3 and X2 (respectively, i think it was.)

oh great! half a dozen .pdfs on pspice and nary a mention of those
special.lib parts. but the documentation on how to print the manual is
excellent! i'll remember that if i run out of toilet paper.

the model file for a 74HC part says:

OPTIONAL: DPWR=$G_DPWR DGND=$G_DGND

i had a VCC node on the page. how the fixup for that is done is beyond
me. oh, i see it. the pin is called VCC and the user properties have
PSpiceDefaultNet set to $G_DPWR, a digital power net which is part of
PSpice, i'm assuming. then the PSpiceTemplate property for the part (not
the pin) is set to

X^@REFDES %A %B %Y %VCC %GND @MODEL PARAMS:\n+ IO_LEVEL=@IO_LEVEL
MNTYMXDLY=@MNTYMXDLY

i think i see how that circuitous net is resolved. the syntax is still
egyptian to me, however. somehow, the model file tells PSpice what the
power pins are. they're defined in those pin/part property sheets. looks
like...

U1 nand(2) DPWR DGND

.... from the model file closes the loop, so to speak.

i placed a CD4000 part which has the power pin named VDD and the
PSpiceDefaultNet is $G_CD4000_VDD. the part works. i have no VDD node or
anything close to it on the page and it's a one page project/design.

QED for my assertion that you don't need a VCC/VDD node.

back to MCUs...

patrik:

Orcad and Protel/Altium (whatever those junk mailers and spammers are
calling themselves these days) *does* do CPLD/FPGA type stuff. no MCUs,
though. maybe you could emulate an MCU that way. use a state machine to
simulate a few instruction cycles so you can check for glitches or
whatever it is you want to do.

brs, guys, and thanks if you can explain/clarify what i think i'm seeing
(and can't explain worth a damn) in the docs, model files, and property
sheets.

mike
Charlie
Edmondson Engineering
Unique Solutions to Unusual Problems'
 
Hi Mike,
Sorry for all the snippage, but I was having trouble following
everything in all the different threads. I am just a top post kind of guy!

Okay, power for digital parts. Digital parts have default nodes set up,
with special digital power supplies attached to them. In Capture, there
are invisible pins preconnected to those nets.

If you connect a wire to those pins, you over-rule the default power
supply, so you can specify different voltages that way.

If you place a DIGIFPWR part on your design, you can create new digital
power and ground nodes. Be sure to rename the defaults, because you
only want one definition of the node.

To set a part to the new power supplies, you can 1.) connect a wire from
the top of the DIGIFPWR part to the pin on the part, or 2.) rename the
power supply node in the part's parameters to point to the new power
supply node.

Also, on CD4000 parts, you can just name a parameter and reset the
voltage of the universal supply, which defaults to 5VDC. Details on
this is in the PSpice Users' Guide, in a section about using custom
digital power supplies.

Thanks,
Charlie
Edmondson Engineering
Unique Solutions to Unusual Problems
 
In article <3f687c0b$1@news.cadence.com>,
edmondson.ns@ieee.nw.org.invalid says...
Hi Mike,
Sorry for all the snippage, but I was having trouble following
everything in all the different threads. I am just a top post kind of guy!
'sok. this'll be easier for me, too.
Okay, power for digital parts. Digital parts have default nodes set up,
with special digital power supplies attached to them. In Capture, there
are invisible pins preconnected to those nets.

If you connect a wire to those pins, you over-rule the default power
supply, so you can specify different voltages that way.

If you place a DIGIFPWR part on your design, you can create new digital
power and ground nodes. Be sure to rename the defaults, because you
only want one definition of the node.

To set a part to the new power supplies, you can 1.) connect a wire from
the top of the DIGIFPWR part to the pin on the part, or
ah sooo. hidden pins. mine are on the sides.

2.) rename the
power supply node in the part's parameters to point to the new power
supply node.


Also, on CD4000 parts, you can just name a parameter and reset the
voltage of the universal supply, which defaults to 5VDC. Details on
this is in the PSpice Users' Guide, in a section about using custom
digital power supplies.
hmm... i actually searched for those parts and they didn't turn up. i
must have overlooked the ug and only checked the ref. there's that ECL
power i forgot about, too.

the user guide almost makes sense for a change. i think if i play with
this, i may just get it.

thanks,
mike
Thanks,
Charlie
Edmondson Engineering
Unique Solutions to Unusual Problems
 

Welcome to EDABoard.com

Sponsor

Back
Top