News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Positron8/16 USB Stack

Started by trastikata, Nov 30, 2026, 02:27 PM

Previous topic - Next topic

trastikata

Hello all,

as mentioned earlier in the other topic I've been working (with the help of an AI model) on a broader USB stack for Positron8 and Positron16.

The new USB stack is user oriented and provides a configuration tool to help you with the basic set-up for the USB Stack as well as the basic PIC MCU set-up it self.

The USB Library currently has USB Device mode only and will be expanded to Host and OTG later when I finish the new Host and OTG development boards.

The USB Library includes several tested examples for some PIC18F, PIC24 and dsPIC33 devices. To keep the USB connection alive, interrupt and poll modes are supported. There is also included the source code for VS2026 WPF PC Host application templates for HID and CDC, note VS2026 has a free version which I used.

Supported USB Device modes are:

- HID data - send and receive data as general HID device

HID_HA.jpg

- HID input devices - keyboard, mouse, joystick or media control


- CDC - an emulated COM-port

CDC_HA.jpg

- MSC - a virtual drive and files


- RNDIS - an emulated network adapter with web server




If you need help or have questions, I'd be happy to help.

P.s. Currently the Positron8/16 USB Stack is a standalone implementation but the road map is:
* USB Host stack
* USB OTG stack
** Merging the Positron8/16 USB Stack with the FAT32 SD card stack and TFT Library 2

top204

Many thanks Dyanko.

A brilliant piece of coding, and it is such a pleasure that I can see the compilers being put to such good, creative, work. It means my years of work on them has a meaningful purpose.

Best regards
Les

trastikata

#2
Hello all,

Positron8/16 USB Stack has been updated to USB Device Library 0.21.

- added ISR for RNDIS to keep the USB connection alive in the background. The web browser still needs regular in-code servicing.
- added mDNS for RNDIS - the virtual PIC server now supports named addressing with the *.local extension like: http://positron.local


Meanwhile to show the capability of Positron Compilers - this is a real project I made for free as a favour to some fellow RC and rocket modelists (my other hobbies). You might think the development cost was high, but that project cost me less than 100$ in total for assembled PCBs with 16 devices - the really inexpensive but powerful Positron license made it possible.

A flight recorder with 9 DoF sensors, barometric altitude sensor, 64 Mbit FLASH memory, built-in LiPo battery and LiPo charger, USB interface - all less than 1 cm3, weighting only 2 grams and using the old PIC18F25J50 plus Positron8.

Now the firmware and software adapted under the new USB stack, made the HID interface faster and more stable which allows real time 9 DoF orientation and automatic calibration through the PC Host Software. For the demo I changed the titles on purpose for Positron promotion.

MAV7TOP.JPG MAV7BOT.JPG MAV7WG.JPG


JonW

Thats a dinky little board.  Nice work dude. 

What about a USBTMC?  Its a test and measurement class.  Great for doing instumentation or test that VISA libs can control. PYVISA and Free Keysight IO Libs can talk directly to it.  I use this a lot in C, as it's supported by Tiny USB. It's really powerful for control via SCPI, etc., and I've added a full Lib to the PBC for USB-to-ETH with an SCPI parser.  Be a cool addition to a great Lib


J

▲