Version 4 SHEET 1 880 680 WIRE -320 -64 -416 -64 WIRE -320 96 -416 96 WIRE -320 256 -416 256 FLAG -320 -64 my_pwm1 FLAG -320 96 my_pwm2 FLAG -320 256 my_pwm3 SYMBOL PWM_Gen -464 -64 R0 WINDOW 39 37 62 Bottom 2 SYMATTR SpiceLine DutyCycle=1 PWM_V=3.3 PWM_f=50k SYMATTR InstName X1 SYMBOL PWM_Gen -464 96 R0 WINDOW 39 -25 67 Bottom 2 SYMATTR SpiceLine DutyCycle={DutyCycle2} PWM_V=3.3 PWM_f=50k SYMATTR InstName X2 SYMBOL PWM_Gen -464 256 R0 WINDOW 39 -84 64 Bottom 2 SYMATTR SpiceLine DutyCycle={DutyCycle3} PWM_V=PWM3_V PWM_f=PWM3_f SYMATTR InstName X3 TEXT -528 -328 Left 2 !.tran 0.0005 TEXT -144 160 Left 2 !.param DutyCycle2=40 TEXT -144 336 Left 2 !.param DutyCycle3=75 TEXT -536 -464 Left 5 ;PWM Signal Generator - Example Usage TEXT -536 -408 Left 3 ;J.Kincell June 2021\nCurrentSauce.co.uk TEXT -144 -72 Left 2 ;Example 1. All parameters are set within.\ni.e. Right Click component, add the PARAMS as shown here.\n(Tick the check box so it apprears in sch) TEXT -144 64 Left 2 ;Example 2. Some parameters are set within.\nThe duty cycle is set via an 'external' .PARAM placed within the schematic.\nAllows multiple instantiations of different PWM sources TEXT -144 368 Left 2 !.param PWM3_V=5 TEXT -144 400 Left 2 !.param PWM3_f=25k TEXT -144 248 Left 2 ;Example 3. All parameters set by external .PARAM statement\nWhen doing this, is clearer to not display the component PARAMS.\ni.e. Untick the checkbox after right clicking) TEXT -528 -256 Left 2 ;Put the "PWM_Gen.asy" and "PWM_Gen.asc" in the top-level of a simulation project.\nWhen adding a component, at the top, change the "top-level" drop-down box from the\ndefault directory to the project directory, and there you will find the "PWM_Gen" component.