Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC32MZ USB Device - Connection Detection

Status
Not open for further replies.

Kisen

Member
Hi

I am currently working on a USB Device design. It uses a PIC32MZ EF.

So far i have the device enumerate and have implemented the Microsoft Capability Descriptors so that it will install drivers using WINUSB and identify as a named device.
Bulk transfers are also working, so on the whole all going well.

The part that i am trying to complete now is some sort of connection status when PC software connects to the device interface and communicates over EP1 Bulk.

I have read that a device should only ever reply to host commands. So i cant send a signal from my device to see if we are connected.
I also cant seem to find any register on the PIC to indicate that enumeration or connection was successful apart from the VBUS status showing the device is powered.

So i had an idea.. When the device enumerates and the PC software connects, It should send a packet straight away to the device to say its connected. But... How does the device know if the software has disconnected?

I cant seem to get my mindset straight on the best way to achieve this. Has anyone done anything similar, know a better method ?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top