* Z:\home\khalils\Downloads\files\data\raw_asc\AD9834.asc
* Generated by LTspice 26.0.1 for Windows.
* Right-Click on Symbol for User Parameters:\nTYPE:\n 0: sinewave \n 1: triangular wave\nCOMP:\n 0: sign bit\n 1: comparator output\nPHASE0,1: register value in decimal\nFREQ0,1: register value in decimal
* Calculation of FREQ and PHASE register values:\nFREQ = desired_freq * 2^28 / fMCLK\nPHASE = desired_phase * 2^12 / 360
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\DAC\AD9834.asy)
V4 PSEL 0 PULSE(0 3.3 12.4u 2n 2n 4u 1m)
R2 IOUT 0 200
C1 SBO 0 15p
R1 IOUTB 0 200
R3 0 N001 6.8k
V3 AVDD 0 3.3
R4 SBO 0 3.1k
V2 FSEL 0 PULSE(0 3.3 4.4u 2n 2n 4.4uu 1m)
V1 MCLK 0 PULSE(0 3.3 0 2n 2n 4.66n 13.33n)
XU1 MCLK FSEL PSEL AVDD 0 N001 IOUT IOUTB SBO IOUT AD9834 TYPE=0 COMP=1 PHASE0=0 PHASE1=90 fMCLK=10Meg FREQ0=50k FREQ1=100k ;pnba MCLK)FSEL)PSEL)AVDD)AGND)FSADJ)IOUT)IOUTB)SBO)VIN
.tran 200u
.lib AD9834.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 1556 1008
WIRE 48 -128 -176 -128
WIRE 128 -128 48 -128
WIRE -176 -80 -176 -128
WIRE 896 -64 -64 -64
WIRE -560 -48 -592 -48
WIRE -272 -48 -480 -48
WIRE 416 -16 240 -16
WIRE 576 -16 496 -16
WIRE 128 16 128 -128
WIRE 240 16 240 -16
WIRE 576 32 576 -16
WIRE -176 48 -176 0
WIRE -64 64 -64 -64
WIRE -16 64 -64 64
WIRE 448 80 384 80
WIRE 896 80 896 -64
WIRE 896 80 448 80
WIRE -272 128 -272 -48
WIRE -128 128 -272 128
WIRE -16 128 -128 128
WIRE 448 160 384 160
WIRE 720 160 448 160
WIRE -560 192 -592 192
WIRE -128 192 -480 192
WIRE -16 192 -128 192
WIRE 720 224 720 160
WIRE 896 224 896 80
WIRE 432 240 384 240
WIRE 512 240 432 240
WIRE 608 240 512 240
WIRE -128 256 -272 256
WIRE -16 256 -128 256
WIRE 512 288 512 240
WIRE 608 288 608 240
WIRE 192 336 192 304
WIRE 720 352 720 304
WIRE 800 352 720 352
WIRE 896 352 896 304
WIRE 896 352 800 352
WIRE 800 384 800 352
WIRE -560 400 -592 400
WIRE -272 400 -272 256
WIRE -272 400 -480 400
WIRE 512 400 512 368
WIRE 608 400 608 352
SYMBOL voltage -176 -96 R0
SYMATTR InstName V3
SYMATTR Value 3.3
SYMBOL voltage -464 192 M270
WINDOW 3 -54 264 VLeft 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 46 68 VLeft 2
SYMATTR Value PULSE(0 3.3 4.4u 2n 2n 4.4uu 1m)
SYMATTR InstName V2
SYMBOL res 880 208 R0
SYMATTR InstName R2
SYMATTR Value 200
SYMBOL res 496 272 R0
SYMATTR InstName R4
SYMATTR Value 3.1k
SYMBOL res 704 208 R0
SYMATTR InstName R1
SYMATTR Value 200
SYMBOL voltage -464 -48 M270
WINDOW 3 -62 268 VLeft 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 51 72 VLeft 2
SYMATTR Value PULSE(0 3.3 0 2n 2n 4.66n 13.33n)
SYMATTR InstName V1
SYMBOL res 512 -32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 6.8k
SYMBOL AD9834 192 160 R0
SYMATTR InstName U1
SYMBOL voltage -464 400 R90
WINDOW 3 50 -119 VRight 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 -47 42 VRight 2
SYMATTR Value PULSE(0 3.3 12.4u 2n 2n 4u 1m)
SYMATTR InstName V4
SYMBOL cap 592 288 R0
SYMATTR InstName C1
SYMATTR Value 15p
FLAG -592 -48 0
FLAG -592 192 0
FLAG 800 384 0
FLAG 192 336 0
FLAG -176 48 0
FLAG 576 32 0
FLAG -128 128 MCLK
FLAG -128 192 FSEL
FLAG 448 80 IOUT
FLAG 448 160 IOUTB
FLAG 432 240 SBO
FLAG -592 400 0
FLAG -128 256 PSEL
FLAG 512 400 0
FLAG 608 400 0
FLAG 48 -128 AVDD
TEXT 792 728 Left 2 !.tran 200u
TEXT -672 520 Left 2 ;Right-Click on Symbol for User Parameters:\nTYPE:\n   0: sinewave \n   1: triangular wave\nCOMP:\n   0: sign bit\n   1: comparator output\nPHASE0,1: register value in decimal\nFREQ0,1: register value in decimal
TEXT 16 520 Left 2 ;Calculation of FREQ and PHASE register values:\nFREQ = desired_freq * 2^28 / fMCLK\nPHASE = desired_phase * 2^12 / 360