1# Script for testing modules 2# 3# The purpose of this script is to load a simple 4# program for a PIC (16F84), load the gpsim module library, 5# and illustrate how modules can be connected to pics. 6 7 8load s mod_test.cod 9 10# load the gpsim module library. Not that this is a 'shared library'. 11# If the library fails to load then 1) it's not installed (try installing 12# gpsim) 2) or the path to library is not available (see the documentation 13# on modules). 14 15module library libgpsim_modules.so 16 17# display all of the modules that are in the library: 18# module list 19 20# load a specific module from the module library and give it a name 21# In this case we're loading two pull up resistors and two pull downs 22# (notice the alias of pu for pullup) 23 24module load pullup R1 25module load pu R2 26module load pulldown R3 27module load pd R4 28 29# create nodes that can connect the Pic and the resistors 30 31node n1 32node n2 33node n3 34node n4 35 36attach n1 portb0 R1.pin 37attach n2 portb1 R2.pin 38attach n3 portb2 R3.pin 39attach n4 portb3 R4.pin 40 41