⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form100.frm

📁 P1618QP bootloader code
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Fm_Bootload 
   Caption         =   "PIC18F/PIC16F Quick Programmer"
   ClientHeight    =   1260
   ClientLeft      =   165
   ClientTop       =   450
   ClientWidth     =   5460
   Icon            =   "Form100.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   1260
   ScaleWidth      =   5460
   StartUpPosition =   3  'Windows Default
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   2760
      Top             =   480
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.ImageList ImageList2 
      Left            =   600
      Top             =   480
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16711935
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   10
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":030A
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":065E
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":09B2
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":0D06
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":105A
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":13AE
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":1702
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":1A56
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":1DAA
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form100.frx":20FE
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   360
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   5460
      _ExtentX        =   9631
      _ExtentY        =   635
      ButtonWidth     =   609
      ButtonHeight    =   582
      AllowCustomize  =   0   'False
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList2"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   14
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Open"
            Object.ToolTipText     =   "Open HEX File"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Save"
            Object.ToolTipText     =   "Save HEX File"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Clear"
            Object.ToolTipText     =   "Clear Memory"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "View"
            Object.ToolTipText     =   "View Memory"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Abort"
            Object.ToolTipText     =   "Abort Operation"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Connect"
            Object.ToolTipText     =   "Connect to Device"
            ImageIndex      =   6
            Style           =   1
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Read"
            Object.ToolTipText     =   "Read Device"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Write"
            Object.ToolTipText     =   "Write Device"
            ImageIndex      =   8
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Erase"
            Object.ToolTipText     =   "Erase Device"
            ImageIndex      =   9
         EndProperty
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "Run"
            Object.ToolTipText     =   "Normal Execution Mode"
            ImageIndex      =   10
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   1005
      Width           =   5460
      _ExtentX        =   9631
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   5106
            MinWidth        =   1058
            Text            =   "Status"
            TextSave        =   "Status"
            Key             =   "PStatus"
            Object.ToolTipText     =   "Right click for memory read/write settings."
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   556
            MinWidth        =   529
            Text            =   "NA"
            TextSave        =   "NA"
            Key             =   "FirmVer"
            Object.ToolTipText     =   "Firmware version."
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   1693
            MinWidth        =   706
            Text            =   "UNKNOWN"
            TextSave        =   "UNKNOWN"
            Object.ToolTipText     =   "PIC device, right click to select."
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   953
            MinWidth        =   706
            Text            =   "COM1"
            TextSave        =   "COM1"
            Key             =   "CommPort"
            Object.ToolTipText     =   "Right click to change COM port."
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   794
            MinWidth        =   706
            Text            =   "9600"
            TextSave        =   "9600"
            Key             =   "BitRate"
            Object.ToolTipText     =   "Right click to set bit rate."
         EndProperty
      EndProperty
   End
   Begin VB.Menu M_PortSettings 
      Caption         =   "PortSettings"
      Visible         =   0   'False
      Begin VB.Menu M_FPPort 
         Caption         =   "COM1"
         Checked         =   -1  'True
         Index           =   1
      End
      Begin VB.Menu M_FPPort 
         Caption         =   "COM2"
         Index           =   2
      End
      Begin VB.Menu M_FPPort 
         Caption         =   "COM3"
         Index           =   3
      End
      Begin VB.Menu M_FPPort 
         Caption         =   "COM4"
         Index           =   4
      End
   End
   Begin VB.Menu M_BitRateSettings 
      Caption         =   "BitRatetSettings"
      Visible         =   0   'False
      Begin VB.Menu M_FPBaud 
         Caption         =   "9600"
         Checked         =   -1  'True
         Index           =   1
      End
      Begin VB.Menu M_FPBaud 
         Caption         =   "19200"
         Index           =   2
      End
      Begin VB.Menu M_FPBaud 
         Caption         =   "38400"
         Index           =   3
      End
      Begin VB.Menu M_FPBaud 
         Caption         =   "57600"
         Index           =   4
      End
      Begin VB.Menu M_FPBaud 
         Caption         =   "115200"
         Index           =   5
      End
   End
   Begin VB.Menu M_Program 
      Caption         =   "Program"
      Visible         =   0   'False
      Begin VB.Menu M_PDevSelector 
         Caption         =   "Device Selector"
      End
      Begin VB.Menu space104 
         Caption         =   "-"
      End
      Begin VB.Menu M_MemAccess 
         Caption         =   "FLASH"
         Checked         =   -1  'True
         Index           =   1
      End
      Begin VB.Menu M_MemAccess 
         Caption         =   "EEDATA"
         Checked         =   -1  'True
         Index           =   2
      End
      Begin VB.Menu M_MemAccess 
         Caption         =   "CONFIG"
         Index           =   3
      End
      Begin VB.Menu M_MemAccess 
         Caption         =   "USERID"
         Index           =   4
      End
      Begin VB.Menu space102 
         Caption         =   "-"
      End
      Begin VB.Menu M_PSendCfg 
         Caption         =   "Send Config"
      End
      Begin VB.Menu space101 
         Caption         =   "-"
      End
      Begin VB.Menu M_About 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "Fm_Bootload"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Const STATUS_NOT_CON As String = "Not connected..."
Const STATUS_DEVICE_FOUND As String = " detected..."
Const STATUS_DATA_FILE_NOT_FOUND As String = "Data file not found..."
Const STATUS_FAILED_TO_OPEN_PORT As String = "Failed to open port..."
Const STATUS_NO_VERSION_INFO As String = "No firmware version available..."
Const STATUS_FOUND_DEVICE As String = "Device found..."
Const STATUS_READ_FAILURE As String = "Failed to read device..."
Const STATUS_WRITE_FAILURE As String = "Failed to write device..."
Const STATUS_ABORT As String = "Operation aborted..."
Const STATUS_FINISHED As String = "Finished operation..."
Const STATUS_VERIFY_ERROR As String = "Verify error received..."
Const STATUS_RUNMODE_SET As String = "Run mode is set..."
Const STATUS_HEX_FORMAT As String = "HEX file not padded properly..."
Const STATUS_HEX_IMPORTED As String = "HEX file imported..."
Const STATUS_INVALID_HEX As String = "Invalid HEX file..."
Const STATUS_HEX_EXPORTED As String = "HEX file exported..."



Const MODE_NOT_CONNECTED As Integer = 0
Const MODE_CONNECTED_IDLE As Integer = 1
Const MODE_WORKING As Integer = 2

Const PANEL_STATUS As Integer = 1
Const PANEL_FWVER As Integer = 2
Const PANEL_DEVICE As Integer = 3
Const PANEL_PORT As Integer = 4
Const PANEL_BITRATE As Integer = 5


'Flag used for a
Dim PanelClicked As Integer
Dim HideToolFlag As Byte












Private Sub M_PDevSelector_Click()
    DisconnectDev

    D_SelectDevice.Cm_DevList.ListIndex = 0
    D_SelectDevice.Show vbModal, Fm_Bootload
End Sub


Private Sub M_PSendCfg_Click()
    D_WriteFuses.Show vbModal, Fm_Bootload
End Sub




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -