What is the lowest latency communication method between a computer and a microcontroller?

后端 未结 6 1575
误落风尘
误落风尘 2021-02-11 04:04

I have a project in which I need to have the lowest latency possible (in the 1-100 microseconds range at best) for a communication between a computer (Windows + Linux + MacOSX)

6条回答
  •  醉话见心
    2021-02-11 04:21

    You have no guarantees about latency to userland without real time operating system. You're at the mercy of the kernel and it's slice time and preemption rules. Which could be higher than your maximum 100us.

    In order for a workstation to respond to a hardware event you have to use interrupts and a device driver. Your options are limited to interfaces that offer an IRQ:

    • Hardware serial/parallel port.
    • PCI
    • Some interface bridge on PCI.

    Or. If you're into abusing IO, the soundcard.

    USB is not one of them, it has a 1kHz polling rate. Maybe Thunderbolt does, but I'm not sure about that.

提交回复
热议问题