VERSION 5.00 Begin VB.Form MainForm Caption = "USB-DIO-32 Sample" ClientHeight = 8055 ClientLeft = 3480 ClientTop = 4815 ClientWidth = 9855 LinkTopic = "Form1" ScaleHeight = 537 ScaleMode = 3 'Pixel ScaleWidth = 657 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton Command2 Caption = "USB" Enabled = 0 'False Height = 615 Left = 240 TabIndex = 110 Top = 3960 Width = 1215 End Begin VB.CommandButton Command1 BackColor = &H00000000& Caption = "LED" Enabled = 0 'False Height = 375 Left = 240 Style = 1 'Graphical TabIndex = 109 Top = 3120 Width = 735 End Begin VB.CheckBox OutButton Caption = "Output Port C Group 3" Height = 375 Index = 11 Left = 360 Style = 1 'Graphical TabIndex = 44 Top = 2640 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port B Group 3" Height = 375 Index = 10 Left = 3360 Style = 1 'Graphical TabIndex = 43 Top = 2640 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port A Group 3" Height = 375 Index = 9 Left = 6360 Style = 1 'Graphical TabIndex = 42 Top = 2640 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port C Group 2" Height = 375 Index = 8 Left = 6840 Style = 1 'Graphical TabIndex = 41 Top = 5280 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port B Group 2" Height = 375 Index = 7 Left = 3840 Style = 1 'Graphical TabIndex = 40 Top = 5280 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port A Group 2" Height = 375 Index = 6 Left = 840 Style = 1 'Graphical TabIndex = 39 Top = 5280 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port C Group 1" Height = 375 Index = 5 Left = 360 Style = 1 'Graphical TabIndex = 38 Top = 1080 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port B Group 1" Height = 375 Index = 4 Left = 3360 Style = 1 'Graphical TabIndex = 37 Top = 1080 Width = 2895 End Begin VB.CheckBox TristateButton Caption = "Tristate All" Height = 375 Left = 3600 Style = 1 'Graphical TabIndex = 4 Top = 3960 Width = 2775 End Begin VB.CheckBox OutButton Caption = "Output Port A Group 1" Height = 375 Index = 3 Left = 6360 Style = 1 'Graphical TabIndex = 3 Top = 1080 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port C Group 0" Height = 375 Index = 2 Left = 6840 Style = 1 'Graphical TabIndex = 2 Top = 6840 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port B Group 0" Height = 375 Index = 1 Left = 3840 Style = 1 'Graphical TabIndex = 1 Top = 6840 Width = 2895 End Begin VB.CheckBox OutButton Caption = "Output Port A Group 0" Height = 375 Index = 0 Left = 840 Style = 1 'Graphical TabIndex = 0 Top = 6840 Width = 2895 End Begin VB.Timer ReadTime Enabled = 0 'False Interval = 1 Left = 720 Top = 0 End Begin VB.Label Label20 Alignment = 2 'Center BorderStyle = 1 'Fixed Single Caption = "+5V" Height = 255 Left = 360 TabIndex = 130 Top = 5640 Width = 375 End Begin VB.Label Label19 Alignment = 2 'Center BorderStyle = 1 'Fixed Single Caption = "+5V" Height = 255 Left = 360 TabIndex = 129 Top = 7200 Width = 375 End Begin VB.Label Label18 Alignment = 2 'Center BorderStyle = 1 'Fixed Single Caption = "+5V" Height = 255 Left = 9360 TabIndex = 128 Top = 960 Width = 375 End Begin VB.Label Label17 Alignment = 2 'Center BorderStyle = 1 'Fixed Single Caption = "+5V" Height = 255 Left = 9360 TabIndex = 127 Top = 2520 Width = 375 End Begin VB.Label Label14 Alignment = 2 'Center Caption = "Pin 49" Height = 255 Left = 240 TabIndex = 124 Top = 6960 Width = 615 End Begin VB.Label Label13 Alignment = 2 'Center Caption = "Pin 49" Height = 255 Left = 240 TabIndex = 123 Top = 5400 Width = 615 End Begin VB.Image LowLevel Enabled = 0 'False Height = 360 Left = 0 Picture = "MainForm.frx":0000 Top = 0 Visible = 0 'False Width = 360 End Begin VB.Image HighLevel Enabled = 0 'False Height = 360 Left = 360 Picture = "MainForm.frx":04CE Top = 0 Visible = 0 'False Width = 360 End Begin VB.Label Label12 Alignment = 2 'Center Caption = "Pins 1 to 15 odd" Height = 255 Left = 360 TabIndex = 122 Top = 120 Width = 2895 End Begin VB.Label Label11 Alignment = 2 'Center Caption = "Pins 17 to 31 odd" Height = 255 Left = 3360 TabIndex = 121 Top = 120 Width = 2895 End Begin VB.Label Label10 Alignment = 2 'Center Caption = "Pins 33 to 47 odd" Height = 255 Left = 6360 TabIndex = 120 Top = 120 Width = 2895 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "Pins 47 to 33 odd" Height = 255 Left = 840 TabIndex = 119 Top = 6600 Width = 2895 End Begin VB.Label Label8 Alignment = 2 'Center Caption = "Pins 31 to 17 odd" Height = 255 Left = 3840 TabIndex = 118 Top = 6600 Width = 2895 End Begin VB.Label Label7 Alignment = 2 'Center Caption = "Pins 15 to 1 odd" Height = 255 Left = 6840 TabIndex = 117 Top = 6600 Width = 2895 End Begin VB.Label Label6 Alignment = 2 'Center Caption = "Pins 47 to 33 odd" Height = 255 Left = 840 TabIndex = 116 Top = 5040 Width = 2895 End Begin VB.Label Label5 Alignment = 2 'Center Caption = "Pins 31 to 17 odd" Height = 255 Left = 3840 TabIndex = 115 Top = 5040 Width = 2895 End Begin VB.Label Label4 Alignment = 2 'Center Caption = "Pins 15 to 1 odd" Height = 255 Left = 6840 TabIndex = 114 Top = 5040 Width = 2895 End Begin VB.Label Label3 Alignment = 2 'Center Caption = "Pins 1 to 15 odd" Height = 255 Left = 360 TabIndex = 113 Top = 1680 Width = 2895 End Begin VB.Label Label2 Alignment = 2 'Center Caption = "Pins 17 to 31 odd" Height = 255 Left = 3360 TabIndex = 112 Top = 1680 Width = 2895 End Begin VB.Label Label1 Alignment = 2 'Center Caption = "Pins 33 to 47 odd" Height = 255 Left = 6360 TabIndex = 111 Top = 1680 Width = 2895 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "0" Height = 195 Index = 31 Left = 2880 TabIndex = 108 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "1" Height = 195 Index = 30 Left = 2520 TabIndex = 107 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "2" Height = 195 Index = 29 Left = 2160 TabIndex = 106 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "3" Height = 195 Index = 28 Left = 1800 TabIndex = 105 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "4" Height = 195 Index = 27 Left = 1440 TabIndex = 104 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "5" Height = 195 Index = 26 Left = 1080 TabIndex = 103 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "6" Height = 195 Index = 25 Left = 720 TabIndex = 102 Top = 1920 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "7" Height = 195 Index = 24 Left = 360 TabIndex = 101 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "0" Height = 195 Index = 31 Left = 5880 TabIndex = 100 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "1" Height = 195 Index = 30 Left = 5520 TabIndex = 99 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "2" Height = 195 Index = 29 Left = 5160 TabIndex = 98 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "3" Height = 195 Index = 28 Left = 4800 TabIndex = 97 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "4" Height = 195 Index = 27 Left = 4440 TabIndex = 96 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "5" Height = 195 Index = 26 Left = 4080 TabIndex = 95 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "6" Height = 195 Index = 25 Left = 3720 TabIndex = 94 Top = 1920 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "7" Height = 195 Index = 24 Left = 3360 TabIndex = 93 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "0" Height = 195 Index = 23 Left = 8880 TabIndex = 92 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "1" Height = 195 Index = 22 Left = 8520 TabIndex = 91 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "2" Height = 195 Index = 21 Left = 8160 TabIndex = 90 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "3" Height = 195 Index = 20 Left = 7800 TabIndex = 89 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "4" Height = 195 Index = 19 Left = 7440 TabIndex = 88 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "5" Height = 195 Index = 18 Left = 7080 TabIndex = 87 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "6" Height = 195 Index = 17 Left = 6720 TabIndex = 86 Top = 1920 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "7" Height = 195 Index = 16 Left = 6360 TabIndex = 85 Top = 1920 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 95 Left = 360 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 94 Left = 720 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 93 Left = 1080 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 92 Left = 1440 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 91 Left = 1800 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 90 Left = 2160 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 89 Left = 2520 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 88 Left = 2880 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 87 Left = 3360 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 86 Left = 3720 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 85 Left = 4080 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 84 Left = 4440 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 83 Left = 4800 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 82 Left = 5160 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 81 Left = 5520 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 80 Left = 5880 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 79 Left = 6360 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 78 Left = 6720 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 77 Left = 7080 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 76 Left = 7440 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 75 Left = 7800 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 74 Left = 8160 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 73 Left = 8520 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 72 Left = 8880 Top = 2160 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 71 Left = 6840 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 70 Left = 7200 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 69 Left = 7560 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 68 Left = 7920 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 67 Left = 8280 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 66 Left = 8640 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 65 Left = 9000 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 64 Left = 9360 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 63 Left = 3840 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 62 Left = 4200 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 61 Left = 4560 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 60 Left = 4920 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 59 Left = 5280 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 58 Left = 5640 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 57 Left = 6000 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 56 Left = 6360 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 55 Left = 840 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 54 Left = 1200 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 53 Left = 1560 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 52 Left = 1920 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 51 Left = 2280 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 50 Left = 2640 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 49 Left = 3000 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 48 Left = 3360 Top = 5760 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 47 Left = 360 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 46 Left = 720 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 45 Left = 1080 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 44 Left = 1440 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 43 Left = 1800 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 42 Left = 2160 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 41 Left = 2520 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 40 Left = 2880 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 39 Left = 3360 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 38 Left = 3720 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 37 Left = 4080 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 36 Left = 4440 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 35 Left = 4800 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 34 Left = 5160 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 33 Left = 5520 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 32 Left = 5880 Top = 600 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "0" Height = 195 Index = 15 Left = 2880 TabIndex = 60 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "1" Height = 195 Index = 14 Left = 2520 TabIndex = 59 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "2" Height = 195 Index = 13 Left = 2160 TabIndex = 58 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "3" Height = 195 Index = 12 Left = 1800 TabIndex = 57 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "4" Height = 195 Index = 11 Left = 1440 TabIndex = 56 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "5" Height = 195 Index = 10 Left = 1080 TabIndex = 55 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "6" Height = 195 Index = 9 Left = 720 TabIndex = 54 Top = 360 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "7" Height = 195 Index = 8 Left = 360 TabIndex = 53 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "0" Height = 195 Index = 15 Left = 5880 TabIndex = 52 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "1" Height = 195 Index = 14 Left = 5520 TabIndex = 51 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "2" Height = 195 Index = 13 Left = 5160 TabIndex = 50 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "3" Height = 195 Index = 12 Left = 4800 TabIndex = 49 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "4" Height = 195 Index = 11 Left = 4440 TabIndex = 48 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "5" Height = 195 Index = 10 Left = 4080 TabIndex = 47 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "6" Height = 195 Index = 9 Left = 3720 TabIndex = 46 Top = 360 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "7" Height = 195 Index = 8 Left = 3360 TabIndex = 45 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "7" Height = 195 Index = 7 Left = 6360 TabIndex = 36 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "6" Height = 195 Index = 6 Left = 6720 TabIndex = 35 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "5" Height = 195 Index = 5 Left = 7080 TabIndex = 34 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "4" Height = 195 Index = 4 Left = 7440 TabIndex = 33 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "3" Height = 195 Index = 3 Left = 7800 TabIndex = 32 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "2" Height = 195 Index = 2 Left = 8160 TabIndex = 31 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "1" Height = 195 Index = 1 Left = 8520 TabIndex = 30 Top = 360 Width = 375 End Begin VB.Label BitLabelD Alignment = 2 'Center Caption = "0" Height = 195 Index = 0 Left = 8880 TabIndex = 29 Top = 360 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "7" Height = 195 Index = 7 Left = 6840 TabIndex = 28 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "6" Height = 195 Index = 6 Left = 7200 TabIndex = 27 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "5" Height = 195 Index = 5 Left = 7560 TabIndex = 26 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "4" Height = 195 Index = 4 Left = 7920 TabIndex = 25 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "3" Height = 195 Index = 3 Left = 8280 TabIndex = 24 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "2" Height = 195 Index = 2 Left = 8640 TabIndex = 23 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "1" Height = 195 Index = 1 Left = 9000 TabIndex = 22 Top = 7800 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "0" Height = 195 Index = 0 Left = 9360 TabIndex = 21 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "7" Height = 195 Index = 7 Left = 3840 TabIndex = 20 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "6" Height = 195 Index = 6 Left = 4200 TabIndex = 19 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "5" Height = 195 Index = 5 Left = 4560 TabIndex = 18 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "4" Height = 195 Index = 4 Left = 4920 TabIndex = 17 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "3" Height = 195 Index = 3 Left = 5280 TabIndex = 16 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "2" Height = 195 Index = 2 Left = 5640 TabIndex = 15 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "1" Height = 195 Index = 1 Left = 6000 TabIndex = 14 Top = 7800 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "0" Height = 195 Index = 0 Left = 6360 TabIndex = 13 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "7" Height = 195 Index = 7 Left = 840 TabIndex = 12 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "6" Height = 195 Index = 6 Left = 1200 TabIndex = 11 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "5" Height = 195 Index = 5 Left = 1560 TabIndex = 10 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "4" Height = 195 Index = 4 Left = 1920 TabIndex = 9 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "3" Height = 195 Index = 3 Left = 2280 TabIndex = 8 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "2" Height = 195 Index = 2 Left = 2640 TabIndex = 7 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "1" Height = 195 Index = 1 Left = 3000 TabIndex = 6 Top = 7800 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "0" Height = 195 Index = 0 Left = 3360 TabIndex = 5 Top = 7800 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 31 Left = 6360 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 30 Left = 6720 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 29 Left = 7080 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 28 Left = 7440 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 27 Left = 7800 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 26 Left = 8160 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 25 Left = 8520 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 24 Left = 8880 Top = 600 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 23 Left = 6840 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 22 Left = 7200 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 21 Left = 7560 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 20 Left = 7920 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 19 Left = 8280 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 18 Left = 8640 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 17 Left = 9000 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 16 Left = 9360 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 15 Left = 3840 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 14 Left = 4200 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 13 Left = 4560 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 12 Left = 4920 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 11 Left = 5280 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 10 Left = 5640 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 9 Left = 6000 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 8 Left = 6360 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 7 Left = 840 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 6 Left = 1200 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 5 Left = 1560 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 4 Left = 1920 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 3 Left = 2280 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 2 Left = 2640 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 1 Left = 3000 Top = 7320 Width = 375 End Begin VB.Image LevelImage Height = 375 Index = 0 Left = 3360 Top = 7320 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "0" Height = 195 Index = 23 Left = 3360 TabIndex = 84 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "1" Height = 195 Index = 22 Left = 3000 TabIndex = 83 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "2" Height = 195 Index = 21 Left = 2640 TabIndex = 82 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "3" Height = 195 Index = 20 Left = 2280 TabIndex = 81 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "4" Height = 195 Index = 19 Left = 1920 TabIndex = 80 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "5" Height = 195 Index = 18 Left = 1560 TabIndex = 79 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "6" Height = 195 Index = 17 Left = 1200 TabIndex = 78 Top = 6240 Width = 375 End Begin VB.Label BitLabelA Alignment = 2 'Center Caption = "7" Height = 195 Index = 16 Left = 840 TabIndex = 77 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "0" Height = 195 Index = 23 Left = 6360 TabIndex = 76 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "1" Height = 195 Index = 22 Left = 6000 TabIndex = 75 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "2" Height = 195 Index = 21 Left = 5640 TabIndex = 74 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "3" Height = 195 Index = 20 Left = 5280 TabIndex = 73 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "4" Height = 195 Index = 19 Left = 4920 TabIndex = 72 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "5" Height = 195 Index = 18 Left = 4560 TabIndex = 71 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "6" Height = 195 Index = 17 Left = 4200 TabIndex = 70 Top = 6240 Width = 375 End Begin VB.Label BitLabelB Alignment = 2 'Center Caption = "7" Height = 195 Index = 16 Left = 3840 TabIndex = 69 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "0" Height = 195 Index = 15 Left = 9360 TabIndex = 68 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "1" Height = 195 Index = 14 Left = 9000 TabIndex = 67 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "2" Height = 195 Index = 13 Left = 8640 TabIndex = 66 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "3" Height = 195 Index = 12 Left = 8280 TabIndex = 65 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "4" Height = 195 Index = 11 Left = 7920 TabIndex = 64 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "5" Height = 195 Index = 10 Left = 7560 TabIndex = 63 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "6" Height = 195 Index = 9 Left = 7200 TabIndex = 62 Top = 6240 Width = 375 End Begin VB.Label BitLabelC Alignment = 2 'Center Caption = "7" Height = 195 Index = 8 Left = 6840 TabIndex = 61 Top = 6240 Width = 375 End Begin VB.Label Label16 Alignment = 2 'Center Caption = "Pin 49" Height = 255 Left = 9240 TabIndex = 126 Top = 720 Width = 615 End Begin VB.Label Label15 Alignment = 2 'Center Caption = "Pin 49" Height = 255 Left = 9240 TabIndex = 125 Top = 2280 Width = 615 End End Attribute VB_Name = "MainForm" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'Private Declare Function DIO_Configure Lib "AIOUSB" Alias "VBDIO_Configure" (ByVal DeviceIndex As Long, ByVal Tristate As Boolean, ByRef OutMask As Any, ByRef Data As Any) As Long 'Private Declare Function CTR_8254Mode Lib "AIOUSB" Alias "VBCTR_8254Mode" (ByVal DeviceIndex As Long, ByVal BlockIndex As Long, ByVal CounterIndex As Long, ByVal Mode As Long) As Long 'Private Declare Function CTR_8254ModeLoad Lib "AIOUSB" Alias "VBCTR_8254ModeLoad" (ByVal DeviceIndex As Long, ByVal BlockIndex As Long, ByVal CounterIndex As Long, ByVal Mode As Long, ByVal LoadValue As Integer) As Long 'Private Declare Function DIO_Write1 Lib "AIOUSB" Alias "VBDIO_Write1" (ByVal DeviceIndex As Long, ByVal BitIndex As Long, ByVal Data As Boolean) As Long 'Private Declare Function DIO_ReadAll Lib "AIOUSB" Alias "VBDIO_ReadAll" (ByVal DeviceIndex As Long, ByRef Data As Any) As Long Public DeviceIndex As Long Dim DIOData(0 To 11) As Byte Dim DoUpdate As Boolean Public DetectOK As Boolean Private Function FormatFreq(Freq As Double) As String If Freq >= 1000000 Then FormatFreq = Format$(Freq / 1000000, "0.0MHz") ElseIf Freq >= 10000 Then FormatFreq = Format$(Freq / 1000, "0.0KHz") ElseIf Freq >= 1000 Then FormatFreq = Format$(Freq / 1000, "0.0KHz") ElseIf Freq >= 10 Then FormatFreq = Format$(Freq, "0.00Hz") ElseIf Freq >= 1 Then FormatFreq = Format$(Freq, "0.00Hz") Else FormatFreq = Format$(Freq, "0.00Hz") End If End Function Private Sub Form_Load() Dim OutMask As Integer Dim I As Integer Dim Status As Long DeviceIndex = diOnly For I = 0 To 11 DIOData(I) = &HFF Next OutMask = &H0 Status = DIO_Configure(DeviceIndex, False, OutMask, DIOData(0)) If Status <> ERROR_SUCCESS Then Call DetectForm.Show(vbModal, Me) If DetectOK = False Then Unload Me Exit Sub End If End If DoUpdate = True ReadTime.Enabled = True End Sub Private Sub Form_Unload(Cancel As Integer) ReadTime.Enabled = False End Sub Private Sub LevelImage_Click(Index As Integer) Dim NewValue As Boolean Dim BitIndex As Integer, ByteIndex As Integer BitIndex = Index Mod 8 ByteIndex = Index \ 8 DIOData(ByteIndex) = DIOData(ByteIndex) Xor (2 ^ BitIndex) 'Toggle bit NewValue = (DIOData(ByteIndex) And (2 ^ BitIndex)) <> 0 'Get bit value Call DIO_Write1(DeviceIndex, Index, NewValue) DoUpdate = True End Sub Private Sub OutButton_Click(Index As Integer) Dim I As Integer Dim OutMask As Integer Dim TristateChecked As Boolean OutMask = &H0 For I = 0 To 11 If OutButton(I).Value = 1 Then OutMask = OutMask Or (2 ^ I) End If Next I TristateChecked = (TristateButton.Value = 1) Call DIO_Configure(DeviceIndex, TristateChecked, OutMask, DIOData(0)) DoUpdate = True End Sub Private Sub ReadTime_Timer() Dim BitI As Integer, ByteI As Integer Dim oDIOData(0 To 11) As Byte Dim Changes(0 To 11) As Byte For ByteI = 0 To 11 oDIOData(ByteI) = DIOData(ByteI) Next Call DIO_ReadAll(DeviceIndex, DIOData(0)) If DoUpdate Then For ByteI = 0 To 11 Changes(ByteI) = &HFF Next DoUpdate = False Else For ByteI = 0 To 11 Changes(ByteI) = DIOData(ByteI) Xor oDIOData(ByteI) Next End If For ByteI = 0 To 11 For BitI = 0 To 7 If (Changes(ByteI) And (2 ^ BitI)) <> 0 Then If (DIOData(ByteI) And (2 ^ BitI)) <> 0 Then LevelImage(ByteI * 8 + BitI).Picture = HighLevel.Picture Else LevelImage(ByteI * 8 + BitI).Picture = LowLevel.Picture End If 'DIOData End If 'Changes Next BitI Next ByteI End Sub Private Sub TristateButton_Click() Dim I As Integer Dim OutMask As Integer Dim TristateChecked As Boolean OutMask = &H0 For I = 0 To 11 If OutButton(I).Value = 1 Then OutMask = OutMask Or (2 ^ I) End If Next I TristateChecked = (TristateButton.Value = 1) Call DIO_Configure(DeviceIndex, TristateChecked, OutMask, DIOData(0)) End Sub