USB serial
msrobots
Posts: 3,709
So I know that @garryj has Kbd and Mouse working, and it does flawless with my setup here.
That is HID protocol. I also read that mass-storage seems to work, but can't find any reference somehow.
What I really would like is serial usb, no need for FTDI, soft serial USB.
just dreaming,
Mike
That is HID protocol. I also read that mass-storage seems to work, but can't find any reference somehow.
What I really would like is serial usb, no need for FTDI, soft serial USB.
just dreaming,
Mike
Comments
Mike
Well, we should be able to do it, too, then.
The P2 doesn't have that option.
Mike
Mike
But does it pull in the FTDI USB driver for the OS?
I believe it was 1999 (the same year that I was introduced to the SX line), when I've brought a copy of a book named Parallel Port Complete, authored by Jan Axelson, because I was seeking for the most comprehensive information about PC's parallel port I could put my hands on, in order to design a specialized interface card, connecting PCs to IBM System/360 byte multiplexor channels.
Since then, I've become one of Janet's fans.
For the ones that yet don't know her, let me introduce Janet Louise (AKA Jan) Axelson and a little piece of her fantastic work:
janaxelson.com/serport.htm#usb_virtual_com_ports
There is much more to explore at Jan's website.
Hope it helps a bit.
Henrique
From Jan's page:
Please, pay attention to the topic Maximizing Performance, there are ways to let windows know that data-transfer throughput could be improved.
The problem is implementing the VCP. That is where there are only proprietary things...
So, sending data back and forth is relatively easy. Getting it to show up as an actual "COM" port may be hard.
A discussion is here around HID, CDC and other methods. Note the comments around windows Bugs..
https://www.microchip.com/forums/m962184.aspx
I've seen some terminals support HID connect, as well as COMx connect.
The other question is speed aka sustained data rates possible.
I've not seen numbers for P2 USB throughout, as so far it's only been Mouse/Kbd.
Maybe mass storage can give a handle on possible half duplex speed limits ?
In the EFM8UB3 on P2D2, which uses a SiLabs windows side driver, and their VCPXpress library on the MCU, we tuned up to around 4Mb/s sustained, half duplex, but also managed higher peaks using the RAM as buffers.
Using 2 stop bits, UART values of 6MBd, 8Mbd and 12Mbd all test ok, in bursts up to the buffer sizes.
One reason to push this area (besides curiosity ), is to allow a P2D2 to be used for early development of a design finally using FT232H/FT2232H - those HS-USB parts can sustain 12MBd continually.
(but note the comments around bugs, seems earlier windows were not the best, which is probably what drove the custom driver solutions into existence)
The SiLabs debuggers use a CDC port, and on the EFM8-Debug host, that is currently fixed at 115200 baud. They do plan to allow Baud changes.
At home my PC is rather old but at the time was a rather high-end Dell
i7-2600 Quad Core 3.4GHz 8MB cache with internal Intel HD Graphics plus (released 2011), 8GB DDR3 1.3 or 1.6 GHz?, Nvidia GT530, C: SSD 256GB, 600GB, 3 x Acer 24" 1920x1080 monitors.
At work my PC is 18 months old and has a reasonably high-end Dell computer with SSD and HDD. And my 2nd work PC is identical to my home PC.
On all 3 PC's windoze regularly goes into limbo land while I am typing and you can wait seconds for the computer to catch up. I've had this problem on older cheapie low end (eg single/dual core 1.7GHz) laptops so always just said it was the slow old laptop.
Two PC's have USB keyboards and the fastest has a WiFi keyboard with miniature USB-A dongle wifi.
My point...
If windows cannot always keep up with the keyboard, just be careful of throwing any decent data rates at the PC over USB.
In my experience, that sort of nonsense generally has more to do with memory paging than anything else - as you type, somewhere on the path to getting the character on the screen, something needs to be loaded off the hard drive (especially programs using dynamic scripting languages have a very fragmented memory map and many layers of pointer indirection). Although in theory that shouldn't be that noticeable on SSD-equipped computers, so what do I know. Then again, I don't use Windows 10. I have never seen a Windows 10 computer that wasn't just freshly installed that performed well. It's just a bad OS.
It sure would be neat to get a handle on how to make the P2 look like a USB serial port to a host machine.
Agree. Once the basics are understood, it should even be possible for the P2 to appear as multiple serial ports on the host.