PIC16C765 detect USB cable detached

Is there a way for the software inside the PIC to detect when the USB cable has been detached from a PIC16C765?

We haven't been able to find a register bit that indicates when the cable is not attached.

Thanks, David

Reply to
David Novak
Loading thread data ...

You could use the USB CONTROL REGISTER (UCTRL: 195h) bit 5: SE0: Live Single Ended Zero This status bit indicates that the D+ and D- lines are both pulled to low.

1 = Single ended zero being received 0 = Single ended zero not being received

You could also detect an idle state with USB INTERRUPT FLAGS REGISTER (UIR: 190h) bit 4: UIDLE: This bit is set if the USB has detected a constant idle on the USB bus signals for 3 ms. The idle timer is reset by activity on the USB bus. Once a IDLE condition has been detected, the user may wish to place the USB module in SUSPEND by setting the SUSPEND bit in the UCTRL register.

-- Joe

Reply to
J.A. Legris

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.