FTDI Community
General Category => Discussion - Software => Topic started by: AndersG on October 02, 2020, 02:36:30 PM
-
I have a design for an universal keyboard controller for a special type of equipment that use a proprietary protocol. The design is based on a PI24 microcontroller. Unfortunately does that PIC only have one USB port and the microchip libraries lack support for hubs so I thought I'd investigate using a VNC1L as I already had one from another project. The proprietary protocol part is done as is PS/2 input for both Keyboard and mouse.
I am interfacing the VNC1L through SPI and I run it at maximum speed. The docs are sketchy, but I found some examples, brief ones in the internet, but I am wondering if I am going about things the wrong way as this implementation is far from ideal, ie:
You issue an "SSU $A101000100000800" and then loop polling "SSU $210A003D00000000" where 3D is the desired poll speed.
Sometimes, out of the blue the VNC1L will return "Command failed" in which case I have to reissue "SSU $A101000100000800" and then continue polling.
My problem is that this polling eats a lot of cpu cycles that are better needed elsewhere. Is there a more elegant way to do this with a VNC1L or with another chip?
-
Hello:
You may want to consider using our newer VNC2-48L chip - we have precompiled firmware that supports USB Keyboard to SPI or UART interfaces.
VNC2 Datasheet:
https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_Vinculum-II.pdf
SPI Slave to USB HID Device FW:
https://www.ftdichip.com/Support/Documents/AppNotes/AN_199_VNC2_SPI_SLAVE_to_HID_Class_Device_Bridge.pdf
https://www.ftdichip.com/Firmware/Precompiled/SPISlave2USBSlaveHIDKbd.zip
UART to USB HID Device FW:
https://www.ftdichip.com/Support/Documents/AppNotes/AN_194_VNC2_UART_to_HID_Class_Device_Bridge.pdf
https://www.ftdichip.com/Firmware/Precompiled/UART2USBSlaveHIDKbd.zip
-
Thanks! I will look into it. FWIW, I think I have it sorted with the VNC1L though.
The VNC2-32L1C looks tempting though.. How different is it from the VNC1 as an USB to SPI host?
-
Hello:
The VNC1L SPI interface is only available as a SPI slave and uses "managed mode" SPI, which is not commonly used.
The VNC2-32L1C can be configured as a SPI slave or master, and supports "unmanaged SPI", which makes it compatible with industry standard SPI interfaces.
Feel free to contact me via us.support@ftdichip.com going forward.
Best Regards,
FTDI USA