Welcome, Guest
Username: Password: Secret Key Remember me
  • Page:
  • 1
  • 2

TOPIC: New USB Stack in PDS

Re: New USB Stack in PDS 6 years 11 months ago #16325

  • dmtulsa
  • dmtulsa's Avatar
  • Offline
  • Fresh Boarder
  • Thanks received: 1
Well its been a long time for me to visit here. I just want to say PDS now has a full port of Michrochips USB stack straight from C. Great job Les.

So what does that mean to the rest of us. It means now we can use the defacto usb standards. We have descriptors that makes since and most of all Windows/Microchip standard. It is a very good thing. As always the documentation is lacking but it is very easy to use. My main compliant is the fuse config is now in a .inc (USB_DEFS.INC). I kind of like to configure them myself. So anyway interface to windows can be via the Windows HID or CDC driver, Microchips custom driver or the old EasyHid mchid.dll. this is so much better than the old way. mind you that the old commands like usbin, usbout, ect won't work. but its ok because the new ones work great if they were documented. Their NOT. Not to worry they will be and are documented in the .inc's . Anyway here is a working sample:
Device = 18F4550
Xtal = 48
;-------------------------------------------------------------------------------
Declare Dead_Code_Remove = On           
 'includes
 Include "HID_Descriptor.inc"
 'in the usb_defs.inc there is the conf_begain / end so no need for it here.
 'I think there is an error in the defs for 18f4550 PLLDIV should = 5 and USBDIV = 2
 
 'USB defines---------------------------------
Dim USBmsgFlag As Byte        
Dim USBBufferTx[64] As Byte      ' USB Output buffer
Dim USBBufferRX[64] As Byte     ' USB Input buffer

'     HID_Report_In[]   when to use?
'     Clear HID_Report_In  when to use?

'-------------------------------------------------------------------------- 
'define vars -------------------------------------------------------------
Dim i As Byte
 'usb auto ataches correctly no code needed
 
Clear USBBufferTx   ' ensure buffers are empty
Clear USBBufferRX
Clear HID_Report_In
 
 'usb auto ataches correctly no code needed

Main:

     If USB_tAttached = True Then  
        GoSub ChkUSBMsg
     End If   
GoTo Main


ChkUSBMsg:
     mUSBService()               'I assume this checks for a message
     HID_RxReport(USBBufferRX,64) ' read message into buffer
     USBmsgFlag = USBBufferRX[0]  'get byte 0, I send this from PC app
         Select Case  USBmsgFlag  'test byte 0, I send this from PC app
           Case 1               'test for message type 1 from pc
                For i = 1 To 21
                    USBBufferTx[i] = 0x80   'send some values
                Next 
                HID_TxReport(USBBufferTx,64)
                Clear USBBufferTx 
                Clear USBBufferRX
                Clear HID_Report_In   
           Case 2                'test for message type 1 from pc
                For i = 1 To 21
                    USBBufferTx[i] = 0xf0
                Next 
                HID_TxReport(USBBufferTx,64) 'send some different values
                Clear USBBufferTx 
                Clear USBBufferRX  
         End Select
         'clear buffers
         Clear USBBufferTx 
         Clear USBBufferRX
         Clear HID_Report_In         
         
Return
By the way I'm about to be banned form the PDS forum due to I made Les mad. If you agree with him please let me know my errors. If not please show your support as many have.
thanks and please try out the new usb stack

Doug

Re: New USB Stack in PDS 6 years 11 months ago #12390

  • W4GNS
  • W4GNS's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thanks received: 43
Thanks Doug!

I would love to support you, but my post on the Crownhill PDS forum get deleted as fast as I make them, unless someone reply's to my post quickly. But I have PM'ed you on the PDS forum and let you know my thought's.

And Crownhill has made it clear to how they feel about folks also.

Re: New USB Stack in PDS 6 years 11 months ago #12392

Thank you for the heads up Dmtulsa.
I would love to support you, but my post on the Crownhill PDS forum get deleted as fast as I make them
I thought this was with the Amicus forum; do they also remove posts on the PDS forum?

Re: New USB Stack in PDS 6 years 11 months ago #12396

  • W4GNS
  • W4GNS's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thanks received: 43
I never had any removed on the Amicus forum, only PDS forum. I'm a mod on the Amicus forum, so if deleted there I would know who.

Re: New USB Stack in PDS 6 years 11 months ago #12398

  • dmtulsa
  • dmtulsa's Avatar
  • Offline
  • Fresh Boarder
  • Thanks received: 1
You guys are great ant I thank you so very much.

Englands contribution's to the world: Led Zeppelin - Def Leppard and the Beatles,Stones, Eric Clapton, Queen, this list is endless. Long live British ROCK The BEST.

Re: New USB Stack in PDS 6 years 11 months ago #12399

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 365
  • Thanks received: 352
I've had posts disappear from the Amicus forum in the past, and one day, ALL of my posts disappeared. I wasn't banned, but all my posts were gone. Les's only reply was "sometimes mistakes happen" without further explanation or apology.

I've posted little if at all since then...why make the effort if the post may just vanish for no reason.

I think they need to research the meaning of "amicus" in more detail. Maybe it means driven by paranoia and delusion?
  • Page:
  • 1
  • 2
Time to create page: 0.241 seconds