News:

Let's find out together what makes a PIC Tick!

Main Menu

USB HID stack translated for 16b devices

Started by trastikata, Sep 23, 2024, 02:16 PM

Previous topic - Next topic

trastikata

USB HID for 8b devices has been very successful for me. Despite its slow transfer, the universal MS USB HID driver for Windows makes it ideal for data downloading, USB Bootloaders and device settings update.

I've adjusted the VB.NET framework I posted in the boards before to work with MS VB.WPF.NET and using WPF.VB.NET you can build really good ed user applications.

My latest development is a tiny 10x10x10mm 1.8gr 4 DOF RC Model or Model rocket flight recorder which includes USB Bootloader for firmware update, device settings control and test through USB HID and fast 32 MB memory download - all this on PIC18F14K50 and Positron8.  Here's a 4DOF demo (3d accelerometer + barometric altimeter), currently same device with 10DOF is under development but with PIC18F26J50.


Back to Positron16 and USB HID. I've started translating the 8-bit HID Stack for 16b PICs and it seems much easier than I expected.

The RAM buffers for the HID can be anywhere in RAM and as such they are simple "heaped" byte arrays described in the BDT, which addressing has only minor differences from the 8b BDT.

Most of the registers used for the USB Device interface use the same name with small adjustment and even bit names and position is quite the same. Mostly bit position has to change and from there bit masking and bit setting and clearing. But having a8b device datasheet at hand it is easy to adjust the bit masking for 16b devices.

Anyway I was on a quasi "vacation" - work with lots of free time  ;D  and got a good progress in translation and testing (I have made another 16b USB development board for this occasion) however in all my stupidity I forgot to upload the current source codes for further development before I left for home ...  :-\ 

So now its either start from zero with much less free time or wait another 6 months before I have access again to the remote computer ... what a waste of time.


John Lawton

This really is 'Rocket Science' !

John

Craig

Very Very Smart Stuff, Well done trastikata

Frizie

Again very nice work Trastikata! :D
Ohm sweet Ohm | www.picbasic.nl