├── PICkit2V2
├── Icon1.ico
├── Icon2.ico
├── Icon3.ico
├── icon1.bmp
├── .gitignore
├── PICkitFunctions.cs
├── FormPICkit2.Designer.cs
├── packages.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── ClassDiagram1.cd
├── DialogTrigger.cs
├── Program.cs
├── DialogDevFile.cs
├── DialogVDDErase.cs
├── DialogAbout.cs
├── DialogCustomBaud.cs
├── SetOSCCAL.cs
├── DialogUserIDs.cs
├── USB.cs
├── DialogUnitSelect.cs
├── DeviceData.cs
├── dialogSounds.cs
├── DialogDevFile.Designer.cs
├── DialogCustomBaud.Designer.cs
├── DialogUnitSelect.Designer.cs
├── DialogTrigger.Designer.cs
├── DialogDevFile.resx
├── DialogTrigger.resx
├── DialogUserIDs.resx
├── SetOSCCAL.resx
├── DialogConfigEdit.resx
├── DialogCustomBaud.resx
├── DialogUnitSelect.resx
├── DialogVDDErase.resx
├── FormTestMemory.resx
├── DialogVDDErase.Designer.cs
├── SetOSCCAL.Designer.cs
├── dialogSounds.resx
├── FormMultiWinEEData.resx
├── FormMultiWinProgMem.resx
├── DialogAbout.resx
├── Utilities.cs
├── DeviceFile.cs
├── DialogPK2Go.resx
├── DialogUserIDs.Designer.cs
├── DialogAbout.Designer.cs
└── DialogCalibrate.cs
├── bundle
├── bin
│ ├── PK2Test.dll
│ └── pickit3
├── PK2DeviceFile.dat
├── sounds
│ ├── error.wav
│ ├── success.wav
│ └── warning.wav
├── DBE Demo
│ ├── 16F887Demo.asm
│ ├── 16F887Demo.lst
│ ├── PIC16F887 Debug Demo.mcw
│ ├── 16F887Demo.HEX
│ ├── PIC16F887 Debug Demo.mcp
│ └── PIC16F887 Debug Demo.mcs
└── docs
│ ├── Logic Tool User Guide.pdf
│ ├── PICkit2 User Guide 51553E.pdf
│ ├── Programmer-To-Go User Guide.pdf
│ ├── Low Pin Count User Guide 51556a.pdf
│ ├── 44-Pin Demo Board User Guide 41296B.pdf
│ └── PICkit 3 Programmer Application User's Guide 50002158a.pdf
├── .gitignore
├── 99-pickit.rules
├── Makefile
├── README.md
└── PICkit3V3.sln
/PICkit2V2/Icon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/Icon1.ico
--------------------------------------------------------------------------------
/PICkit2V2/Icon2.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/Icon2.ico
--------------------------------------------------------------------------------
/PICkit2V2/Icon3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/Icon3.ico
--------------------------------------------------------------------------------
/PICkit2V2/icon1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/icon1.bmp
--------------------------------------------------------------------------------
/bundle/bin/PK2Test.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/bin/PK2Test.dll
--------------------------------------------------------------------------------
/PICkit2V2/.gitignore:
--------------------------------------------------------------------------------
1 | # Build folders
2 | bin/*
3 | obj/*
4 |
5 | # User project settings
6 | *.csproj.user
7 |
--------------------------------------------------------------------------------
/bundle/PK2DeviceFile.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/PK2DeviceFile.dat
--------------------------------------------------------------------------------
/bundle/bin/pickit3:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | cd $(dirname $(realpath $0))/..
5 | exec bin/PICkit3.exe
6 |
--------------------------------------------------------------------------------
/bundle/sounds/error.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/sounds/error.wav
--------------------------------------------------------------------------------
/bundle/sounds/success.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/sounds/success.wav
--------------------------------------------------------------------------------
/bundle/sounds/warning.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/sounds/warning.wav
--------------------------------------------------------------------------------
/PICkit2V2/PICkitFunctions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/PICkitFunctions.cs
--------------------------------------------------------------------------------
/bundle/DBE Demo/16F887Demo.asm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/DBE Demo/16F887Demo.asm
--------------------------------------------------------------------------------
/bundle/DBE Demo/16F887Demo.lst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/DBE Demo/16F887Demo.lst
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # NuGet packages
2 | packages/*
3 |
4 | # VS binary solution file
5 | *.suo
6 |
7 | # MonoDevelop folder
8 | .vs/*
9 |
--------------------------------------------------------------------------------
/PICkit2V2/FormPICkit2.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/PICkit2V2/FormPICkit2.Designer.cs
--------------------------------------------------------------------------------
/bundle/docs/Logic Tool User Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/Logic Tool User Guide.pdf
--------------------------------------------------------------------------------
/bundle/DBE Demo/PIC16F887 Debug Demo.mcw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/DBE Demo/PIC16F887 Debug Demo.mcw
--------------------------------------------------------------------------------
/bundle/docs/PICkit2 User Guide 51553E.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/PICkit2 User Guide 51553E.pdf
--------------------------------------------------------------------------------
/bundle/docs/Programmer-To-Go User Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/Programmer-To-Go User Guide.pdf
--------------------------------------------------------------------------------
/bundle/docs/Low Pin Count User Guide 51556a.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/Low Pin Count User Guide 51556a.pdf
--------------------------------------------------------------------------------
/PICkit2V2/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/bundle/docs/44-Pin Demo Board User Guide 41296B.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/44-Pin Demo Board User Guide 41296B.pdf
--------------------------------------------------------------------------------
/bundle/docs/PICkit 3 Programmer Application User's Guide 50002158a.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/langbeck/pickit3-programmer/HEAD/bundle/docs/PICkit 3 Programmer Application User's Guide 50002158a.pdf
--------------------------------------------------------------------------------
/99-pickit.rules:
--------------------------------------------------------------------------------
1 | # PICkit 2
2 | ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0033", MODE="0660", GROUP="plugdev"
3 | # PICkit 3
4 | ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="900a", MODE="0660", GROUP="plugdev"
5 |
--------------------------------------------------------------------------------
/PICkit2V2/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PICkit2V2/ClassDiagram1.cd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | DialogTroubleshoot.cs
8 | SCohAhgkRCUAABCASGTGTFIiEFFRIAQIIAABOIBUwAA=
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogTrigger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace PICkit2V2
10 | {
11 | public partial class DialogTrigger : Form
12 | {
13 | public DialogTrigger()
14 | {
15 | InitializeComponent();
16 | this.Size = new Size(this.Size.Width, (int)(FormPICkit2.ScalefactH * this.Size.Height));
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/bundle/DBE Demo/16F887Demo.HEX:
--------------------------------------------------------------------------------
1 | :020000040000FA
2 | :060000008A110A12042817
3 | :0800080083160313FF3085008D
4 | :100010008801831603170317013088000030890018
5 | :100020008316031300309F008312031340309F0098
6 | :10003000831203138030A200A301A40122088800C8
7 | :10004000000000000000000000009F149F182628F8
8 | :100050001E08A100A00F2A28A10F2A280D30A100F8
9 | :10006000A00B3028A10B302824183C2806183E2865
10 | :100070002414FF30A3063E28061824100310231C66
11 | :100080004528A20C0318A2171E28A20D031822143B
12 | :020090001E2828
13 | :02400E00E420AC
14 | :02401000FF3E71
15 | :00000001FF
16 |
--------------------------------------------------------------------------------
/PICkit2V2/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace PICkit2V2
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main()
14 | {
15 | Application.EnableVisualStyles(); // Comment out to allow solid progress bar and tan menu
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new FormPICkit2());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/bundle/DBE Demo/PIC16F887 Debug Demo.mcp:
--------------------------------------------------------------------------------
1 | [HEADER]
2 | magic_cookie={66E99B07-E706-4689-9E80-9B2582898A13}
3 | file_version=1.0
4 | [PATH_INFO]
5 | dir_src=
6 | dir_bin=
7 | dir_tmp=
8 | dir_sin=
9 | dir_inc=
10 | dir_lib=
11 | dir_lkr=
12 | [CAT_FILTERS]
13 | filter_src=*.asm
14 | filter_inc=*.h;*.inc
15 | filter_obj=*.o
16 | filter_lib=*.lib
17 | filter_lkr=*.lkr
18 | [OTHER_FILES]
19 | file_000=no
20 | [FILE_INFO]
21 | file_000=16F887Demo.asm
22 | [SUITE_INFO]
23 | suite_guid={6B3DAA78-59C1-46DD-B6AA-DBDAE4E06484}
24 | suite_state=
25 | [TOOL_SETTINGS]
26 | TS{DD2213A8-6310-47B1-8376-9430CDFC013F}=
27 | TS{BFD27FBA-4A02-4C0E-A5E5-B812F3E7707C}=/o"$(TARGETBASE).cof" /M"$(BINDIR_)$(TARGETBASE).map"
28 | TS{ADE93A55-C7C7-4D4D-A4BA-59305F7D0391}=
29 | [INSTRUMENTED_TRACE]
30 | enable=0
31 | transport=0
32 | format=0
33 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | APP_NAME=PICkit3
2 | PROJECT_DIR=PICkit2V2
3 | BUILD_CONFIG=Release
4 | INSTALL_DIR=/opt/microchip/pickit3
5 |
6 | BUILD_DIR=$(PROJECT_DIR)/bin/$(BUILD_CONFIG)
7 |
8 |
9 | build:
10 | nuget restore -NonInteractive
11 | msbuild -t:Build -p:Configuration="$(BUILD_CONFIG)" -v:quiet
12 |
13 | install: install-bundle install-bin install-link install-udev-rules
14 |
15 | install-udev-rules:
16 | cp 99-pickit.rules /etc/udev/rules.d
17 |
18 | install-link:
19 | ln -sf "$(INSTALL_DIR)/bin/pickit3" /usr/local/bin/pickit3
20 |
21 | install-bundle: $(INSTALL_DIR)
22 | cp -r --preserve=mode bundle/* "$(INSTALL_DIR)"
23 |
24 | install-bin: $(INSTALL_DIR)
25 | chmod +x "$(BUILD_DIR)/$(APP_NAME).exe"
26 | cp -r --preserve=mode $(BUILD_DIR)/* "$(INSTALL_DIR)/bin"
27 |
28 | $(INSTALL_DIR):
29 | mkdir -p "$(INSTALL_DIR)"
30 |
31 | clean:
32 | rm -rf packages/
33 | rm -rf "$(PROJECT_DIR)/bin"
34 | rm -rf "$(PROJECT_DIR)/obj"
35 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogDevFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.IO;
8 | using System.Windows.Forms;
9 |
10 | namespace PICkit2V2
11 | {
12 | public partial class DialogDevFile : Form
13 | {
14 | public DialogDevFile()
15 | {
16 | InitializeComponent();
17 |
18 | // Find & list all the *.dat files
19 | System.IO.DirectoryInfo searchdir = new System.IO.DirectoryInfo(System.IO.Directory.GetCurrentDirectory());
20 | foreach (System.IO.FileInfo file in searchdir.GetFiles("*.dat"))
21 | {
22 | listBoxDevFiles.Items.Add(file.Name);
23 | }
24 | }
25 |
26 | private void buttonLoadDevFile_Click(object sender, EventArgs e)
27 | {
28 | FormPICkit2.DeviceFileName = listBoxDevFiles.SelectedItem.ToString();
29 | this.Close();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PICkit3 Programmer Application for Linux
2 |
3 | This is the original [Microchip's PICkit3 Programmer Application][1] that has
4 | been ported to Linux. Most of the code stills the same, some changes include:
5 | - Replace native calls to Windows USB API for the [cross-platform HidSharp][2];
6 | - Fix Windows-like file paths and manual path build;
7 |
8 | [1]: http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit3%20Programmer%20Application%20v3.10.zip
9 | [2]: https://www.nuget.org/packages/HidSharp/
10 |
11 | ## 1. Pre-requisites
12 | - for building: `sudo apt install -y mono-complete`
13 | - for execute: `sudo apt install -y mono-runtime`
14 |
15 | ## 2. Building
16 | Restore Nuget packages and build: `make build` or only `make`
17 |
18 | ## 3. Installing
19 | Installation uses `/opt/microchip/pickit3` as the target directory and covers:
20 | - Copy build output and extra files to the target directory;
21 | - Copy udev rules to `/etc/udev/rules.d/`;
22 | - Create a link to `pickit3` in `/usr/local/bin/pickit3`
23 |
24 | To install just run: `sudo make install`
25 |
--------------------------------------------------------------------------------
/PICkit2V2/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PICkit2V2.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogVDDErase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using Pk2 = PICkit2V2.PICkitFunctions;
9 |
10 | namespace PICkit2V2
11 | {
12 | public partial class DialogVDDErase : Form
13 | {
14 | public DialogVDDErase()
15 | {
16 | InitializeComponent();
17 |
18 | }
19 |
20 | public void UpdateText()
21 | {
22 | label2.Text = "This device requires a minimum VDD of "
23 | + Pk2.DevFile.PartsList[Pk2.ActivePart].VddErase.ToString()
24 | + "V\nfor Bulk Erase operations.";
25 | }
26 |
27 | private void continueClick(object sender, EventArgs e)
28 | {
29 | if (checkBoxDoNotShow.Checked)
30 | {
31 | FormPICkit2.ShowWriteEraseVDDDialog = false;
32 | }
33 | FormPICkit2.ContinueWriteErase = true;
34 | this.Close();
35 | }
36 |
37 | private void cancelClick(object sender, EventArgs e)
38 | {
39 | FormPICkit2.ContinueWriteErase = false;
40 | this.Close();
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/PICkit2V2/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using KONST = PICkit2V2.Constants;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("PICkit 2")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Microchip Technology Inc.")]
13 | [assembly: AssemblyProduct("PICkit2V2")]
14 | [assembly: AssemblyCopyright("Copyright © Microchip Technology Inc. 2012")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("6f2f4eb8-901a-42f0-93d0-25da9fb9e3fb")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | [assembly: AssemblyVersion(KONST.AppVersion + ".0")]
34 | [assembly: AssemblyFileVersion(KONST.AppVersion + ".0")]
35 |
--------------------------------------------------------------------------------
/PICkit3V3.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C# Express 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PICkit3V3", "PICkit2V2\PICkit3V3.csproj", "{FD0E24D8-5714-4755-8E1A-C2C739824579}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Debug|x86 = Debug|x86
10 | Release|Any CPU = Release|Any CPU
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Debug|x86.ActiveCfg = Debug|x86
17 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Debug|x86.Build.0 = Debug|x86
18 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Release|x86.ActiveCfg = Release|x86
21 | {FD0E24D8-5714-4755-8E1A-C2C739824579}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | GlobalSection(MonoDevelopProperties) = preSolution
27 | Policies = $0
28 | $0.DotNetNamingPolicy = $1
29 | $1.DirectoryNamespaceAssociation = PrefixedHierarchical
30 | $0.TextStylePolicy = $2
31 | $2.inheritsSet = null
32 | $2.scope = text/x-csharp
33 | $0.CSharpFormattingPolicy = $3
34 | $3.scope = text/x-csharp
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogAbout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 |
10 | namespace PICkit2V2
11 | {
12 | public partial class DialogAbout : Form
13 | {
14 | public DialogAbout()
15 | {
16 | InitializeComponent();
17 | displayAppVer.Text = Constants.AppVersion;
18 | displayDevFileVer.Text = PICkitFunctions.DeviceFileVersion;
19 | displayPk2FWVer.Text = PICkitFunctions.FirmwareVersion;
20 | textBox1.Select(0,0);
21 | if (!PICkitFunctions.isPK3)
22 | {
23 | label2.Text = "2";
24 | }
25 | }
26 |
27 | private void clickOK(object sender, EventArgs e)
28 | {
29 | this.Close();
30 | }
31 |
32 | private void microchipLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
33 | {
34 | try
35 | {
36 | visitMicrochipSite();
37 | }
38 | catch
39 | {
40 | MessageBox.Show("Unable to open link that was clicked.");
41 | }
42 |
43 | }
44 |
45 | private void visitMicrochipSite()
46 | {
47 | // Change the color of the link text by setting LinkVisited
48 | // to true.
49 | linkLabel1.LinkVisited = true;
50 | //Call the Process.Start method to open the default browser
51 | //with a URL:
52 | System.Diagnostics.Process.Start("http://www.microchip.com");
53 |
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogCustomBaud.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace PICkit2V2
10 | {
11 | public partial class DialogCustomBaud : Form
12 | {
13 | public DialogCustomBaud()
14 | {
15 | InitializeComponent();
16 | textBox1.Focus();
17 | }
18 |
19 | private void textBox1_TextChanged(object sender, EventArgs e)
20 | {
21 | if (textBox1.Text.Length > 0)
22 | {
23 | if (!char.IsDigit(textBox1.Text[textBox1.Text.Length-1]))
24 | {
25 | textBox1.Text = textBox1.Text.Substring(0, (textBox1.Text.Length-1));
26 | }
27 | }
28 | }
29 |
30 | private void buttonCancel_Click(object sender, EventArgs e)
31 | {
32 | this.Close();
33 | }
34 |
35 | private void buttonOK_Click(object sender, EventArgs e)
36 | {
37 | try
38 | {
39 | int baud = int.Parse(textBox1.Text);
40 | if ((baud < 150) || (baud > 38400))
41 | {
42 | MessageBox.Show("Baud value is outside\nthe Min / Max range.");
43 | }
44 | else
45 | {
46 | DialogUART.CustomBaud = textBox1.Text;
47 | this.Close();
48 | }
49 | }
50 | catch
51 | {
52 | MessageBox.Show("Illegal Value.");
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/PICkit2V2/SetOSCCAL.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using Pk2 = PICkit2V2.PICkitFunctions;
9 | using KONST = PICkit2V2.Constants;
10 | using UTIL = PICkit2V2.Utilities;
11 |
12 | namespace PICkit2V2
13 | {
14 | public partial class SetOSCCAL : Form
15 | {
16 | public SetOSCCAL()
17 | {
18 | InitializeComponent();
19 | textBoxOSCCAL.Text = string.Format("{0:X4}", Pk2.DeviceBuffers.OSCCAL);
20 | textBoxOSCCAL.SelectAll();
21 | }
22 |
23 | private void clickSet(object sender, EventArgs e)
24 | {
25 | string editText;
26 |
27 | try
28 | {
29 | if (textBoxOSCCAL.Text.Substring(0,2) == "0x")
30 | {
31 | editText = textBoxOSCCAL.Text;
32 | }
33 | else if (textBoxOSCCAL.Text.Substring(0,1) == "x")
34 | {
35 | editText = "0" + textBoxOSCCAL.Text;
36 | }
37 | else
38 | {
39 | editText = "0x" + textBoxOSCCAL.Text;
40 | }
41 | int value = UTIL.Convert_Value_To_Int(editText);
42 |
43 | Pk2.DeviceBuffers.OSCCAL = (uint)value;
44 | FormPICkit2.setOSCCALValue = true;
45 | this.Close();
46 | }
47 | catch
48 | {
49 | textBoxOSCCAL.Text = string.Format("{0:X4}", Pk2.DeviceBuffers.OSCCAL);
50 | }
51 |
52 | }
53 |
54 | private void clickCancel(object sender, EventArgs e)
55 | {
56 | FormPICkit2.setOSCCALValue = false;
57 | this.Close();
58 | }
59 |
60 | }
61 | }
--------------------------------------------------------------------------------
/bundle/DBE Demo/PIC16F887 Debug Demo.mcs:
--------------------------------------------------------------------------------
1 | [Header]
2 | MagicCookie={0b13fe8c-dfe0-40eb-8900-6712719559a7}
3 | Version=1.0
4 | [File000]
5 | Location=16F887Demo.err
6 | Folder=Intermediary
7 | DeviceName=PIC16F887
8 | LanguageToolSuiteID={6B3DAA78-59C1-46DD-B6AA-DBDAE4E06484}
9 | LanguageToolID={49D3CA3F-D9A3-4518-9943-226A347E8CC7}
10 | LanguageToolLocation=C:\Program Files\Microchip\MPASM Suite\MPASMWIN.EXE
11 | PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)||$(INCDIR)||$(LIBDIR)||$(LKRDIR)||
12 | SOLK=|16F887Demo.asm||||||||
13 | SuiteArgsString=
14 | ToolArgsString=
15 | TraceCmdString=
16 | [File001]
17 | Location=C:\Program Files\Microchip\PICkit 2 v2\DBE Demo\16F887Demo.cod
18 | Folder=Output
19 | DeviceName=PIC16F887
20 | LanguageToolSuiteID={6B3DAA78-59C1-46DD-B6AA-DBDAE4E06484}
21 | LanguageToolID={49D3CA3F-D9A3-4518-9943-226A347E8CC7}
22 | LanguageToolLocation=C:\Program Files\Microchip\MPASM Suite\MPASMWIN.EXE
23 | PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)||$(INCDIR)||$(LIBDIR)||$(LKRDIR)||
24 | SOLK=|16F887Demo.asm||||||||
25 | SuiteArgsString=
26 | ToolArgsString=
27 | TraceCmdString=
28 | [File002]
29 | Location=C:\Program Files\Microchip\PICkit 2 v2\DBE Demo\16F887Demo.hex
30 | Folder=Output
31 | DeviceName=PIC16F887
32 | LanguageToolSuiteID={6B3DAA78-59C1-46DD-B6AA-DBDAE4E06484}
33 | LanguageToolID={49D3CA3F-D9A3-4518-9943-226A347E8CC7}
34 | LanguageToolLocation=C:\Program Files\Microchip\MPASM Suite\MPASMWIN.EXE
35 | PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)||$(INCDIR)||$(LIBDIR)||$(LKRDIR)||
36 | SOLK=|16F887Demo.asm||||||||
37 | SuiteArgsString=
38 | ToolArgsString=
39 | TraceCmdString=
40 | [File003]
41 | Location=16F887Demo.lst
42 | Folder=Output
43 | DeviceName=PIC16F887
44 | LanguageToolSuiteID={6B3DAA78-59C1-46DD-B6AA-DBDAE4E06484}
45 | LanguageToolID={49D3CA3F-D9A3-4518-9943-226A347E8CC7}
46 | LanguageToolLocation=C:\Program Files\Microchip\MPASM Suite\MPASMWIN.EXE
47 | PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)||$(INCDIR)||$(LIBDIR)||$(LKRDIR)||
48 | SOLK=|16F887Demo.asm||||||||
49 | SuiteArgsString=
50 | ToolArgsString=
51 | TraceCmdString=
52 | [TOOL_LOC_STAMPS]
53 | tool_loc{49D3CA3F-D9A3-4518-9943-226A347E8CC7}=C:\Program Files\Microchip\MPASM Suite\MPASMWIN.EXE
54 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogUserIDs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using Pk2 = PICkit2V2.PICkitFunctions;
9 |
10 | namespace PICkit2V2
11 | {
12 | public partial class DialogUserIDs : Form
13 | {
14 | public static bool IDMemOpen = false;
15 |
16 | public DialogUserIDs()
17 | {
18 | InitializeComponent();
19 | IDMemOpen = true;
20 |
21 | // init datagrid
22 | dataGridViewIDMem.DefaultCellStyle.Font = new Font("Courier New", 9);
23 | UpdateIDMemoryGrid();
24 | }
25 |
26 | public void UpdateIDMemoryGrid()
27 | {
28 | const int cols = 4;
29 | //const int colWidth = 53;
30 | int colWidth = (int) (53 * FormPICkit2.ScalefactW);
31 |
32 | dataGridViewIDMem.ColumnCount = 4;
33 | for (int column = 0; column < dataGridViewIDMem.ColumnCount; column++)
34 | {
35 | dataGridViewIDMem.Columns[column].Width = colWidth;
36 | }
37 |
38 | int rows = Pk2.DeviceBuffers.UserIDs.Length / cols;
39 | dataGridViewIDMem.RowCount = rows;
40 | int row = 0;
41 | int col = 0;
42 |
43 | for (int idx = 0; idx < Pk2.DeviceBuffers.UserIDs.Length; idx++)
44 | {
45 | dataGridViewIDMem[col, row].Value = string.Format("{0:X6}", Pk2.DeviceBuffers.UserIDs[idx]);
46 | col++;
47 | if (col >= cols)
48 | {
49 | col = 0;
50 | row++;
51 | }
52 | }
53 |
54 | dataGridViewIDMem[0, 0].Selected = true; // these 2 statements remove the "select" box
55 | dataGridViewIDMem[0, 0].Selected = false;
56 |
57 | }
58 |
59 | private void DialogUserIDs_FormClosing(object sender, FormClosingEventArgs e)
60 | {
61 | IDMemOpen = false;
62 | }
63 |
64 | private void buttonClose_Click(object sender, EventArgs e)
65 | {
66 | this.Close();
67 | }
68 |
69 |
70 | }
71 | }
--------------------------------------------------------------------------------
/PICkit2V2/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PICkit2V2.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PICkit2V2.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/PICkit2V2/USB.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using HidSharp;
4 |
5 | namespace PICkit2V2
6 | {
7 | public class USB
8 | {
9 | private static IDictionary hDict = new Dictionary();
10 | private static int lastHandler = 0;
11 |
12 | public static string UnitID = "";
13 |
14 | private static IntPtr OpenDevice(Device device)
15 | {
16 | var stream = device.Open();
17 | var handler = (IntPtr)(++lastHandler);
18 | hDict[handler] = stream;
19 | return handler;
20 | }
21 |
22 | private static DeviceStream GetDeviceStream(IntPtr handler)
23 | {
24 | return hDict[handler];
25 | }
26 |
27 | public static bool Find_This_Device(ushort p_VendorID,
28 | ushort p_PoductID,
29 | ushort p_index,
30 | ref IntPtr p_ReadHandle,
31 | ref IntPtr p_WriteHandle)
32 | {
33 | var devices = DeviceList.Local.GetHidDevices();
34 | ushort l_num_found_devices = 0;
35 |
36 | foreach (var device in devices)
37 | {
38 | // Skip non-matching devices
39 | if (device.VendorID != p_VendorID || device.ProductID != p_PoductID)
40 | continue;
41 |
42 | if (l_num_found_devices++ != p_index)
43 | continue;
44 |
45 | UnitID = device.GetSerialNumber();
46 | var handler = OpenDevice(device);
47 | p_WriteHandle = handler;
48 | p_ReadHandle = handler;
49 | return true;
50 | }
51 |
52 | return false;
53 | }
54 |
55 |
56 | public static unsafe bool WriteFile(
57 | IntPtr hFile, // handle to file
58 | byte[] Buffer, // data buffer
59 | int numBytesToWrite, // num of bytes to write
60 | ref int numBytesWritten, // number of bytes actually written
61 | int Overlapped // overlapped buffer - not used
62 | )
63 | {
64 | var stream = GetDeviceStream(hFile);
65 | stream.Write(Buffer, 0, numBytesToWrite);
66 | numBytesWritten = numBytesToWrite;
67 | return true;
68 | }
69 |
70 | public static unsafe bool ReadFile(
71 | IntPtr hFile, // handle to file
72 | byte[] Buffer, // data buffer
73 | int NumberOfBytesToRead, // number of bytes to read
74 | ref int pNumberOfBytesRead, // number of bytes read
75 | int Overlapped // overlapped buffer - not used
76 | )
77 | {
78 | var stream = GetDeviceStream(hFile);
79 | stream.Read(Buffer, 0, NumberOfBytesToRead);
80 | pNumberOfBytesRead = NumberOfBytesToRead;
81 | return true;
82 | }
83 |
84 | public static Int32 CloseHandle(IntPtr hObject)
85 | {
86 | hDict.Remove(hObject);
87 | return 0;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogUnitSelect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using Pk2 = PICkit2V2.PICkitFunctions;
9 | using KONST = PICkit2V2.Constants;
10 |
11 | namespace PICkit2V2
12 | {
13 | public partial class DialogUnitSelect : Form
14 | {
15 | public DialogUnitSelect()
16 | {
17 | InitializeComponent();
18 | this.Size = new Size(this.Size.Width, (int)(FormPICkit2.ScalefactH * this.Size.Height));
19 |
20 | // Find up to 8 PICkit 2 Units.
21 | for (ushort i = 0; i < 8; i++)
22 | {
23 | KONST.PICkit2USB detRes = Pk2.DetectPICkit2Device(i, false);
24 |
25 | if (detRes != KONST.PICkit2USB.notFound)
26 | { // found something
27 | /*if (detRes == KONST.PICkit2USB.bootloader)
28 | {
29 | listBoxUnits.Items.Add(" " + i.ToString() + " ");
30 | }
31 | else if (detRes == Constants.PICkit2USB.firmwareInvalid)
32 | { // min FW for UnitID is 2.10
33 | if ((Pk2.FirmwareVersion[0] == '2') && (ushort.Parse(Pk2.FirmwareVersion.Substring(2,2)) >= 10))
34 | {
35 | string unitID = Pk2.UnitIDRead();
36 | if (unitID == "")
37 | unitID = "-";
38 | listBoxUnits.Items.Add(" " + i.ToString() + " " + unitID);
39 | }
40 | else
41 | {
42 | listBoxUnits.Items.Add(" " + i.ToString() + " ");
43 | }
44 |
45 | }
46 | else
47 | {
48 | string unitID = Pk2.UnitIDRead();
49 | if (unitID == "")
50 | unitID = "-";
51 | listBoxUnits.Items.Add(" " + i.ToString() + " " + unitID);
52 | }*/
53 |
54 | string unitID = Pk2.GetSerialUnitID();
55 | if (unitID == "PIC18F2550")
56 | unitID = "";
57 | listBoxUnits.Items.Add(" " + i.ToString() + " " + unitID);
58 |
59 | }
60 | else
61 | {
62 | break;
63 | }
64 | }
65 | }
66 |
67 | private void listBoxUnits_MouseDoubleClick(object sender, MouseEventArgs e)
68 | {
69 | FormPICkit2.pk2number = (ushort)listBoxUnits.SelectedIndex;
70 | this.Close();
71 | }
72 |
73 | private void listBoxUnits_SelectedIndexChanged(object sender, EventArgs e)
74 | {
75 | buttonSelectUnit.Enabled = true;
76 | }
77 |
78 | private void buttonSelectUnit_Click(object sender, EventArgs e)
79 | {
80 | FormPICkit2.pk2number = (ushort)listBoxUnits.SelectedIndex;
81 | this.Close();
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/PICkit2V2/DeviceData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace PICkit2V2
6 | {
7 | public class DeviceData
8 | {
9 | public uint[] ProgramMemory;
10 | public uint[] EEPromMemory;
11 | public uint[] ConfigWords;
12 | public uint[] UserIDs;
13 | public uint OSCCAL;
14 | public uint BandGap;
15 |
16 | public DeviceData(uint progMemSize, ushort eeMemSize, byte numConfigs, byte numIDs,
17 | uint memBlankVal, int eeBytes, int idBytes, ushort[] configBlank, uint OSCCALInit)
18 | { // Overloaded Constructor
19 | ProgramMemory = new uint[progMemSize];
20 | EEPromMemory = new uint[eeMemSize];
21 | ConfigWords = new uint[numConfigs];
22 | UserIDs = new uint[numIDs];
23 |
24 | //init program memory to blank
25 | ClearProgramMemory(memBlankVal);
26 |
27 | //init eeprom to blank
28 | ClearEEPromMemory(eeBytes, memBlankVal);
29 |
30 | //init configuration to blank
31 | ClearConfigWords(configBlank);
32 |
33 | //init user ids to blank
34 | ClearUserIDs(idBytes, memBlankVal);
35 |
36 | //init OSSCAL & BandGap
37 | OSCCAL = OSCCALInit | 0xFF;
38 | BandGap = memBlankVal;
39 |
40 | }
41 |
42 | public void ClearProgramMemory(uint memBlankVal)
43 | {
44 | if (ProgramMemory.Length > 0)
45 | {
46 | for (int i = 0; i < ProgramMemory.Length; i++)
47 | {
48 | ProgramMemory[i] = memBlankVal;
49 | }
50 | }
51 | }
52 |
53 |
54 | public void ClearConfigWords(ushort[] configBlank)
55 | {
56 | if (ConfigWords.Length > 0)
57 | {
58 | //init configuration to blank
59 | for (int i = 0; i < ConfigWords.Length; i++)
60 | {
61 | ConfigWords[i] = configBlank[i];
62 | }
63 | }
64 | }
65 |
66 | public void ClearUserIDs(int idBytes, uint memBlankVal)
67 | {
68 | if (UserIDs.Length > 0)
69 | {
70 | //init user ids to blank
71 | uint idBlank = memBlankVal;
72 | if (idBytes == 1)
73 | {
74 | idBlank = 0xFF;
75 | }
76 | for (int i = 0; i < UserIDs.Length; i++)
77 | {
78 | UserIDs[i] = idBlank;
79 | }
80 | }
81 | }
82 |
83 | public void ClearEEPromMemory(int eeBytes, uint memBlankVal)
84 | {
85 | if (EEPromMemory.Length > 0)
86 | {
87 | //init eeprom to blank
88 | uint eeBlankVal = 0xFF;
89 | if (eeBytes == 2)
90 | {
91 | eeBlankVal = 0xFFFF;
92 | }
93 | if (memBlankVal == 0xFFF)
94 | { // baseline dataflash
95 | eeBlankVal = 0xFFF;
96 | }
97 | for (int i = 0; i < EEPromMemory.Length; i++)
98 | {
99 | EEPromMemory[i] = eeBlankVal; // 8-bit eeprom will just use 8 LSBs
100 | }
101 | }
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/PICkit2V2/dialogSounds.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace PICkit2V2
10 | {
11 | public partial class dialogSounds : Form
12 | {
13 | private System.Media.SoundPlayer wavPlayer = new System.Media.SoundPlayer();
14 | private TextBox destSoundTextBox;
15 |
16 | public dialogSounds()
17 | {
18 | InitializeComponent();
19 | checkBoxSuccess.Checked = FormPICkit2.PlaySuccessWav;
20 | checkBoxWarning.Checked = FormPICkit2.PlayWarningWav;
21 | checkBoxError.Checked = FormPICkit2.PlayErrorWav;
22 | textBoxSuccessFile.Text = FormPICkit2.SuccessWavFile;
23 | textBoxWarningFile.Text = FormPICkit2.WarningWavFile;
24 | textBoxErrorFile.Text = FormPICkit2.ErrorWavFile;
25 | }
26 |
27 | private void buttonOK_Click(object sender, EventArgs e)
28 | {
29 | FormPICkit2.PlaySuccessWav = checkBoxSuccess.Checked;
30 | FormPICkit2.PlayWarningWav = checkBoxWarning.Checked;
31 | FormPICkit2.PlayErrorWav = checkBoxError.Checked;
32 | FormPICkit2.SuccessWavFile = textBoxSuccessFile.Text;
33 | FormPICkit2.WarningWavFile = textBoxWarningFile.Text;
34 | FormPICkit2.ErrorWavFile = textBoxErrorFile.Text;
35 | this.Close();
36 | }
37 |
38 | private void buttonSuccessBrowse_Click(object sender, EventArgs e)
39 | {
40 | destSoundTextBox = textBoxSuccessFile;
41 | openFileDialogWAV.FileName = textBoxSuccessFile.Text;
42 | openFileDialogWAV.ShowDialog();
43 | }
44 |
45 | private void button1_Click(object sender, EventArgs e)
46 | {
47 | destSoundTextBox = textBoxWarningFile;
48 | openFileDialogWAV.FileName = textBoxWarningFile.Text;
49 | openFileDialogWAV.ShowDialog();
50 | }
51 |
52 | private void buttonErrorBrowse_Click(object sender, EventArgs e)
53 | {
54 | destSoundTextBox = textBoxErrorFile;
55 | openFileDialogWAV.FileName = textBoxErrorFile.Text;
56 | openFileDialogWAV.ShowDialog();
57 | }
58 |
59 | private void checkBoxSuccess_CheckedChanged(object sender, EventArgs e)
60 | {
61 | if (checkBoxSuccess.Checked)
62 | {
63 | try
64 | {
65 | wavPlayer.SoundLocation = @textBoxSuccessFile.Text;
66 | wavPlayer.Play();
67 | }
68 | catch
69 | {
70 |
71 | }
72 | }
73 | }
74 |
75 | private void checkBoxWarning_CheckedChanged(object sender, EventArgs e)
76 | {
77 | if (checkBoxWarning.Checked)
78 | {
79 | try
80 | {
81 | wavPlayer.SoundLocation = @textBoxWarningFile.Text;
82 | wavPlayer.Play();
83 | }
84 | catch
85 | {
86 |
87 | }
88 | }
89 | }
90 |
91 | private void checkBoxError_CheckedChanged(object sender, EventArgs e)
92 | {
93 | if (checkBoxError.Checked)
94 | {
95 | try
96 | {
97 | wavPlayer.SoundLocation = @textBoxErrorFile.Text;
98 | wavPlayer.Play();
99 | }
100 | catch
101 | {
102 |
103 | }
104 | }
105 | }
106 |
107 | private void openFileDialogWAV_FileOk(object sender, CancelEventArgs e)
108 | {
109 | destSoundTextBox.Text = openFileDialogWAV.FileName;
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogDevFile.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogDevFile
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.buttonLoadDevFile = new System.Windows.Forms.Button();
33 | this.listBoxDevFiles = new System.Windows.Forms.ListBox();
34 | this.SuspendLayout();
35 | //
36 | // label1
37 | //
38 | this.label1.AutoSize = true;
39 | this.label1.Location = new System.Drawing.Point(16, 11);
40 | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
41 | this.label1.Name = "label1";
42 | this.label1.Size = new System.Drawing.Size(183, 17);
43 | this.label1.TabIndex = 1;
44 | this.label1.Text = "Select a Device File to load:";
45 | //
46 | // buttonLoadDevFile
47 | //
48 | this.buttonLoadDevFile.Location = new System.Drawing.Point(144, 284);
49 | this.buttonLoadDevFile.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
50 | this.buttonLoadDevFile.Name = "buttonLoadDevFile";
51 | this.buttonLoadDevFile.Size = new System.Drawing.Size(100, 28);
52 | this.buttonLoadDevFile.TabIndex = 2;
53 | this.buttonLoadDevFile.Text = "Load";
54 | this.buttonLoadDevFile.UseVisualStyleBackColor = true;
55 | this.buttonLoadDevFile.Click += new System.EventHandler(this.buttonLoadDevFile_Click);
56 | //
57 | // listBoxDevFiles
58 | //
59 | this.listBoxDevFiles.FormattingEnabled = true;
60 | this.listBoxDevFiles.ItemHeight = 16;
61 | this.listBoxDevFiles.Location = new System.Drawing.Point(20, 31);
62 | this.listBoxDevFiles.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
63 | this.listBoxDevFiles.Name = "listBoxDevFiles";
64 | this.listBoxDevFiles.Size = new System.Drawing.Size(352, 244);
65 | this.listBoxDevFiles.TabIndex = 3;
66 | //
67 | // DialogDevFile
68 | //
69 | this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
70 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
71 | this.ClientSize = new System.Drawing.Size(389, 327);
72 | this.Controls.Add(this.listBoxDevFiles);
73 | this.Controls.Add(this.buttonLoadDevFile);
74 | this.Controls.Add(this.label1);
75 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
76 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
77 | this.MaximizeBox = false;
78 | this.MinimizeBox = false;
79 | this.Name = "DialogDevFile";
80 | this.Text = "DialogDevFile";
81 | this.ResumeLayout(false);
82 | this.PerformLayout();
83 |
84 | }
85 |
86 | #endregion
87 |
88 | private System.Windows.Forms.Label label1;
89 | private System.Windows.Forms.Button buttonLoadDevFile;
90 | private System.Windows.Forms.ListBox listBoxDevFiles;
91 |
92 | }
93 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogCustomBaud.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogCustomBaud
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.textBox1 = new System.Windows.Forms.TextBox();
33 | this.buttonOK = new System.Windows.Forms.Button();
34 | this.buttonCancel = new System.Windows.Forms.Button();
35 | this.SuspendLayout();
36 | //
37 | // label1
38 | //
39 | this.label1.AutoSize = true;
40 | this.label1.Location = new System.Drawing.Point(13, 9);
41 | this.label1.Name = "label1";
42 | this.label1.Size = new System.Drawing.Size(142, 65);
43 | this.label1.TabIndex = 0;
44 | this.label1.Text = "Enter baud rate in box below\r\nand click \"OK\".\r\n\r\nMinimum = 150 baud\r\nMaximum = 38" +
45 | "400 baud";
46 | //
47 | // textBox1
48 | //
49 | this.textBox1.Location = new System.Drawing.Point(16, 82);
50 | this.textBox1.Name = "textBox1";
51 | this.textBox1.Size = new System.Drawing.Size(106, 20);
52 | this.textBox1.TabIndex = 1;
53 | this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
54 | //
55 | // buttonOK
56 | //
57 | this.buttonOK.Location = new System.Drawing.Point(13, 114);
58 | this.buttonOK.Name = "buttonOK";
59 | this.buttonOK.Size = new System.Drawing.Size(80, 22);
60 | this.buttonOK.TabIndex = 2;
61 | this.buttonOK.Text = "OK";
62 | this.buttonOK.UseVisualStyleBackColor = true;
63 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
64 | //
65 | // buttonCancel
66 | //
67 | this.buttonCancel.Location = new System.Drawing.Point(99, 114);
68 | this.buttonCancel.Name = "buttonCancel";
69 | this.buttonCancel.Size = new System.Drawing.Size(80, 22);
70 | this.buttonCancel.TabIndex = 3;
71 | this.buttonCancel.Text = "Cancel";
72 | this.buttonCancel.UseVisualStyleBackColor = true;
73 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
74 | //
75 | // DialogCustomBaud
76 | //
77 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
78 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
79 | this.ClientSize = new System.Drawing.Size(188, 148);
80 | this.ControlBox = false;
81 | this.Controls.Add(this.buttonCancel);
82 | this.Controls.Add(this.buttonOK);
83 | this.Controls.Add(this.textBox1);
84 | this.Controls.Add(this.label1);
85 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
86 | this.MaximizeBox = false;
87 | this.MinimizeBox = false;
88 | this.Name = "DialogCustomBaud";
89 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
90 | this.Text = "Custom Baud Rate";
91 | this.ResumeLayout(false);
92 | this.PerformLayout();
93 |
94 | }
95 |
96 | #endregion
97 |
98 | private System.Windows.Forms.Label label1;
99 | private System.Windows.Forms.TextBox textBox1;
100 | private System.Windows.Forms.Button buttonOK;
101 | private System.Windows.Forms.Button buttonCancel;
102 | }
103 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogUnitSelect.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogUnitSelect
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.buttonSelectUnit = new System.Windows.Forms.Button();
33 | this.listBoxUnits = new System.Windows.Forms.ListBox();
34 | this.label2 = new System.Windows.Forms.Label();
35 | this.SuspendLayout();
36 | //
37 | // label1
38 | //
39 | this.label1.AutoSize = true;
40 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
41 | this.label1.Location = new System.Drawing.Point(13, 9);
42 | this.label1.Name = "label1";
43 | this.label1.Size = new System.Drawing.Size(180, 48);
44 | this.label1.TabIndex = 0;
45 | this.label1.Text = "More than one PICkit unit has\r\nbeen detected. \r\nPlease select a PICkit to use:";
46 | //
47 | // buttonSelectUnit
48 | //
49 | this.buttonSelectUnit.Enabled = false;
50 | this.buttonSelectUnit.Location = new System.Drawing.Point(76, 166);
51 | this.buttonSelectUnit.Name = "buttonSelectUnit";
52 | this.buttonSelectUnit.Size = new System.Drawing.Size(80, 26);
53 | this.buttonSelectUnit.TabIndex = 2;
54 | this.buttonSelectUnit.Text = "Select";
55 | this.buttonSelectUnit.UseVisualStyleBackColor = true;
56 | this.buttonSelectUnit.Click += new System.EventHandler(this.buttonSelectUnit_Click);
57 | //
58 | // listBoxUnits
59 | //
60 | this.listBoxUnits.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
61 | this.listBoxUnits.FormattingEnabled = true;
62 | this.listBoxUnits.ItemHeight = 15;
63 | this.listBoxUnits.Location = new System.Drawing.Point(16, 86);
64 | this.listBoxUnits.Name = "listBoxUnits";
65 | this.listBoxUnits.Size = new System.Drawing.Size(199, 64);
66 | this.listBoxUnits.TabIndex = 4;
67 | this.listBoxUnits.SelectedIndexChanged += new System.EventHandler(this.listBoxUnits_SelectedIndexChanged);
68 | this.listBoxUnits.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxUnits_MouseDoubleClick);
69 | //
70 | // label2
71 | //
72 | this.label2.AutoSize = true;
73 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
74 | this.label2.Location = new System.Drawing.Point(13, 70);
75 | this.label2.Name = "label2";
76 | this.label2.Size = new System.Drawing.Size(122, 13);
77 | this.label2.TabIndex = 5;
78 | this.label2.Text = "Unit# UnitID";
79 | //
80 | // DialogUnitSelect
81 | //
82 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
83 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
84 | this.ClientSize = new System.Drawing.Size(227, 207);
85 | this.ControlBox = false;
86 | this.Controls.Add(this.label2);
87 | this.Controls.Add(this.listBoxUnits);
88 | this.Controls.Add(this.buttonSelectUnit);
89 | this.Controls.Add(this.label1);
90 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
91 | this.MaximizeBox = false;
92 | this.MinimizeBox = false;
93 | this.Name = "DialogUnitSelect";
94 | this.ShowIcon = false;
95 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
96 | this.Text = "Select PICkit Unit";
97 | this.ResumeLayout(false);
98 | this.PerformLayout();
99 |
100 | }
101 |
102 | #endregion
103 |
104 | private System.Windows.Forms.Label label1;
105 | private System.Windows.Forms.Button buttonSelectUnit;
106 | private System.Windows.Forms.ListBox listBoxUnits;
107 | private System.Windows.Forms.Label label2;
108 | }
109 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogTrigger.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogTrigger
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.label2 = new System.Windows.Forms.Label();
33 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
34 | this.label3 = new System.Windows.Forms.Label();
35 | this.label4 = new System.Windows.Forms.Label();
36 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
37 | this.SuspendLayout();
38 | //
39 | // label1
40 | //
41 | this.label1.AutoSize = true;
42 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
43 | this.label1.Location = new System.Drawing.Point(12, 42);
44 | this.label1.Name = "label1";
45 | this.label1.Size = new System.Drawing.Size(184, 32);
46 | this.label1.TabIndex = 0;
47 | this.label1.Text = "PICkit Logic Tool is waiting for\r\na valid trigger condition.";
48 | //
49 | // label2
50 | //
51 | this.label2.AutoSize = true;
52 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
53 | this.label2.Location = new System.Drawing.Point(12, 138);
54 | this.label2.Name = "label2";
55 | this.label2.Size = new System.Drawing.Size(180, 48);
56 | this.label2.TabIndex = 1;
57 | this.label2.Text = "Do not disconnect the PICkit -\r\ndoing so may cause this\r\napplication to hang.";
58 | //
59 | // pictureBox1
60 | //
61 | this.pictureBox1.BackColor = System.Drawing.Color.Red;
62 | this.pictureBox1.Location = new System.Drawing.Point(15, 12);
63 | this.pictureBox1.Name = "pictureBox1";
64 | this.pictureBox1.Size = new System.Drawing.Size(16, 18);
65 | this.pictureBox1.TabIndex = 2;
66 | this.pictureBox1.TabStop = false;
67 | //
68 | // label3
69 | //
70 | this.label3.AutoSize = true;
71 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
72 | this.label3.Location = new System.Drawing.Point(37, 14);
73 | this.label3.Name = "label3";
74 | this.label3.Size = new System.Drawing.Size(137, 16);
75 | this.label3.TabIndex = 3;
76 | this.label3.Text = "Waiting for Trigger";
77 | //
78 | // label4
79 | //
80 | this.label4.AutoSize = true;
81 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
82 | this.label4.Location = new System.Drawing.Point(12, 91);
83 | this.label4.Name = "label4";
84 | this.label4.Size = new System.Drawing.Size(195, 32);
85 | this.label4.TabIndex = 4;
86 | this.label4.Text = "To cancel (abort) press the\r\nPICkit pushbutton.";
87 | //
88 | // DialogTrigger
89 | //
90 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
91 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
92 | this.ClientSize = new System.Drawing.Size(237, 196);
93 | this.ControlBox = false;
94 | this.Controls.Add(this.label4);
95 | this.Controls.Add(this.label3);
96 | this.Controls.Add(this.pictureBox1);
97 | this.Controls.Add(this.label2);
98 | this.Controls.Add(this.label1);
99 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
100 | this.Name = "DialogTrigger";
101 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
102 | this.Text = "PICkit Logic Tool Running";
103 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
104 | this.ResumeLayout(false);
105 | this.PerformLayout();
106 |
107 | }
108 |
109 | #endregion
110 |
111 | private System.Windows.Forms.Label label1;
112 | private System.Windows.Forms.Label label2;
113 | private System.Windows.Forms.PictureBox pictureBox1;
114 | private System.Windows.Forms.Label label3;
115 | private System.Windows.Forms.Label label4;
116 | }
117 | }
--------------------------------------------------------------------------------
/PICkit2V2/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogDevFile.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogTrigger.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogUserIDs.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/SetOSCCAL.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogConfigEdit.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogCustomBaud.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogUnitSelect.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogVDDErase.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/FormTestMemory.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogVDDErase.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogVDDErase
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.label2 = new System.Windows.Forms.Label();
33 | this.label3 = new System.Windows.Forms.Label();
34 | this.checkBoxDoNotShow = new System.Windows.Forms.CheckBox();
35 | this.buttonContinue = new System.Windows.Forms.Button();
36 | this.buttonCancel = new System.Windows.Forms.Button();
37 | this.SuspendLayout();
38 | //
39 | // label1
40 | //
41 | this.label1.AutoSize = true;
42 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
43 | this.label1.Location = new System.Drawing.Point(13, 9);
44 | this.label1.Name = "label1";
45 | this.label1.Size = new System.Drawing.Size(58, 13);
46 | this.label1.TabIndex = 0;
47 | this.label1.Text = "Warning:";
48 | //
49 | // label2
50 | //
51 | this.label2.AutoSize = true;
52 | this.label2.Location = new System.Drawing.Point(13, 22);
53 | this.label2.Name = "label2";
54 | this.label2.Size = new System.Drawing.Size(217, 26);
55 | this.label2.TabIndex = 1;
56 | this.label2.Text = "This device requires a minimum VDD of ?.?V\r\nfor Bulk Erase operations.";
57 | //
58 | // label3
59 | //
60 | this.label3.AutoSize = true;
61 | this.label3.Location = new System.Drawing.Point(13, 62);
62 | this.label3.Name = "label3";
63 | this.label3.Size = new System.Drawing.Size(217, 26);
64 | this.label3.TabIndex = 2;
65 | this.label3.Text = "If you continue it may fail to erase or program\r\nproperly.";
66 | //
67 | // checkBoxDoNotShow
68 | //
69 | this.checkBoxDoNotShow.AutoSize = true;
70 | this.checkBoxDoNotShow.Location = new System.Drawing.Point(13, 102);
71 | this.checkBoxDoNotShow.Name = "checkBoxDoNotShow";
72 | this.checkBoxDoNotShow.Size = new System.Drawing.Size(209, 17);
73 | this.checkBoxDoNotShow.TabIndex = 3;
74 | this.checkBoxDoNotShow.Text = "In the future, do not show this warning.";
75 | this.checkBoxDoNotShow.UseVisualStyleBackColor = true;
76 | //
77 | // buttonContinue
78 | //
79 | this.buttonContinue.Location = new System.Drawing.Point(78, 126);
80 | this.buttonContinue.Name = "buttonContinue";
81 | this.buttonContinue.Size = new System.Drawing.Size(80, 22);
82 | this.buttonContinue.TabIndex = 4;
83 | this.buttonContinue.Text = "Continue";
84 | this.buttonContinue.UseVisualStyleBackColor = true;
85 | this.buttonContinue.Click += new System.EventHandler(this.continueClick);
86 | //
87 | // buttonCancel
88 | //
89 | this.buttonCancel.Location = new System.Drawing.Point(164, 126);
90 | this.buttonCancel.Name = "buttonCancel";
91 | this.buttonCancel.Size = new System.Drawing.Size(80, 22);
92 | this.buttonCancel.TabIndex = 5;
93 | this.buttonCancel.Text = "Cancel";
94 | this.buttonCancel.UseVisualStyleBackColor = true;
95 | this.buttonCancel.Click += new System.EventHandler(this.cancelClick);
96 | //
97 | // DialogVDDErase
98 | //
99 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
100 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
101 | this.ClientSize = new System.Drawing.Size(254, 161);
102 | this.Controls.Add(this.buttonCancel);
103 | this.Controls.Add(this.buttonContinue);
104 | this.Controls.Add(this.checkBoxDoNotShow);
105 | this.Controls.Add(this.label3);
106 | this.Controls.Add(this.label2);
107 | this.Controls.Add(this.label1);
108 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
109 | this.MaximizeBox = false;
110 | this.MinimizeBox = false;
111 | this.Name = "DialogVDDErase";
112 | this.ShowIcon = false;
113 | this.ShowInTaskbar = false;
114 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
115 | this.Text = "Warning!";
116 | this.ResumeLayout(false);
117 | this.PerformLayout();
118 |
119 | }
120 |
121 | #endregion
122 |
123 | private System.Windows.Forms.Label label1;
124 | private System.Windows.Forms.Label label2;
125 | private System.Windows.Forms.Label label3;
126 | private System.Windows.Forms.CheckBox checkBoxDoNotShow;
127 | private System.Windows.Forms.Button buttonContinue;
128 | private System.Windows.Forms.Button buttonCancel;
129 | }
130 | }
--------------------------------------------------------------------------------
/PICkit2V2/SetOSCCAL.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class SetOSCCAL
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.textBoxOSCCAL = new System.Windows.Forms.TextBox();
33 | this.label2 = new System.Windows.Forms.Label();
34 | this.buttonSet = new System.Windows.Forms.Button();
35 | this.buttonCancel = new System.Windows.Forms.Button();
36 | this.label3 = new System.Windows.Forms.Label();
37 | this.label4 = new System.Windows.Forms.Label();
38 | this.SuspendLayout();
39 | //
40 | // label1
41 | //
42 | this.label1.AutoSize = true;
43 | this.label1.Location = new System.Drawing.Point(10, 15);
44 | this.label1.Name = "label1";
45 | this.label1.Size = new System.Drawing.Size(81, 13);
46 | this.label1.TabIndex = 0;
47 | this.label1.Text = "OSCCAL value:";
48 | //
49 | // textBoxOSCCAL
50 | //
51 | this.textBoxOSCCAL.Location = new System.Drawing.Point(93, 12);
52 | this.textBoxOSCCAL.Name = "textBoxOSCCAL";
53 | this.textBoxOSCCAL.Size = new System.Drawing.Size(54, 20);
54 | this.textBoxOSCCAL.TabIndex = 1;
55 | //
56 | // label2
57 | //
58 | this.label2.AutoSize = true;
59 | this.label2.Location = new System.Drawing.Point(153, 15);
60 | this.label2.Name = "label2";
61 | this.label2.Size = new System.Drawing.Size(30, 13);
62 | this.label2.TabIndex = 2;
63 | this.label2.Text = "(hex)";
64 | //
65 | // buttonSet
66 | //
67 | this.buttonSet.Location = new System.Drawing.Point(12, 88);
68 | this.buttonSet.Name = "buttonSet";
69 | this.buttonSet.Size = new System.Drawing.Size(75, 23);
70 | this.buttonSet.TabIndex = 3;
71 | this.buttonSet.Text = "Set";
72 | this.buttonSet.UseVisualStyleBackColor = true;
73 | this.buttonSet.Click += new System.EventHandler(this.clickSet);
74 | //
75 | // buttonCancel
76 | //
77 | this.buttonCancel.Location = new System.Drawing.Point(105, 88);
78 | this.buttonCancel.Name = "buttonCancel";
79 | this.buttonCancel.Size = new System.Drawing.Size(75, 23);
80 | this.buttonCancel.TabIndex = 4;
81 | this.buttonCancel.Text = "Cancel";
82 | this.buttonCancel.UseVisualStyleBackColor = true;
83 | this.buttonCancel.Click += new System.EventHandler(this.clickCancel);
84 | //
85 | // label3
86 | //
87 | this.label3.AutoSize = true;
88 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
89 | this.label3.ForeColor = System.Drawing.Color.Red;
90 | this.label3.Location = new System.Drawing.Point(10, 37);
91 | this.label3.Name = "label3";
92 | this.label3.Size = new System.Drawing.Size(71, 13);
93 | this.label3.TabIndex = 5;
94 | this.label3.Text = "WARNING:";
95 | //
96 | // label4
97 | //
98 | this.label4.AutoSize = true;
99 | this.label4.ForeColor = System.Drawing.Color.Red;
100 | this.label4.Location = new System.Drawing.Point(10, 53);
101 | this.label4.Name = "label4";
102 | this.label4.Size = new System.Drawing.Size(153, 26);
103 | this.label4.TabIndex = 6;
104 | this.label4.Text = "Setting OSCCAL will erase ALL\r\nmemory in part!";
105 | //
106 | // SetOSCCAL
107 | //
108 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
109 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
110 | this.ClientSize = new System.Drawing.Size(192, 123);
111 | this.Controls.Add(this.label4);
112 | this.Controls.Add(this.label3);
113 | this.Controls.Add(this.buttonCancel);
114 | this.Controls.Add(this.buttonSet);
115 | this.Controls.Add(this.label2);
116 | this.Controls.Add(this.textBoxOSCCAL);
117 | this.Controls.Add(this.label1);
118 | this.Name = "SetOSCCAL";
119 | this.ShowIcon = false;
120 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
121 | this.Text = "Set OSCCAL";
122 | this.ResumeLayout(false);
123 | this.PerformLayout();
124 |
125 | }
126 |
127 | #endregion
128 |
129 | private System.Windows.Forms.Label label1;
130 | private System.Windows.Forms.TextBox textBoxOSCCAL;
131 | private System.Windows.Forms.Label label2;
132 | private System.Windows.Forms.Button buttonSet;
133 | private System.Windows.Forms.Button buttonCancel;
134 | private System.Windows.Forms.Label label3;
135 | private System.Windows.Forms.Label label4;
136 | }
137 | }
--------------------------------------------------------------------------------
/PICkit2V2/dialogSounds.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | Enable and select sounds to play on programmer events. Checking the "Enable" checkbox for an event will
122 | play the selected WAV sound. If no sound plays, the WAV file may not be compatible. Enabled sounds are
123 | played when a matching event occurs in the programmer display.
124 |
125 |
126 | 17, 17
127 |
128 |
--------------------------------------------------------------------------------
/PICkit2V2/FormMultiWinEEData.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 |
125 |
126 | AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAA
127 | AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
128 | AAD///8AAAAAAAAAAAAAAAAAAAAAAA////D///8AD/AAAP8AAAAP8AAA/wAAAA///wD///AAD/AAAP8A
129 | AAAP8AAA/wAAAA////D///8AAAAAAAAAAAAA8ADw8AmZAADwAPDwAAkAAP/w/wAAkAAA8PD/AAAJAAD/
130 | APDwCZkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
131 | AAAAAAAAAAAAAAAAAAAAAAAA
132 |
133 |
134 |
--------------------------------------------------------------------------------
/PICkit2V2/FormMultiWinProgMem.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 |
125 |
126 | AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAA
127 | AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
128 | AAD///8AAAAAAAAAAAAAAAAAAAAAAA/wAA/w/w/wD/AAD/D/D/AP//AP8P8P8A///w/////wDwAPD/8A
129 | //AP//8P/wD/8A//8A//AP/wAAAAAAAAAAAA8ADw8AmZAADwAPDwAAkAAP/w/wAAkAAA8PD/AAAJAAD/
130 | APDwCZkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
131 | AAAAAAAAAAAAAAAAAAAAAAAA
132 |
133 |
134 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogAbout.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | Copyright (c) 2006-2012, Microchip Technology Inc. All rights reserved.
122 |
123 | You may use, copy, modify and distribute the Software for use with Microchip
124 | products only. If you distribute the Software or its derivatives, the Software
125 | must have this entire copyright and disclaimer notice prominently posted in a
126 | location where end users will see it (e.g., installation program, program
127 | headers, About Box, etc.). To the maximum extent permitted by law, this
128 | Software is distributed "AS IS" and WITHOUT ANY WARRANTY
129 | INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTY OF
130 | MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE, or
131 | NON-INFRINGEMENT. IN NO EVENT WILL MICROCHIP OR ITS
132 | LICENSORS BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
133 | CONSEQUENTIAL DAMAGES OF ANY KIND ARISING FROM OR
134 | RELATED TO THE USE, MODIFICATION OR DISTRIBUTION OF THIS
135 | SOFTWARE OR ITS DERIVATIVES.
136 |
137 |
--------------------------------------------------------------------------------
/PICkit2V2/Utilities.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace PICkit2V2
6 | {
7 | public class Utilities
8 | {
9 | public static int Convert_Value_To_Int(string p_value)
10 | {
11 | // takes strings that represent numeric values and converts
12 | // them to a four byte int
13 | // assumes hex values are of form: 0x1234, or 0X1234
14 | // assumes binary values are of form 0b1234, or 0B1234
15 | //
16 | uint[] l_binary_adder = {0, 0, 0x80000000, 0x40000000, 0x20000000, 0x10000000, 0x8000000, 0x4000000, 0x2000000, 0x1000000,
17 | 0x800000, 0x400000, 0x200000, 0x100000, 0x80000, 0x40000, 0x20000, 0x10000,
18 | 0x8000, 0x4000, 0x2000, 0x1000, 0x800, 0x400, 0x200, 0x100,
19 | 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1};
20 | uint[] l_hex_adder = { 0, 0, 0x10000000, 0x1000000, 0x100000, 0x10000, 0x1000, 0x100, 0x10, 0x1 };
21 | int l_return_value = 0;
22 | int l_mult;
23 | int l_end_pos, l_start_pos;
24 | int l_x;
25 |
26 | if (p_value[0] == 0)
27 | {
28 | l_return_value = 0;
29 | }
30 | else if (p_value[0] == 'Y' || p_value[0] == 'y')
31 | {
32 | // boolean TRUE
33 | l_return_value = 1;
34 | }
35 | else if (p_value[0] == 'N' || p_value[0] == 'n')
36 | {
37 | // boolean FALSE
38 | l_return_value = 0;
39 | }
40 | else if (p_value.Length > 1)
41 | {
42 | if ((p_value[0] == '0' && (p_value[1] == 'b' || p_value[1] == 'B')) ||
43 | (p_value[0] == 'b' || p_value[0] == 'B'))
44 | {
45 | // binary
46 | l_end_pos = p_value.Length - 1;
47 | if (p_value[0] == '0')
48 | {
49 | // must change starting point for tokens that look like 0b10101010
50 | l_start_pos = 2;
51 | }
52 | else
53 | {
54 | l_start_pos = 1;
55 | }
56 | for (l_x = l_start_pos; l_x <= l_end_pos; l_x++)
57 | {
58 | if (p_value[l_x] == '1')
59 | {
60 | l_mult = 1;
61 | }
62 | else
63 | {
64 | l_mult = 0;
65 | }
66 | l_return_value += (int)l_binary_adder[l_x + 34 - p_value.Length] * l_mult;
67 | } // end for
68 | }
69 | else if (p_value[0] == '0' && (p_value[1] == 'x' || p_value[1] == 'X'))
70 | {
71 | // hex
72 | // 6 bits
73 | l_end_pos = p_value.Length - 1;
74 | for (l_x = 2; l_x <= l_end_pos; l_x++)
75 | {
76 | switch (p_value[l_x])
77 | {
78 |
79 | case 'A':
80 | case 'a':
81 | l_mult = 10;
82 | break;
83 | case 'B':
84 | case 'b':
85 | l_mult = 11;
86 | break;
87 | case 'C':
88 | case 'c':
89 | l_mult = 12;
90 | break;
91 | case 'D':
92 | case 'd':
93 | l_mult = 13;
94 | break;
95 | case 'E':
96 | case 'e':
97 | l_mult = 14;
98 | break;
99 | case 'F':
100 | case 'f':
101 | l_mult = 15;
102 | break;
103 | default:
104 | string l_temp = p_value[l_x].ToString();
105 | if (!int.TryParse(l_temp, out l_mult))
106 | {
107 | l_mult = 0;
108 | }
109 | break;
110 | } // end switch
111 | l_return_value += (int)l_hex_adder[l_x + 10 - p_value.Length] * l_mult;
112 | } // end for
113 | }
114 | else
115 | {
116 | // decimal
117 | if (!int.TryParse(p_value, out l_return_value))
118 | {
119 | // use tryparse cause just parse will exception on non-numeric values
120 | l_return_value = 0;
121 | }
122 | }
123 | }
124 | else
125 | {
126 | // decimal
127 | if (!int.TryParse(p_value, out l_return_value))
128 | {
129 | // use tryparse cause just parse will exception on non-numeric values
130 | l_return_value = 0;
131 | }
132 | }
133 |
134 | return l_return_value;
135 | } // end convert_value_to_int
136 |
137 | public static String ConvertIntASCII(int toConvert, int numBytes)
138 | {
139 |
140 |
141 | byte[] convertArray = new byte[numBytes];
142 | for (int i = numBytes; i > 0; i--)
143 | {
144 | convertArray[i - 1] = (byte)toConvert;
145 | if ((convertArray[i - 1] < 0x20) || (convertArray[i - 1] > 0x7E))
146 | {
147 | convertArray[i - 1] = 0x2E; // "."
148 | }
149 | toConvert >>= 8;
150 | }
151 |
152 | return Encoding.ASCII.GetString(convertArray);
153 |
154 | }
155 |
156 | public static String ConvertIntASCIIReverse(int toConvert, int numBytes)
157 | { // ASCII characters are in reverse order from bytes in "toConvert"
158 |
159 | numBytes += (numBytes - 1);
160 |
161 | byte[] convertArray = new byte[numBytes];
162 | for (int i = 0; i < numBytes; i++)
163 | {
164 | if ((i % 2) == 1)
165 | { // add spaces
166 | convertArray[i] = 0x20; // " " space
167 | }
168 | else
169 | {
170 | convertArray[i] = (byte)toConvert;
171 | if ((convertArray[i] < 0x20) || (convertArray[i] > 0x7E))
172 | {
173 | convertArray[i] = 0x2E; // "."
174 | }
175 | toConvert >>= 8;
176 | }
177 | }
178 |
179 | return Encoding.ASCII.GetString(convertArray);
180 |
181 | }
182 |
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/PICkit2V2/DeviceFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace PICkit2V2
6 | {
7 | public class DeviceFile
8 | {
9 | public DeviceFileParams Info = new DeviceFileParams();
10 | public DeviceFamilyParams[] Families;
11 | public DevicePartParams[] PartsList;
12 | public DeviceScripts[] Scripts;
13 |
14 | public struct DeviceFileParams
15 | {
16 | // One instance of this structure is included at the start of the Device File
17 | public int VersionMajor; // Device file version number major.minor.dot
18 | public int VersionMinor;
19 | public int VersionDot;
20 |
21 | public string VersionNotes; // Max 512 characters
22 |
23 | public int NumberFamilies; // # number of DeviceFamilyParams sets
24 | public int NumberParts; // # number of DevicePartParams sets
25 | public int NumberScripts; // # number of DeviceScripts sets
26 | public byte Compatibility;
27 | public byte UNUSED1A;
28 | public ushort UNUSED1B;
29 | public uint UNUSED2;
30 |
31 | }
32 |
33 | public struct DeviceFamilyParams
34 | {
35 | // a single struct instance describes the parameters for an entire part family.
36 | public ushort FamilyID; // # essentially, its array index number.
37 | public ushort FamilyType; // also used as the display order in the Device Family Menu - lower first
38 | public ushort SearchPriority;
39 | public string FamilyName; // 16 -> 24 chars max (v2.50)
40 | public ushort ProgEntryScript;
41 | public ushort ProgExitScript;
42 | public ushort ReadDevIDScript;
43 | public uint DeviceIDMask; // HEX
44 | public uint BlankValue; // HEX
45 | public byte BytesPerLocation;
46 | public byte AddressIncrement;
47 | public bool PartDetect;
48 | public ushort ProgEntryVPPScript; // program entry VPP first
49 | public ushort UNUSED1;
50 | public byte EEMemBytesPerWord;
51 | public byte EEMemAddressIncrement;
52 | public byte UserIDHexBytes;
53 | public byte UserIDBytes;
54 | public byte ProgMemHexBytes; // added 7-10-06
55 | public byte EEMemHexBytes; // added 7-10-06
56 | public byte ProgMemShift; // added 7-10-06
57 | public uint TestMemoryStart; // HEX
58 | public ushort TestMemoryLength;
59 | public float Vpp;
60 | }
61 |
62 | public struct DevicePartParams
63 | {
64 | // a single struct instance describes parameters for a single silicon part.
65 | public string PartName; // 20 chars max
66 | public ushort Family; // references FamilyID in DeviceFamilyParams
67 | public uint DeviceID;
68 | public uint ProgramMem;
69 | public ushort EEMem;
70 | public uint EEAddr;
71 | public byte ConfigWords;
72 | public uint ConfigAddr; // HEX
73 | public byte UserIDWords;
74 | public uint UserIDAddr; // HEX
75 | public uint BandGapMask; // HEX
76 | public ushort[] ConfigMasks; // HEX
77 | public ushort[] ConfigBlank; // HEX
78 | public ushort CPMask; // HEX
79 | public byte CPConfig;
80 | public bool OSSCALSave;
81 | public uint IgnoreAddress; // HEX
82 | public float VddMin;
83 | public float VddMax;
84 | public float VddErase;
85 | public byte CalibrationWords;
86 | public ushort ChipEraseScript;
87 | public ushort ProgMemAddrSetScript;
88 | public byte ProgMemAddrBytes;
89 | public ushort ProgMemRdScript;
90 | public ushort ProgMemRdWords;
91 | public ushort EERdPrepScript;
92 | public ushort EERdScript;
93 | public ushort EERdLocations;
94 | public ushort UserIDRdPrepScript;
95 | public ushort UserIDRdScript;
96 | public ushort ConfigRdPrepScript;
97 | public ushort ConfigRdScript;
98 | public ushort ProgMemWrPrepScript;
99 | public ushort ProgMemWrScript;
100 | public ushort ProgMemWrWords;
101 | public byte ProgMemPanelBufs;
102 | public uint ProgMemPanelOffset;
103 | public ushort EEWrPrepScript;
104 | public ushort EEWrScript;
105 | public ushort EEWrLocations;
106 | public ushort UserIDWrPrepScript;
107 | public ushort UserIDWrScript;
108 | public ushort ConfigWrPrepScript;
109 | public ushort ConfigWrScript;
110 | public ushort OSCCALRdScript;
111 | public ushort OSCCALWrScript;
112 | public ushort DPMask;
113 | public bool WriteCfgOnErase;
114 | public bool BlankCheckSkipUsrIDs;
115 | public ushort IgnoreBytes;
116 | public ushort ChipErasePrepScript;
117 | public uint BootFlash;
118 | //public uint UNUSED4;
119 | public ushort Config9Mask;
120 | public ushort Config9Blank;
121 | public ushort ProgMemEraseScript; // added 7-10-06
122 | public ushort EEMemEraseScript; // added 7-10-06
123 | public ushort ConfigMemEraseScript; // added 7-10-06
124 | public ushort reserved1EraseScript; // added 7-10-06
125 | public ushort reserved2EraseScript; // added 7-10-06
126 | public ushort TestMemoryRdScript;
127 | public ushort TestMemoryRdWords;
128 | public ushort EERowEraseScript;
129 | public ushort EERowEraseWords;
130 | public bool ExportToMPLAB;
131 | public ushort DebugHaltScript;
132 | public ushort DebugRunScript;
133 | public ushort DebugStatusScript;
134 | public ushort DebugReadExecVerScript;
135 | public ushort DebugSingleStepScript;
136 | public ushort DebugBulkWrDataScript;
137 | public ushort DebugBulkRdDataScript;
138 | public ushort DebugWriteVectorScript;
139 | public ushort DebugReadVectorScript;
140 | public ushort DebugRowEraseScript;
141 | public ushort DebugRowEraseSize;
142 | public ushort DebugReserved5Script;
143 | public ushort DebugReserved6Script;
144 | public ushort DebugReserved7Script;
145 | public ushort DebugReserved8Script;
146 | //public ushort DebugReserved9Script;
147 | public ushort LVPScript;
148 | }
149 |
150 | public struct DeviceScripts
151 | {
152 | public ushort ScriptNumber; // # Essentially, its array index number - 1 based 0 reserved for no script
153 | // referred to in the XxxxxxScript fields of DevicePartParams
154 | public string ScriptName; // 20 Chars max
155 | public ushort ScriptVersion; // increments on each change
156 | public uint UNUSED1;
157 | public ushort ScriptLength;
158 | public ushort[] Script;
159 | public string Comment; // 20 max
160 | }
161 |
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogPK2Go.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | This wizard sets up your PICkit 2 unit for
122 | "Programmer-To-Go" operation.
123 |
124 | This allows code to be downloaded into EEPROM
125 | memory on-board the PICkit 2, to be programmed
126 | later into a target device - no PC or software needed!
127 | All that's required is a 5V USB power source for the
128 | PICkit 2.
129 |
130 | Click the HELP button for more detailed information,
131 | or click NEXT to get started.
132 |
133 |
134 |
135 |
136 |
137 | 17, 17
138 |
139 |
140 | If the PICkit 2 software or MPLAB attempt to connect
141 | to the PICkit 2 unit, it will exit Programmer-To-Go mode.
142 |
143 | For information on powering the PICkit 2 when using
144 | Programmer-To-Go mode, click the HELP button.
145 |
146 | For an overview of programming and LED error codes,
147 | click NEXT.
148 |
149 |
150 |
151 |
152 | Basic Operation Steps:
153 | 1) Connect USB power to the PICkit 2 (See Help)
154 | 2) Check for Target LED blinking (PICkit 2 ready)
155 | 3) Connect PICkit 2 ICSP connector to the target.
156 | 4) Press the PICkit 2 button to begin programming
157 | During programming the "Busy" LED will remain lit.
158 | Once programming has completed, either
159 | - The Target LED blinks, indicating success
160 | - The Busy LED blinks, indicating an error.
161 | Press the PICkit 2 button to clear the error.
162 |
163 |
164 |
--------------------------------------------------------------------------------
/PICkit2V2/DialogUserIDs.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogUserIDs
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
33 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
34 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
35 | this.dataGridViewIDMem = new System.Windows.Forms.DataGridView();
36 | this.buttonClose = new System.Windows.Forms.Button();
37 | ((System.ComponentModel.ISupportInitialize)(this.dataGridViewIDMem)).BeginInit();
38 | this.SuspendLayout();
39 | //
40 | // dataGridViewIDMem
41 | //
42 | this.dataGridViewIDMem.AllowUserToAddRows = false;
43 | this.dataGridViewIDMem.AllowUserToDeleteRows = false;
44 | this.dataGridViewIDMem.AllowUserToResizeColumns = false;
45 | this.dataGridViewIDMem.AllowUserToResizeRows = false;
46 | this.dataGridViewIDMem.BackgroundColor = System.Drawing.SystemColors.Window;
47 | this.dataGridViewIDMem.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
48 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
49 | dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
50 | dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
51 | dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
52 | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
53 | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
54 | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
55 | this.dataGridViewIDMem.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
56 | this.dataGridViewIDMem.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
57 | this.dataGridViewIDMem.ColumnHeadersVisible = false;
58 | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
59 | dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
60 | dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
61 | dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
62 | dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
63 | dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
64 | dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
65 | this.dataGridViewIDMem.DefaultCellStyle = dataGridViewCellStyle2;
66 | this.dataGridViewIDMem.GridColor = System.Drawing.SystemColors.Window;
67 | this.dataGridViewIDMem.Location = new System.Drawing.Point(16, 15);
68 | this.dataGridViewIDMem.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
69 | this.dataGridViewIDMem.MultiSelect = false;
70 | this.dataGridViewIDMem.Name = "dataGridViewIDMem";
71 | this.dataGridViewIDMem.ReadOnly = true;
72 | dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
73 | dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
74 | dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
75 | dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
76 | dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
77 | dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
78 | dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
79 | this.dataGridViewIDMem.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
80 | this.dataGridViewIDMem.RowHeadersVisible = false;
81 | this.dataGridViewIDMem.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
82 | dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
83 | this.dataGridViewIDMem.RowsDefaultCellStyle = dataGridViewCellStyle4;
84 | this.dataGridViewIDMem.RowTemplate.Height = 17;
85 | this.dataGridViewIDMem.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
86 | this.dataGridViewIDMem.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
87 | this.dataGridViewIDMem.ShowCellToolTips = false;
88 | this.dataGridViewIDMem.Size = new System.Drawing.Size(308, 170);
89 | this.dataGridViewIDMem.TabIndex = 0;
90 | //
91 | // buttonClose
92 | //
93 | this.buttonClose.Location = new System.Drawing.Point(133, 192);
94 | this.buttonClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
95 | this.buttonClose.Name = "buttonClose";
96 | this.buttonClose.Size = new System.Drawing.Size(80, 28);
97 | this.buttonClose.TabIndex = 1;
98 | this.buttonClose.Text = "Close";
99 | this.buttonClose.UseVisualStyleBackColor = true;
100 | this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
101 | //
102 | // DialogUserIDs
103 | //
104 | this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
105 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
106 | this.ClientSize = new System.Drawing.Size(339, 233);
107 | this.Controls.Add(this.buttonClose);
108 | this.Controls.Add(this.dataGridViewIDMem);
109 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
110 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
111 | this.MaximizeBox = false;
112 | this.MinimizeBox = false;
113 | this.Name = "DialogUserIDs";
114 | this.Text = "ID Memory";
115 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DialogUserIDs_FormClosing);
116 | ((System.ComponentModel.ISupportInitialize)(this.dataGridViewIDMem)).EndInit();
117 | this.ResumeLayout(false);
118 |
119 | }
120 |
121 | #endregion
122 |
123 | private System.Windows.Forms.DataGridView dataGridViewIDMem;
124 | private System.Windows.Forms.Button buttonClose;
125 | }
126 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogAbout.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace PICkit2V2
2 | {
3 | partial class DialogAbout
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DialogAbout));
32 | this.label1 = new System.Windows.Forms.Label();
33 | this.label2 = new System.Windows.Forms.Label();
34 | this.label3 = new System.Windows.Forms.Label();
35 | this.label4 = new System.Windows.Forms.Label();
36 | this.label5 = new System.Windows.Forms.Label();
37 | this.displayAppVer = new System.Windows.Forms.Label();
38 | this.displayDevFileVer = new System.Windows.Forms.Label();
39 | this.displayPk2FWVer = new System.Windows.Forms.Label();
40 | this.textBox1 = new System.Windows.Forms.TextBox();
41 | this.linkLabel1 = new System.Windows.Forms.LinkLabel();
42 | this.buttonOK = new System.Windows.Forms.Button();
43 | this.SuspendLayout();
44 | //
45 | // label1
46 | //
47 | this.label1.AutoSize = true;
48 | this.label1.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
49 | this.label1.Location = new System.Drawing.Point(13, 9);
50 | this.label1.Name = "label1";
51 | this.label1.Size = new System.Drawing.Size(64, 22);
52 | this.label1.TabIndex = 0;
53 | this.label1.Text = "PICkit";
54 | //
55 | // label2
56 | //
57 | this.label2.AutoSize = true;
58 | this.label2.Font = new System.Drawing.Font("Lucida Handwriting", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
59 | this.label2.ForeColor = System.Drawing.Color.Red;
60 | this.label2.Location = new System.Drawing.Point(74, 4);
61 | this.label2.Name = "label2";
62 | this.label2.Size = new System.Drawing.Size(31, 31);
63 | this.label2.TabIndex = 1;
64 | this.label2.Text = "3";
65 | //
66 | // label3
67 | //
68 | this.label3.AutoSize = true;
69 | this.label3.Location = new System.Drawing.Point(226, 9);
70 | this.label3.Name = "label3";
71 | this.label3.Size = new System.Drawing.Size(97, 13);
72 | this.label3.TabIndex = 2;
73 | this.label3.Text = "Application Version";
74 | //
75 | // label4
76 | //
77 | this.label4.AutoSize = true;
78 | this.label4.Location = new System.Drawing.Point(226, 22);
79 | this.label4.Name = "label4";
80 | this.label4.Size = new System.Drawing.Size(98, 13);
81 | this.label4.TabIndex = 3;
82 | this.label4.Text = "Device File Version";
83 | //
84 | // label5
85 | //
86 | this.label5.AutoSize = true;
87 | this.label5.Location = new System.Drawing.Point(226, 34);
88 | this.label5.Name = "label5";
89 | this.label5.Size = new System.Drawing.Size(105, 13);
90 | this.label5.TabIndex = 4;
91 | this.label5.Text = "OS Firmware Version";
92 | //
93 | // displayAppVer
94 | //
95 | this.displayAppVer.AutoSize = true;
96 | this.displayAppVer.Location = new System.Drawing.Point(364, 9);
97 | this.displayAppVer.Name = "displayAppVer";
98 | this.displayAppVer.Size = new System.Drawing.Size(43, 13);
99 | this.displayAppVer.TabIndex = 5;
100 | this.displayAppVer.Text = "2.00.00";
101 | this.displayAppVer.TextAlign = System.Drawing.ContentAlignment.TopRight;
102 | //
103 | // displayDevFileVer
104 | //
105 | this.displayDevFileVer.AutoSize = true;
106 | this.displayDevFileVer.Location = new System.Drawing.Point(364, 22);
107 | this.displayDevFileVer.Name = "displayDevFileVer";
108 | this.displayDevFileVer.Size = new System.Drawing.Size(49, 13);
109 | this.displayDevFileVer.TabIndex = 6;
110 | this.displayDevFileVer.Text = "00.00.00";
111 | this.displayDevFileVer.TextAlign = System.Drawing.ContentAlignment.TopRight;
112 | //
113 | // displayPk2FWVer
114 | //
115 | this.displayPk2FWVer.AutoSize = true;
116 | this.displayPk2FWVer.Location = new System.Drawing.Point(364, 34);
117 | this.displayPk2FWVer.Name = "displayPk2FWVer";
118 | this.displayPk2FWVer.Size = new System.Drawing.Size(49, 13);
119 | this.displayPk2FWVer.TabIndex = 7;
120 | this.displayPk2FWVer.Text = "00.00.00";
121 | this.displayPk2FWVer.TextAlign = System.Drawing.ContentAlignment.TopRight;
122 | //
123 | // textBox1
124 | //
125 | this.textBox1.BackColor = System.Drawing.SystemColors.Window;
126 | this.textBox1.Location = new System.Drawing.Point(13, 62);
127 | this.textBox1.Multiline = true;
128 | this.textBox1.Name = "textBox1";
129 | this.textBox1.ReadOnly = true;
130 | this.textBox1.Size = new System.Drawing.Size(403, 216);
131 | this.textBox1.TabIndex = 8;
132 | this.textBox1.Text = resources.GetString("textBox1.Text");
133 | //
134 | // linkLabel1
135 | //
136 | this.linkLabel1.AutoSize = true;
137 | this.linkLabel1.Location = new System.Drawing.Point(14, 34);
138 | this.linkLabel1.Name = "linkLabel1";
139 | this.linkLabel1.Size = new System.Drawing.Size(102, 13);
140 | this.linkLabel1.TabIndex = 9;
141 | this.linkLabel1.TabStop = true;
142 | this.linkLabel1.Text = "www.microchip.com";
143 | this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.microchipLinkClicked);
144 | //
145 | // buttonOK
146 | //
147 | this.buttonOK.Location = new System.Drawing.Point(178, 283);
148 | this.buttonOK.Name = "buttonOK";
149 | this.buttonOK.Size = new System.Drawing.Size(79, 22);
150 | this.buttonOK.TabIndex = 10;
151 | this.buttonOK.Text = "OK";
152 | this.buttonOK.UseVisualStyleBackColor = true;
153 | this.buttonOK.Click += new System.EventHandler(this.clickOK);
154 | //
155 | // DialogAbout
156 | //
157 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
158 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
159 | this.ClientSize = new System.Drawing.Size(429, 314);
160 | this.Controls.Add(this.buttonOK);
161 | this.Controls.Add(this.linkLabel1);
162 | this.Controls.Add(this.textBox1);
163 | this.Controls.Add(this.displayPk2FWVer);
164 | this.Controls.Add(this.displayDevFileVer);
165 | this.Controls.Add(this.displayAppVer);
166 | this.Controls.Add(this.label5);
167 | this.Controls.Add(this.label4);
168 | this.Controls.Add(this.label3);
169 | this.Controls.Add(this.label2);
170 | this.Controls.Add(this.label1);
171 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
172 | this.MaximizeBox = false;
173 | this.MinimizeBox = false;
174 | this.Name = "DialogAbout";
175 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
176 | this.Text = "About";
177 | this.ResumeLayout(false);
178 | this.PerformLayout();
179 |
180 | }
181 |
182 | #endregion
183 |
184 | private System.Windows.Forms.Label label1;
185 | private System.Windows.Forms.Label label2;
186 | private System.Windows.Forms.Label label3;
187 | private System.Windows.Forms.Label label4;
188 | private System.Windows.Forms.Label label5;
189 | private System.Windows.Forms.Label displayAppVer;
190 | private System.Windows.Forms.Label displayDevFileVer;
191 | private System.Windows.Forms.Label displayPk2FWVer;
192 | private System.Windows.Forms.TextBox textBox1;
193 | private System.Windows.Forms.LinkLabel linkLabel1;
194 | private System.Windows.Forms.Button buttonOK;
195 | }
196 | }
--------------------------------------------------------------------------------
/PICkit2V2/DialogCalibrate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Threading;
9 | using Pk2 = PICkit2V2.PICkitFunctions;
10 | using KONST = PICkit2V2.Constants;
11 |
12 | namespace PICkit2V2
13 | {
14 | public partial class DialogCalibrate : Form
15 | {
16 | private bool unitIDChanged = false;
17 |
18 | public DialogCalibrate()
19 | {
20 | InitializeComponent();
21 | Pk2.VddOff();
22 | Pk2.ForcePICkitPowered();
23 | setupClearButtons();
24 |
25 | if (Pk2.isPK3)
26 | {
27 | panelIntro.Visible = false;
28 | panelSetup.Visible = false;
29 | panelCal.Visible = false;
30 | panelUnitID.Visible = true;
31 | textBoxUnitID.Text = Pk2.UnitIDRead();
32 | }
33 | }
34 |
35 | private void buttonCancel_Click(object sender, EventArgs e)
36 | {
37 | Pk2.VddOff();
38 | if (unitIDChanged)
39 | {
40 | // reset PICkit so it re-enumerates with new ID.
41 | Pk2.ResetPICkit2();
42 | Thread.Sleep(1000);
43 |
44 | if (Pk2.isPK3) // PICkit 3
45 | {
46 | MessageBox.Show("Resetting PICkit 3.\n\nPlease wait for USB enumeration\nto complete before clicking OK...", "Reset PICkit 3");
47 | }
48 | else // PICkit 2
49 | {
50 | MessageBox.Show("Resetting PICkit 2.\n\nPlease wait for USB enumeration\nto complete before clicking OK...", "Reset PICkit 2");
51 | }
52 | Thread.Sleep(1000);
53 | }
54 | this.Close();
55 | }
56 |
57 | private void setupClearButtons()
58 | {
59 | if (Pk2.isPK3) // PICkit 3
60 | {
61 | buttonBack.Enabled = false;
62 | buttonBack.Visible = false;
63 | buttonNext.Enabled = false;
64 | buttonNext.Visible = false;
65 |
66 | if (Pk2.UnitIDRead().Length > 0)
67 | {
68 | buttonClearUnitID_PK3.Enabled = true;
69 | buttonClearUnitID_PK3.Visible = true;
70 | buttonSetUnitID.Enabled = false;
71 | buttonSetUnitID.Visible = false;
72 | }
73 | else
74 | {
75 | buttonClearUnitID_PK3.Enabled = false;
76 | buttonClearUnitID_PK3.Visible = false;
77 | buttonSetUnitID.Enabled = true;
78 | buttonSetUnitID.Visible = true;
79 | }
80 | }
81 | else // PICkit 2
82 | {
83 | buttonClearUnitID_PK3.Enabled = false;
84 | buttonClearUnitID_PK3.Visible = false;
85 | buttonClearUnitID_PK3.Text = "";
86 |
87 | if (Pk2.isCalibrated())
88 | {
89 | buttonClearCal.Enabled = true;
90 | buttonClearCal.Text = "Clear Calibration";
91 | }
92 | else
93 | {
94 | buttonClearCal.Enabled = false;
95 | buttonClearCal.Text = "Unit Not Calibrated";
96 | }
97 |
98 | if (Pk2.UnitIDRead().Length > 0)
99 | {
100 | buttonClearUnitID.Enabled = true;
101 | buttonClearUnitID.Text = "Clear Unit ID";
102 | }
103 | else
104 | {
105 | buttonClearUnitID.Enabled = false;
106 | buttonClearUnitID.Text = "No Assigned ID";
107 | }
108 | }
109 | }
110 |
111 | private void buttonNext_Click(object sender, EventArgs e)
112 | {
113 | if (panelIntro.Visible)
114 | {
115 | panelIntro.Visible = false;
116 | panelSetup.Visible = true;
117 | buttonBack.Enabled = true;
118 | }
119 | else if (panelSetup.Visible)
120 | {
121 | panelSetup.Visible = false;
122 | panelCal.Visible = true;
123 | buttonCalibrate.Enabled = true;
124 | labelGoodCal.Visible = false;
125 | labelBadCal.Visible = false;
126 | textBoxVDD.Text = string.Format("{0:0.000}", 4F);
127 | textBoxVDD.Focus();
128 | textBoxVDD.SelectAll();
129 | Pk2.SetVoltageCals(0x0100, 0x00, 0x80); // set to defaults.
130 | Pk2.SetVDDVoltage(4.0F, 3.4F);
131 | Pk2.VddOn();
132 | }
133 | else if (panelCal.Visible)
134 | {
135 | panelCal.Visible = false;
136 | panelUnitID.Visible = true;
137 | buttonSetUnitID.Enabled = true;
138 | labelAssignedID.Visible = false;
139 | textBoxUnitID.Text = Pk2.UnitIDRead();
140 | textBoxUnitID.Focus();
141 | textBoxVDD.SelectAll();
142 | buttonNext.Enabled = false;
143 | buttonCancel.Text = "Finished";
144 | Pk2.VddOff();
145 | }
146 | }
147 |
148 | private void buttonBack_Click(object sender, EventArgs e)
149 | {
150 | if (panelSetup.Visible)
151 | {
152 | panelIntro.Visible = true;
153 | panelSetup.Visible = false;
154 | buttonBack.Enabled = false;
155 | setupClearButtons();
156 | }
157 | else if (panelCal.Visible)
158 | {
159 | Pk2.VddOff();
160 | panelSetup.Visible = true;
161 | panelCal.Visible = false;
162 |
163 | }
164 | else if (panelUnitID.Visible)
165 | {
166 | panelUnitID.Visible = false;
167 | panelCal.Visible = true;
168 | buttonCalibrate.Enabled = false;
169 | labelGoodCal.Visible = false;
170 | labelBadCal.Visible = false;
171 | textBoxVDD.Text = "-";
172 | buttonNext.Enabled = true;
173 | buttonCancel.Text = "Cancel";
174 | }
175 | }
176 |
177 | private void buttonCalibrate_Click(object sender, EventArgs e)
178 | {
179 | float Vdd = 0, Vpp = 0;
180 | float measuredVdd = 0;
181 | bool calSucceed = true;
182 |
183 | try
184 | {
185 | measuredVdd = float.Parse(textBoxVDD.Text);
186 | }
187 | catch
188 | {
189 | MessageBox.Show("Invalid 'volts measured' value.");
190 | return;
191 | }
192 |
193 | // Cal the ADC results
194 | Pk2.ReadPICkitVoltages(ref Vdd, ref Vpp);
195 | measuredVdd /= Vdd; //ratio
196 | if (measuredVdd > 1.25F)
197 | {
198 | measuredVdd = 1.25F;
199 | calSucceed = false;
200 | }
201 | if (measuredVdd < 0.75F)
202 | {
203 | measuredVdd = 0.75F;
204 | calSucceed = false;
205 | }
206 | float calFactor = 256F * measuredVdd; // 512 is 1:1 calibration factor
207 | Pk2.SetVoltageCals((ushort)calFactor, 0x00, 0x80); // leave Vdd cals unchanged for now.
208 |
209 | // Now that we have an accurate ADC reading, we can self-cal the VDD setpoints.
210 | // Vdd Offset = (3 - (4*V3)/V4)*CCP4
211 | // Vdd CalFactor = 1/(V4 - V3) * 128.
212 | // where V3 = actual voltage at SetVDDVoltage(3.0)
213 | // V4 = actual voltage at SetVDDVoltage(4.0)
214 | // CCP4 = CalculateVddCPP(4.0F) >> 6
215 | float offset = 0;
216 | float calCCP = 0;
217 | float Vdd3v = 0;
218 | Pk2.SetVDDVoltage(3.0F, 2.00F);
219 | Thread.Sleep(150);
220 | Pk2.ReadPICkitVoltages(ref Vdd, ref Vpp);
221 | Vdd3v = Vdd;
222 | Pk2.SetVDDVoltage(4.0F, 2.70F);
223 | Thread.Sleep(150);
224 | Pk2.ReadPICkitVoltages(ref Vdd, ref Vpp);
225 | offset = (3 - (4 * Vdd3v) / Vdd) * (Pk2.CalculateVddCPP(4.0F) >> 6);
226 | if (offset > 127F)
227 | {
228 | offset = 127F;
229 | calSucceed = false;
230 | }
231 | if (offset < -128F)
232 | {
233 | offset = -128F;
234 | calSucceed = false;
235 | }
236 | calCCP = (1 / (Vdd - Vdd3v)) * 128;
237 | if (calCCP > 173) // 135%
238 | {
239 | calCCP = 173;
240 | calSucceed = false;
241 | }
242 | if (calCCP < 83) // 65%
243 | {
244 | calCCP = 83;
245 | calSucceed = false;
246 | }
247 |
248 | if (calSucceed)
249 | {
250 | labelGoodCal.Visible = true;
251 | labelBadCal.Visible = false;
252 | Pk2.SetVoltageCals((ushort)calFactor, (byte)offset, (byte)(calCCP + 0.5));
253 | }
254 | else
255 | {
256 | labelGoodCal.Visible = false;
257 | labelBadCal.Visible = true;
258 | Pk2.SetVoltageCals(0x0100, 0x00, 0x80); // leave uncal'd
259 | }
260 | buttonCalibrate.Enabled = false;
261 | Pk2.VddOff();
262 | }
263 |
264 | private void textBoxUnitID_TextChanged(object sender, EventArgs e)
265 | {
266 | if (textBoxUnitID.Text.Length > 14)
267 | {
268 | textBoxUnitID.Text = textBoxUnitID.Text.Substring(0, 14);
269 | textBoxUnitID.SelectionStart = 14;
270 | }
271 | }
272 |
273 | private void buttonSetUnitID_Click(object sender, EventArgs e)
274 | {
275 | if (Pk2.UnitIDWrite(textBoxUnitID.Text))
276 | {
277 | if (Pk2.isPK3) // PICkit 3
278 | {
279 | labelAssignedID.Text = "Unit ID Assigned to this PICkit 3.";
280 | buttonCancel.Text = "Finished";
281 | textBoxUnitID.Enabled = false;
282 | }
283 |
284 | labelAssignedID.Visible = true;
285 | buttonSetUnitID.Enabled = false;
286 | unitIDChanged = true;
287 | }
288 | }
289 |
290 | private void buttonClearCal_Click(object sender, EventArgs e)
291 | {
292 | Pk2.SetVoltageCals(0x0100, 0x00, 0x80); // leave uncal'd
293 | buttonClearCal.Enabled = false;
294 | buttonClearCal.Text = "Unit Not Calibrated";
295 | }
296 |
297 | private void buttonClearUnitID_Click(object sender, EventArgs e)
298 | {
299 | Pk2.UnitIDWrite("");
300 | buttonClearUnitID.Enabled = false;
301 | buttonClearUnitID.Text = "No Assigned ID";
302 | unitIDChanged = true;
303 | }
304 |
305 | private void buttonClearUnitID_PK3_Click(object sender, EventArgs e)
306 | {
307 | Pk2.UnitIDWrite("");
308 | labelAssignedID.Text = "No Unit ID Assigned to this PICkit 3.";
309 | labelAssignedID.Visible = true;
310 | buttonClearUnitID_PK3.Enabled = false;
311 | buttonClearUnitID_PK3.Text = "No Assigned ID";
312 | buttonCancel.Text = "Finished";
313 | textBoxUnitID.Text = "";
314 | textBoxUnitID.Enabled = false;
315 | unitIDChanged = true;
316 | }
317 |
318 | private void DialogCalibrate_Shown(object sender, EventArgs e)
319 | {
320 | if (Pk2.isPK3) // PICkit 3
321 | {
322 | textBoxUnitID.Focus();
323 | textBoxUnitID.SelectAll();
324 | }
325 | }
326 | }
327 | }
--------------------------------------------------------------------------------