2

I am trying to create a keyboard without the physical ICs and other components (I have some components, but not all) as a training exercise to practice HID among other things.

I was wondering if there is a way to use Proteus as a virtual USB device connected to a physical machine (the hosting computer or another computer in the network or linked with a host computer via a male-to-male USB cable).

Can that be done? If so, what do I need other than Proteus and how do I make that happen?

My operating system is Windows 11.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Paiku Han
  • 73
  • 7
  • 4
    Dont even think about using a male to male USB A cable. Bad things can happen! I think most laptops and dektops only support host mode. Would you be open to using a dev board such an Arduino? – Anas Malas Oct 18 '22 at 07:33
  • @AnasMalas I've already created a HID device (keyboard) using an arduino. And I can do the same with the STMicro Blue pill I believe. The thing is Arduino isn't baremetal (there is a bootloader shipped with it). What I would be open to is something inside Proteus that allows me to test if any chip I am using for my test can simulate a HID Device. It would love it if I could use a physical computer for that but the next best thing is OK as well : either a virtual computer (virtual machine) or a way to see that the signal sent by the virtual HID Device are the ones I want them to send. – Paiku Han Oct 19 '22 at 08:28
  • 1
    @PaikuHan It is really easy to remove the Arduino bootloader or simply to remove the delay caused by it, as long as you have an external programmer (could even be a spare arduino). See [this](https://forum.arduino.cc/t/removing-the-bootloader/534266) or [this](https://forum.arduino.cc/t/how-to-completely-remove-the-bootloader/172751) – jb0 Oct 19 '22 at 14:33

1 Answers1

3

Can that be done?

No. Your laptop's USB controller will not allow to be re-used as something completely different, a USB device.

Also, you'd need the actual USB replying to happen in firmware or at most operating system code, anything else is far too slow – and Proteus is anything but a low-latency in-system emulator, so you're as far from a possible solution as can be.

If you want to do such things, you can use one of the many ARM dev boards with an SoC that comes from a smartphone, automotive infotainment or set-top box heritage, as these do, hardware-wise, support being a USB device instead of a USB host. A popular example of such a device is the raspberry pi series of single-board computers.

You'd then want to develop on the Linux that ships with these devices – you get direct access through the kernel's USB widget infrastructure, to develop your own stuff.

Proteus is still out. You don't need an analog circuit simulator to simulate a digital bus that's basically binary for all practical aspects, running at 12 MHz.

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237