Connect with us

Simulation (was "How to count pulses per second.)

Discussion in 'Electronic Basics' started by John Fields, Feb 16, 2007.

  1. John Fields

    John Fields Guest

    I don't have a counter in my library so I built a 4-bit ripple
    counter out of D flops and decoded "10".

    See how it works by changing the period and width of the pulses
    coming out of V3.


    Version 4
    SHEET 1 2940 836
    WIRE 1136 -336 896 -336
    WIRE 1568 -336 1312 -336
    WIRE 2000 -336 1744 -336
    WIRE 2448 -336 2192 -336
    WIRE 1008 -304 736 -304
    WIRE 1440 -304 1008 -304
    WIRE 1872 -304 1440 -304
    WIRE 2320 -304 1872 -304
    WIRE 1008 -256 1008 -304
    WIRE 1440 -256 1440 -304
    WIRE 1872 -256 1872 -304
    WIRE 2320 -256 2320 -304
    WIRE 896 -208 896 -336
    WIRE 928 -208 896 -208
    WIRE 1312 -208 1312 -336
    WIRE 1360 -208 1312 -208
    WIRE 1552 -208 1520 -208
    WIRE 1744 -208 1744 -336
    WIRE 1792 -208 1744 -208
    WIRE 2192 -208 2192 -336
    WIRE 2240 -208 2192 -208
    WIRE 2432 -208 2400 -208
    WIRE 928 -160 896 -160
    WIRE 1120 -160 1104 -160
    WIRE 1136 -160 1136 -336
    WIRE 1136 -160 1120 -160
    WIRE 1360 -160 1136 -160
    WIRE 1568 -160 1568 -336
    WIRE 1568 -160 1536 -160
    WIRE 1792 -160 1568 -160
    WIRE 1984 -160 1968 -160
    WIRE 2000 -160 2000 -336
    WIRE 2000 -160 1984 -160
    WIRE 2240 -160 2000 -160
    WIRE 2448 -160 2448 -336
    WIRE 2448 -160 2416 -160
    WIRE 1008 -64 1008 -112
    WIRE 1440 -64 1440 -112
    WIRE 1440 -64 1008 -64
    WIRE 1872 -64 1872 -112
    WIRE 1872 -64 1440 -64
    WIRE 1920 -64 1872 -64
    WIRE 2320 -64 2320 -112
    WIRE 2320 -64 1920 -64
    WIRE 1552 -48 1552 -208
    WIRE 1552 -48 1136 -48
    WIRE 1984 -32 1984 -160
    WIRE 1984 -32 1168 -32
    WIRE 2432 -16 2432 -208
    WIRE 2432 -16 1184 -16
    WIRE 1120 16 1120 -160
    WIRE 1136 16 1136 -48
    WIRE 1168 16 1168 -32
    WIRE 1184 16 1184 -16
    WIRE 1744 64 1328 64
    WIRE 1856 64 1808 64
    WIRE 1136 128 1136 80
    WIRE 1216 128 1136 128
    WIRE 1328 128 1328 64
    WIRE 1328 128 1280 128
    WIRE 1376 128 1328 128
    WIRE 1504 128 1456 128
    WIRE 800 160 800 128
    WIRE 896 160 896 -160
    WIRE 2464 240 2464 208
    WIRE 736 288 736 -304
    WIRE 800 288 800 240
    WIRE 800 288 736 288
    WIRE 896 288 896 240
    WIRE 896 288 800 288
    WIRE 1216 288 896 288
    WIRE 1616 288 1616 256
    WIRE 1616 288 1440 288
    WIRE 2016 288 1952 288
    WIRE 2272 288 2272 208
    WIRE 2272 288 2240 288
    WIRE 1616 320 1616 288
    WIRE 1952 320 1952 288
    WIRE 1136 352 1136 128
    WIRE 1216 352 1136 352
    WIRE 1520 352 1440 352
    WIRE 2016 352 1984 352
    WIRE 2400 352 2240 352
    WIRE 2464 352 2464 320
    WIRE 2464 352 2400 352
    WIRE 1728 368 1728 336
    WIRE 2464 400 2464 352
    WIRE 736 416 736 288
    WIRE 848 416 736 416
    WIRE 976 416 912 416
    WIRE 1216 416 1056 416
    WIRE 1520 416 1520 352
    WIRE 1520 416 1440 416
    WIRE 1920 416 1920 -64
    WIRE 2016 416 1920 416
    WIRE 2288 416 2240 416
    WIRE 2400 416 2400 352
    WIRE 1520 448 1520 416
    WIRE 1616 448 1616 400
    WIRE 1616 448 1520 448
    WIRE 1216 480 1200 480
    WIRE 1616 480 1616 448
    WIRE 1728 480 1728 448
    WIRE 1760 480 1728 480
    WIRE 1856 480 1856 64
    WIRE 1856 480 1824 480
    WIRE 2016 480 1856 480
    WIRE 1520 528 1520 448
    WIRE 2288 528 2288 416
    WIRE 2400 528 2400 480
    WIRE 2400 528 2288 528
    WIRE 2464 528 2464 480
    WIRE 2464 528 2400 528
    WIRE 1136 576 1136 352
    WIRE 1296 576 1136 576
    WIRE 1456 576 1376 576
    WIRE 1728 576 1728 480
    WIRE 1984 576 1984 352
    WIRE 2288 576 2288 528
    WIRE 2288 576 1984 576
    WIRE 2288 608 2288 576
    WIRE 736 688 736 416
    WIRE 1520 688 1520 624
    WIRE 1520 688 736 688
    WIRE 1616 688 1616 544
    WIRE 1616 688 1520 688
    WIRE 1728 688 1728 640
    WIRE 1728 688 1616 688
    WIRE 2288 688 2288 672
    WIRE 2288 688 1728 688
    WIRE 736 720 736 688
    FLAG 800 128 VCC
    FLAG 736 720 0
    FLAG 1616 256 VCC
    FLAG 2464 208 VCC
    FLAG 1200 480 VCC
    FLAG 1952 320 0
    FLAG 2272 208 VCC
    FLAG 1728 336 VCC
    FLAG 1504 128 VCC
    SYMBOL Digital\\dflop 1008 -256 R0
    SYMATTR InstName A2
    SYMATTR SpiceLine trise 20e-9 tfall 20e-9 Td 60e-9 vhigh 5v
    SYMBOL voltage 896 144 R0
    WINDOW 3 24 104 Invisible 0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR Value PULSE(0 5 0 1E-6 1e-6 10e-3 .1)
    SYMATTR InstName V3
    SYMBOL Digital\\and 1216 48 R90
    SYMATTR InstName A6
    SYMATTR SpiceLine trise 22e-9 tfall 22e-9 Td 33e-9 vhigh 5v
    SYMBOL Misc\\NE555 1328 384 R0
    SYMATTR InstName U1
    SYMBOL voltage 800 144 R0
    WINDOW 3 24 104 Invisible 0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR Value PULSE(0 5 .001)
    SYMATTR InstName V2
    SYMBOL res 1600 304 R0
    SYMATTR InstName R2
    SYMATTR Value 1e6
    SYMBOL cap 1600 480 R0
    SYMATTR InstName C1
    SYMATTR Value 1.1e-6
    SYMBOL pnp 1456 624 M180
    WINDOW 0 58 35 Left 0
    WINDOW 3 52 64 Left 0
    SYMATTR InstName Q1
    SYMATTR Value 2N3906
    SYMBOL res 1280 592 R270
    WINDOW 0 -36 52 VTop 0
    WINDOW 3 -39 49 VBottom 0
    SYMATTR InstName R3
    SYMATTR Value 1000
    SYMBOL Misc\\NE555 2128 384 R0
    SYMATTR InstName U2
    SYMBOL res 2480 496 R180
    WINDOW 0 -45 76 Left 0
    WINDOW 3 -64 32 Left 0
    SYMATTR InstName R1
    SYMATTR Value 1.45e6
    SYMBOL res 2480 336 R180
    WINDOW 0 -45 69 Left 0
    WINDOW 3 -60 31 Left 0
    SYMATTR InstName R4
    SYMATTR Value 1000
    SYMBOL cap 2272 608 R0
    SYMATTR InstName C2
    SYMATTR Value 1e-6
    SYMBOL res 1072 400 R90
    WINDOW 0 -45 51 VBottom 0
    WINDOW 3 -40 53 VTop 0
    SYMATTR InstName R6
    SYMATTR Value 82
    SYMBOL diode 2384 416 R0
    WINDOW 0 -47 32 Left 0
    WINDOW 3 -74 67 Left 0
    SYMATTR InstName D2
    SYMATTR Value 1N4148
    SYMBOL LED 912 400 R90
    WINDOW 0 -48 24 VBottom 0
    WINDOW 3 -44 25 VTop 0
    SYMATTR InstName D1
    SYMATTR Value NSPW500BS
    SYMBOL Digital\\dflop 1440 -256 R0
    SYMATTR InstName A1
    SYMATTR SpiceLine trise 20e-9 tfall 20e-9 Td 60e-9 vhigh 5v
    SYMBOL Digital\\dflop 1872 -256 R0
    SYMATTR InstName A3
    SYMATTR SpiceLine trise 20e-9 tfall 20e-9 Td 60e-9 vhigh 5v
    SYMBOL Digital\\dflop 2320 -256 R0
    SYMATTR InstName A4
    SYMATTR SpiceLine trise 20e-9 tfall 20e-9 Td 60e-9 vhigh 5v
    SYMBOL cap 1712 576 R0
    WINDOW 0 42 34 Left 0
    SYMATTR InstName C3
    SYMATTR Value 100e-9
    SYMBOL res 1712 352 R0
    SYMATTR InstName R5
    SYMATTR Value 10k
    SYMBOL diode 1824 464 R90
    WINDOW 0 61 32 VBottom 0
    WINDOW 3 60 32 VTop 0
    SYMATTR InstName D3
    SYMATTR Value 1N4148
    SYMBOL diode 1808 48 R90
    WINDOW 0 67 32 VBottom 0
    WINDOW 3 73 32 VTop 0
    SYMATTR InstName D4
    SYMATTR Value 1N4148
    SYMBOL cap 1280 112 R90
    WINDOW 0 71 32 VBottom 0
    WINDOW 3 67 35 VTop 0
    SYMATTR InstName C4
    SYMATTR Value .01e-6
    SYMBOL res 1472 112 R90
    WINDOW 0 69 65 VBottom 0
    WINDOW 3 71 69 VTop 0
    SYMATTR InstName R7
    SYMATTR Value 10k
    TEXT 752 632 Left 0 !.tran 10
    TEXT 744 664 Left 0 !.option noopiter
     
  2. Mark Jerde

    Mark Jerde Guest

  3. John Fields

    John Fields Guest

     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-