
# This file was written by gpsim.

# You can use this file for example like this:
#     gpsim -s mycode.cod -c netlist.stc

# If you want to add commands, you can create another .stc file
# and load this file from it. Something like this:
# ----------- myproject.stc ---------------
# load s mycode.cod
# frequency 12000000
# load c netlist.stc
# -----------------------------------------
# You can then just load this new file:
#     gpsim -c myproject.stc
# and use netlist.stc whenever you save from the breadboard.
#

load s test.cod

# Processor position:
module library libgpsim_modules


# Modules:
p10f202.BreakOnReset = true
p10f202.SafeMode = true
p10f202.UnknownMode = true
p10f202.WarnMode = true
p10f202.xpos = 180
p10f202.ypos = 648

module load pullup pu
pu.capacitance = 0
pu.resistance = 10000
pu.voltage = 5
pu.xpos = 324
pu.ypos = 660

module load pulldown pd
pd.capacitance = 0
pd.resistance = 0
pd.voltage = 5
pd.xpos = 456
pd.ypos = 660

module load ttl595 sr0
sr0.xpos = 108
sr0.ypos = 84

module load led leda0
leda0.ActiveState = high
leda0.color = red
leda0.xpos = 36
leda0.ypos = 36

# Connections:
node vcc
attach vcc pu.pin sr0.MR 

node gnd
attach gnd pd.pin sr0.OE 

node gp0
attach gp0 gpio0 sr0.RCK 

node gp1
attach gp1 gpio1 sr0.SCK

node gp2
attach gp2 gpio2 sr0.Ds

node gp3
attach gp3 gpio3

