예제 #1
0
# Initializing DecadeCounter with clock_conn

b = DecadeCounter(clk_conn)


# In[32]:

# Initiating the oscilloscope

o = Oscilloscope(
    (clk_conn, "CLK"), (b.out[0], "BIT3"), (b.out[1], "BIT2"), (b.out[2], "BIT1"), (b.out[3], "BIT0"), (enable, "EN1")
)

# starting the oscillioscope thread - This does not initiate the recording.

o.start()

# setting the scale

o.setScale(0.05)  # Set scale by trial and error.

# Set the width of the oscilloscope to fit the ipython notebook.

o.setWidth(100)


# In[33]:

# unhold the oscilloscope to start the recording.

o.unhold()
예제 #2
0
# Mode No. :  Description
#   1          Monostable
#   2          Astable
#   3          Bistable

out = Connector(0)

# MODE 3

m = Multivibrator(0, mode=3)

m.start()
m.setOutput(out)

o = Oscilloscope((m.A, 'OUT'))
o.start()
o.setScale(0.05)
o.unhold()

time.sleep(0.1)
m.trigger()
print(m.A())
time.sleep(0.5)
m.trigger()
print(m.A())
time.sleep(1)
m.trigger()
print(m.A())
time.sleep(2)
m.trigger()
print(m.A())