The CDC and HID demos are small Windows programs you can build and change. Use them first to check communication with a working PIC example. Later, replace the test buttons and text display with the controls your own project needs.
WPF is the Windows window-and-controls system used by these apps. The program code is Visual Basic (.NET). You do not need to create a new project or choose a new window template: open the supplied one.
Use Visual Studio Community 2026 on Windows. Community is free for individual developers; Microsoft lists its usage terms on the Community page.
Keep these projects on .NET Framework 4.8. Installing a newer .NET SDK does not mean you should change the app's target to .NET 8 or .NET 10. The supplied desktop projects already select the intended framework.
Microsoft's workload list identifies the desktop tools. If Visual Studio reports missing framework reference files, add the 4.8 Developer Pack or targeting pack.
Extract the complete USB download first. Work on a copy of the app source so you can return to the original example.
|
App you want |
Source folder |
Open in Visual Studio |
|
CDC serial test |
CDC Data → PC Host App |
CDC_Data_VS_WPF.sln |
|
HID data test |
HID Data → PC Host App |
The supplied solution, or HID_Data_VS_WPF.vbproj |
Choose File → Open → Project/Solution, then select the file. Let Visual Studio finish loading the project and restoring any build dependencies it requests. Keep the supporting source files in place.
The Windows app is separate from your Positron .bas program. Visual Studio builds the PC app; Positron compiles the PIC firmware. Building one does not program the other.
The built apps need the .NET Framework runtime on the Windows PC. Visual Studio is needed to edit and build the source, not to run a completed app. The CDC README specifies Windows 10 or 11 with .NET Framework 4.8.
Use the corresponding working firmware example from Framework as your first test. Check its PIC and clock settings before programming your board.
A green connection panel means the PC opened the connection. Send one known command and check the expected reply to prove that both programs understand each other.
Start with one label or button, rebuild, and check it. Then add one new command with a matching action in the PIC program.
|
File |
What you normally change |
|
MainWindow.xaml |
Labels, buttons and window layout |
|
MainWindow.xaml.vb |
Device/port defaults, button actions and received-data handling |
|
Styles.xaml |
Colours and shared appearance |
The supporting communication files can normally stay as supplied. Keep the window's connection and closing code intact while learning. The separate README_CDC.md and README_HID.md explain the optional functions when you need more than this first test.
Created with the Personal Edition of HelpNDoc: Free help authoring environment