L)R)KIK  ! g   5 G4 U 8b  o  |     :  1    . i   :  :  M "  "  " (DDS3 PC Driven Synthesiser: CW and Sweep 0 HzOutput Frequency AttenDisplay 70 dB Attenuation Set &Low Fr&CW&Start Set &I/O Adr Set &Freq Set &Atten Set &High Fr&QuitHel&PS&WeepSw St&EpS&TopDds3mainOutFreqDisplay  Label1 AttenDisplay% Label23 SetLowFreq>StopDDSN SetSweepStepZCWSelectfStartDDSv SetIOAddressSetFreqSetAtten SweepSelect SetHighFreqQuitHelp4Q$!h[qVgbK;wp<TmKMyl!xCommand1_Click Input_stringCommand2_ClickCommand3_ClickCommand4_ClickCommand5_ClickCommand6_ClickCommand7_ClickCommand8_ClickCommand9_ClickCommand10_Click.Command11_ClickACommand12_ClickyCommand20_Click Input_freq Output_freqTEXTCommand21_ClickCommand22_ClickCommand23_Click  Attenuation OutputBytes BinaryConstCommand24_Click)Command14_Click4 OutputFreqOutFreqDisplayTEXTCommand16_Click? OutputAtten AttenDisplayAttenDisplay.TEXTd AttenSettingOutFreqDisplaytOutFreqDisplay.TEXTX FreqSettingCommand18_Click$ SendBytesCommand19_Clickn Form_ClickSendFreq(OutByteqBaseByte BaseAddr,BinConstOutFreqOutAtten, SendAttenSendBytel SendByte NOutF_CardFreqM@ RefBinWeightFreqHighFreqLow  SetFreq_Click> WantedFreqDisplayz Display.TEXT FreqInputISetAtten_Click AttenInputi WantedAttenX Quit_ClickSetIOAddress_Click WantedBase BaseInputHexInputHexStringToDecimal StopDDS_ClickSetDDSClock_Click SourceCode StrLen\ HexvaluexChar OutFreqString Form_Load WindowState AttenVFreqCWSelect_Clickc SetHighFreqVISIBLEENABLED SetLowFreq SetSweepStepStartDDSSetFreqStartDDS_ClickRunFlag?FreqStep: tepfDummyVarEventsSetLowFreq_Click)SetHighFreq_Click SweepSelect_ClickK SweepStep<SetSweepStep_Click FreqdispQ StopDDS SetIOAddress TRUEFALSE SHIFT_MASK CTRL_MASK2 ALT_MASK LEFT_BUTTON0 RIGHT_BUTTONh KEY_BACK KEY_TABN KEY_CLEAR KEY_RETURN[ KEY_SHIFT$ KEY_CONTROLZKEY_MENU3 KEY_PAUSE KEY_CAPITALA KEY_ESCAPEr KEY_SPACE- KEY_PRIOR~KEY_NEXTKEY_ENDKEY_HOMEKEY_LEFTKEY_UP KEY_RIGHT KEY_DOWN KEY_SELECT KEY_PRINT KEY_EXECUTE KEY_SNAPSHOTK KEY_INSERT KEY_DELETEKEY_HELPG KEY_NUMPAD0 KEY_NUMPAD1 KEY_NUMPAD2 KEY_NUMPAD3 KEY_NUMPAD4 KEY_NUMPAD5 KEY_NUMPAD6) KEY_NUMPAD73 KEY_NUMPAD8 KEY_NUMPAD9= KEY_MULTIPLY KEY_ADD KEY_SUBTRACTq KEY_DECIMAL KEY_DIVIDER KEY_F1] KEY_F2 KEY_F3 KEY_F4 KEY_F5KEY_F6 KEY_F7KEY_F8" KEY_F9 KEY_F10 KEY_F11! KEY_F12w KEY_NUMLOCKy KEY_SCRLOCKF ENTER LEAVE OVER MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_YESNOCANCEL MB_YESNOT MB_RETRYCANCELh MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3a IDOKIDCANCELIDABORT IDRETRYr IDIGNORE IDYES IDNO CANCEL_DRAG BEGIN_DRAG( END_DRAG MODELESS MODAL< LEFT_JUSTIFYj RIGHT_JUSTIFY CENTERK BLACKt BLUEGREEN^ CYAN RED/ MAGENTA? BROWNWHITE GRAY~ BRIGHT_BLUEO BRIGHT_GREEN BRIGHT_CYAN BRIGHT_RED PINK YELLOW@ BRIGHT_WHITEj NONE FIXED_SINGLE SIZABLE_SINGLE FIXED_DOUBLE SIZABLE_DOUBLE FIXED_SOLID SIZABLE_SOLID SINGLE_LINE DOUBLE_LINE9 MANUAL AUTOMATICNORMAL" MDI DEFAULT BLOCK CROSSHAIRIBEAMICON/ SIZE_POINTER LEFT_ARROWSIZE_N_S RIGHT_ARROW SIZE_W_EUP_ARROW HOURGLASS DOWN_ARROW HORIZONTAL VERTICALBOTH UNCHECKED CHECKEDGRAYED MINIMIZED MAXIMIZEDS ACCESSKEY_FORECOLORn ACTIVE_BORDER_BACKCOLORACTIVE_BORDER_FORECOLORACTIVE_WINDOW_SHADOWCOMBUTTON_FORECOLOR DESKTOP_BACKCOLORDESKTOP_FORECOLORDESKTOP_PATTERNDISABLED_ITEM_FORECOLOR"MENU_BACKCOLOR4MENU_FORECOLOROMENU_SELECTED_BACKCOLORMENU_SELECTED_FORECOLORSCROLLBAR_BACKCOLORSCROLLBAR_FORECOLORTHREE_DTITLEBAR_BACKCOLORTITLEBAR_FORECOLORSCREEN ControlPanel Help_ClickMsgCRPromptPressaccept !'Module level code for DDS3main module 7CONSTANT.BI' 'Include control panel definitions H-0 Visual Basic for MS-DOS Constant Include File2 Include file that contains constant definitions5 for enumerated form or control property values and-: event procedure, method, and function parameter values. eA This file can be included and used as is in your applications.-B Each constant definition reduces the amount of memory availableD for your application, however, so for best results, include only B those constant definitions you plan to use in your application.H In addition, some of the constant definitions below may conflict with3 variable definitions in your existing programs. l v6 Some constants below are commented out because they8 have duplicates (for example, NONE appears in several places).l0 Copyright (C) 1982-1992 Microsoft Corporation: You have a royalty-free right to use, modify, reproduceD and distribute the sample applications and toolkits provided with8 Visual Basic for MS-DOS (and/or any modified version); in any way you find useful, provided that you agree thati: Microsoft has no warranty, obligations or liability for. any of the sample applications or toolkits. H- - General - Booleans#dx f#d n - Event parameters- -C Button and Shift (KeyDown, KeyUp, MouseDown, MouseMove, MouseUp)-#d w#d #d #d #d  KeyCode (KeyDown, KeyUp)n#d! #d% #e #e  Enter key#e #e #e  Alt key#e #e $ Caps lock key#e 3#e A#e! N Page up key#e" [ Page down key#e# g#e$ r#e% ~#e& #e' #e( #e) #e* #e+ #e, #e- #e 5 Delete key returns 46 in Visual Basic for Windows.e#e/ : KeyCode parameter in KeyDown and KeyUp event procedures< returns the same value as KeyAscii in the KeyPress event 7 procedure for keys corresponding to ASCII printable v; characters (A-Z, a-z, 0-9, ~,[,],{,},+,=, etc). Return 8 values will be the ASCII value of the character (see 8 ASCII Character Codes topic in Help). Extended ASCII6 characters can be returned via KeyCode and KeyAscii9 by holding down the ALT key, entering the ASCII number6 of the extended ASCII character, then releasing the< ALT key. Note, the NumLock key must be on if the numeric keypad is used.#e0 #e1 #e2 -#e3 <#e4 K#e5 Z#e6 i#e7 x#e8 #e9 #e* #e+ #e- #e. #e/ #ep #eq #er  #es #et  #eu  #ev ) #ew 3 #ex = #ey G #ez R #e{ ] #e h #e w  State (DragOver)#d #d #d  - Function parameters - MSGBOX parameters#d ( OK button onlym#d ( OK and Cancel buttons#d #( Abort, Retry, and Ignore buttonso#d ( Yes, No, and Cancel buttons#d ( Yes and No buttonsl#d ( Retry and Cancel buttonso#d ( First button is default#e  ( Second button is default#e ! ( Third button is default MSGBOX return valueso#d 2 ( OK button pressed#d : ( Cancel button pressed#d F ( Abort button pressedd#d Q ( Retry button pressedd#d \ ( Ignore button pressed#d h ( Yes button presseds#d q ( No button pressed - Method parameters - DRAG (controls)#d y #d #d  SHOW (form)#d #d  - Property values - Alignment (label)#d ( 0 - Left Justifyd#d ( 1 - Right Justify#d ( 2 - CenterJ( BackColor, ForeColor (form, controls)#d #d #d #d #d  #d #d  #d  #d! ( #d% 0 #d) ? #e O #e ^ #e l #e t #e ~  BorderStyle (form)o#d ( 0 - Nonem#d ( 1 - Fixed Singler#d ( 2 - Sizable Single#d ( 3 - Fixed Doublel#d ( 4 - Sizable Double#d ( 5 - Fixed Solid#d ( 6 - Sizable Solid- BorderStyle (label, picture box, text box) CONST NONE = 0  ' 0 - None#d ( 1 - Single Line#d /( 2 - Double Line (label and picture box only)m DragMode (controls)#d  ( 0 - Manual)#d " ( 1 - Automaticf FormType (form - Multiple Document Interface (MDI) vs Single Document Interface (SDI) applications)#d / 0( 0 - Normal (Normal form in SDI applications, ($(  child form in MDI applications)#d 9 .( 1 - MDI (Container form in MDI application) MousePointer (form, controls)#d @ E( 0 - Default (Same MousePointer as container object's MousePointer)r#d K ( 1 - Block (ASCII 219)#d T ( 2 - Cross (ASCII 197)#d a ( 3 - I-Beam (ASCII 73)#d j ( 4 - Icon (ASCII 002))#d r ( 5 - Size (ASCII 015))#d ( 6 - Left Arrow (ASCII 027)n#d #( 7 - Size North South (ASCII 018)s#d! ( 8 - Right Arrow (ASCII 026)#d% !( 9 - Size West East (ASCII 029)8#d) ( 10 - Up Arrow (ASCII 024)#e ( 11 - Hourglass (ASCII 088)9#e ( 12 - Down Arrow (ASCII 025) ScrollBar (text box)A CONST NONE = 0  ' 0 - None#d ( 1 - Horizontal #d ( 2 - Verticala#d ( 3 - Bothi Value (check box)#d ( 0 - Unchecked#d ( 1 - Checked#d  ( 2 - Grayedd WindowState (form)d" CONST NORMAL = 0  ' 0 - Normal#d " ( 1 - Minimized#d / ( 2 - Maximized% SCREEN.ControlPanel array elements #d < &( Access key foreground color (0-15).#d S )( Active border background color (0-15).a#d n )( Active border foreground color (0-15).a#d )( Active window shadow effect (Boolean).a#d *( Command button foreground color (0-15).#d #( Desktop background color (0-15).(#d #( Desktop foreground color (0-15).(#d &( Desktop fill pattern (ASCII 0-255).#d! 5( Disabled menu/dialog item foreground color (0-15).'#d%  ( Menu background color (0-15).#d) " ( Menu foreground color (0-15).#e 4.( Menu selected item background color (0-15).#e O.( Menu selected item foreground color (0-15).#e j%( Scrollbar background color (0-15).r#e %( Scrollbar foreground color (0-15).r#e 2( 3-D effect for controls with borders (Boolean).#e $( Titlebar background color (0-15).#e $( Titlebar foreground color (0-15).}:d"Bytes sent to DDS card}n "Card base address in decimal} +"Template for bits 0-4 of lowest data byte} "Upper limit for sweeping}  "Lower limit for sweeping}@  4"Current output frequency}r  ?"Current output attenuation}  "Sweeping increment}  "Sweep run flagDzD$DK A SendAtten80vK}$ X Q d! -wN m dB" Kq  X+Fetch template for base address data byte e(^] Xe  X e(w  e^] Xe@ X ew  d)^] Xe X d)w   XQ   SendFreq8fv$}. t }>  $m#,#" ?'Display output freqge ?-wN ?m Hz" q $d  $#Allow for 2Hz incrementing of DDS tdd dxW d tClear byte first dddxW Now do binary conversion0d d! td wnp nv 0 $ ^a0 td v t0 $ w $0P f  t t%Byte now assembled, so send tf2 Loop until all three freq bytes assembled & sent dd*And finally send HOPCLK to load into DDSQ  SetFreq_Click0v} F mGive desired frequency in Hz  Z  d^ kdKb]~S m"Sorry -- Outside range (0 - 15MHz)b   4 47Q  SetAtten_Click04v }  d]VmPlease set DDS card address"U4F m&Give desired output attenuation in dB: , ,Z  d^ eFb]S mSorry -- Outside range (0-70dB)"bZd) d)&p ?*Convert to multiple of 10 ?7KQ   Quit_Click0v;NQ SetIOAddress_Click0vI} me d)  mGive DDS3 card's I/O base"   maddress in hex. (Click on"   m[OK] or press to   maccept default value): F mEnter DDS Address"m0338 z z m mg^ mgb]S  m"Sorry -- Outside range (200 - 3F8)b m  d d*Reset DDS card before proceeding furtherQ  StopDDS_Click0vd /Reset run flag...m 0 Hz q/Update frequency displaym 70 dB" Kq/And atten display also d d/And finally reset DDS cardQ HexStringToDecimal8Xz}. $ }H t d  z-  td V@ ep  z td3  t0m1"m9"<@  Z 0mA";ma";@ d) 0mB";mb";@ e  0mC";mc";@ e  0mD";md";@ e  0mE";me";@ e 0mF";mf";@ e 0mH";mh";@ e  R tf  Q  Form_Load0^vd S d n d  e  d d Make sure base byte is set upod & Sweep step too...pd M-Hide & disable some controls to guide setupd Xd >Md >Xd cMd cXd qMd qXd Md XQ CWSelect_Click0v, d]Lm!Please set DDS card base address!"U(d >M"Hide & disable unwanted controlsd >Xd cMd cXd qMd qXd Md Xdx M Show & enabled wanted controlsdx XQ  StartDDS_Click0Vv d]FmPlease set Sweep Low LimitUZ d]mPlease set Sweep High Limit"UZ d]mPlease set Sweep Step"UZd X% Disable button to prevent recursione K Set focus on stop button ?7K- Restore user's set attenuation if necessarybdx # Set DDS run flag for loop controli  4F 47# Send current freq to DDS, display 4  4 4 _]  4   Go check for stop button press ddx X Re-enable button on exitQ SetLowFreq_Click0v} F m#Give desired Low Sweep Limit in Hz:"  Z  d ^ k [cKb]S m$Sorry -- Outside range (0 - 14.9MHz)b   Q  SetHighFreq_Click0Dv}  d]bm%Please set Low Limit Frequency first!"UFF m%Give desired sweep upper limit in Hz:"  Z  d^ kdKb]S m$Sorry -- Outside range (4Hz - 15MHz)bf  b]:mNot above lower limit!UF  Q  SweepSelect_Click0&v d]Lm!Please set DDS card base address!"U4d M!Hide & disable unwanted controlsd Xdx >M& show/enable wanted controlssdx >Xdx cMdx cXdx qMdx qXdx Mdx XQ  SetSweepStep_Click0v)} F m"Give desired frequency step in Hz:  Z  d^ kdK wnc]S mSorry -- Outside Range!"b   Q   Help_Click0ve d)  m5This program is designed to allow easy control of the"   m0Novatech DDS3 PC synthesiser card for both fixed   m!frequency operation and sweeping."   m3It can be controlled using either the keyboard or a"   m1Microsoft-compatible mouse. With a keyboard, hold"   m2the key down and press a button's access key   m2(highlighted letter). closes dialog boxes.   m5To begin, use the [Set I/O] button to set the program"   m,for the I/O address your card is located at.   m-Then click either the [CW] or [Sweep] buttons"   m2as desired. For CW, use [Set Freq] and [Set Atten]   m3keys; for sweeping, [Set Low Fr], [Set High Fr] and"   m3[Sw Step] keys (in that order) -- plus [Set Atten]."   m5Note that the [Stop] key stops and resets DDS in both"   m7CW and sweep modes, but [Start] restarts in sweep only."   m7Written by Jim Rowe, Electronics Australia January 1994"  dm*DDS3 PC CW & Sweeping Program -- Help TextQ