In the HT82K95E how is the data read on USBD-/DATA pin and input on the USBD+/CLK pin?
Answer The HT82K95E supports both USB and PS/2 modes. When SPS2 (bit 4 in the USR register) = 1, and SUSB (bit 5 of USR) = 0, then the PS/2 mode will be selected. Now the PS2DAI (bit 4 of USC) and PS2CKI (bit 5 of USC) can be used as USBD-/DATA pin and USBD+/CLK pin input data. But note that the corresponding PS2DAO (bit 6 of USC) and PS2CKO (bit 7 of USC) must be set high, otherwise the read in data will all be zero. When SPS2 (bit 4 of USR) = 0 and SUSB (bit 5 of USR) = 1, the USB mode will be selected. Now the USBD-/DATA pin and USBD+/CLK pin will use the SIE for driver control. The USB data needs to use the FIFO to read.