USBDemo was a good starting point for me, Thanks Steve.
But there are several problems that don't coincide with what you want.
1) When you disconnect the cable, it will still try to send data, causing the PIC to enter a Locked Loop, waiting to send to an inactive bus.
2) You really have no indication that anything was received.
If there's no incoming data, it just goes ahead and sets the dutycycles again, using the old data left over in the buffer.
3) There's no indication of when it's connected, when something was received or when it's ok to send.
4) With the 1mS servicing from Timer0, it's a bit sluggish when enumerating, overall data rates suffer and it uses TMR0 when it doesn't need to.
5) EasyHID no longer works with 2.60, so it's difficult to make changes to the descriptors.
6) I don't use Visual Basic, so I can't update the PC program.
My main language is Delphi, and I stopped using mchid.dll a long time ago.
I would have worked with Steve to build a better demo, but alas, he's not here.
<hr>
I'm thinking it's time to unveil DT_HID.
It's the PIC side of USB, made ... yes, I'll say it ... EASY!
The PC side is still up to you, but it even works with Steve's original VB prog, so that, or any other VB/Delphi program from EasyHID can be used as a "template".
I'm not even going to tell you how it works.
I defy you to not understand what it does.
Up until you ask a question.
Warning, the example is setup for 13K50/14K50.
Comment the configs, and uncomment the other configs (if needed).
Change ANSELs to ADCON1 (if needed).
Also note: This is for PBP 2.60 only.
BasicUSB.pbp is the test program.
Don't shoot me, I can't even play a piano ...
Bookmarks