Using a DUE as a Device instead of an Accessory

Home Forums Hardware Arduino Due Using a DUE as a Device instead of an Accessory

This topic contains 25 replies, has 3 voices, and was last updated by Profile photo of Eric Eric 10 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #131
    Profile photo of Eric
    Eric
    Keymaster

    So I had a though the other day. I was thinking since on things like tablets with only one USB port, you can’t use the Due and external hard drives, or DACs, etc… But you can use the Uno. This is because the Android is the host and the Uno is the slav

    #866
    Profile photo of that_kid
    that_kid
    Participant

    Oh that would be great. Another nice thing about having that option is it’s the same hardware.

    #870
    Profile photo of Eric
    Eric
    Keymaster

    I think I’m going to stop supporting the UNO because of this idea. It it such a limiting board for the things we want to do. The only thing I’m unsure of at the moment is if I can use the USB-Serial converter it comes with, as it currently only works wi

    #2505
    Profile photo of that_kid
    that_kid
    Participant

    Just wanted to see if there’s been anything with regards to using the Due as a device? All this shield talk has me wanting to join in.

    #2508
    Profile photo of Eric
    Eric
    Keymaster

    Haha, I’ve have played with it, but haven’t gotten it sorted completely.  It’s a pretty major change to make to both sides of the code.  I know how advantageous it would be to offer both options so it WILL happen, one way or another.  If you want a shield you can order one as they currently are (software not quite finished 😉 , but coming along nicely) and test it out.

    If it turns out that I can’t make the Due work at a device without extra parts I did make the shield have a spot for an FTDI chip, but it means surface mount soldering with fine pitched pins.  If you feel comfortable doing that you could always add it later.  Or there is another alternative, you could hack something like this together and solder it to the top of the shield.

    #2516
    Profile photo of that_kid
    that_kid
    Participant

    Sounds like a plan, I have surface mount solder experience and the equipment to match so that won’t be a problem at all.  So what are the differences when using the FTDI chip?

    #2517
    Profile photo of Eric
    Eric
    Keymaster

    I know FTDI works.  I just haven’t finished porting the code from the old Uno days to the new Due days.  But the hardware is working.  I don’t know for sure if I can get the Due’s USB to Serial adapter to work with the drivers that are available.  I believe they should work, but I don’t know.

    As you can likely tell from the forum activity, I’ve been working hard on the HD radio stuff.  That being said everything else has been pushed down a notch in priority.  Thanks to Jeff’s help I’ve gotten tons of data I wouldn’t be able to get otherwise and it’s really helped.  I’ll have a few build this week I’m sure with the new HD stuff in varying states of functionality.   Once that is done I plan on getting the IO stuff working better.  Again, another HUGE rewrite.

    #2542
    Profile photo of that_kid
    that_kid
    Participant

    Yeah I’ve been following the HD radio development, it’s shaping up nicely.  I’ll order my shield soon so I can start building it, I have a HD radio serial cable from my carpc days that I may see if I can get working too.

    #2543
    Profile photo of Eric
    Eric
    Keymaster

    Awesome.  If you want to use an existing cable you’ll need to cut the end off and solder a new connector one which I can supply.  Or make an adapter between the two.  Either way.

    #2707
    Profile photo of Eric
    Eric
    Keymaster

    I’ve got this started. The table is recognizing the Due using the built in AtMega16U2. It will take a while to change up the firmware though to send over both ports.

    #2711
    Profile photo of that_kid
    that_kid
    Participant

    That’s great, looking forward to testing it out.

    #2712
    Profile photo of Eric
    Eric
    Keymaster

    So it’s working. Not very well yet. I can receive data properly, but sending data is flakey. But this is good news, it means hopefully without too many more changes it should work nicely.

    #2715
    Profile photo of Eric
    Eric
    Keymaster

    I’ve made some improvements today. It seems to work pretty good. I’m sure there are still issues and improvements needed, but it is working.
    You’ll need both Arduino firmware and latest nightly. Only the Arduino Due is supported. I’ve got two USB id’s for them, and only those two will be recognized. This should help stop Autosense trying to connect to other devices there isn’t support for.
    If you have an Arduino and you can’t get the USB Device popup to show, make sure the Vendor ID is: 0x2341 or 0x2a03 and the Device ID is: 0x003d

    #2716
    Profile photo of Eric
    Eric
    Keymaster

    I’ve found I’m not getting complete chunks of data and the checksum code is failing. If I disable the checksum things go crazy.
    So I’ve been digging down deeper to try and find the cause. It seems the the Arduino is sending out full chunks as it’s supposed to, the logic analyzer backs that up (at least I haven’t found it not working). So that means it must be on the Android side. I’ve been digging deeper down all the way into the driver. I’ve found a few areas that I’ve improved, but still it seems full blocks aren’t always coming. Intermittent problems are the hardest -_-
    Everything works great with the ADK version, but switch to the serial version and things go haywire.

    #2717
    Profile photo of that_kid
    that_kid
    Participant

    Sounds like the driver needs to be improved on the Android end. So the full blocks show up either sometimes or not at all?

  • Author
    Posts
  • #131
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    So I had a though the other day. I was thinking since on things like tablets with only one USB port, you can’t use the Due and external hard drives, or DACs, etc… But you can use the Uno. This is because the Android is the host and the Uno is the slav

    #866
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Oh that would be great. Another nice thing about having that option is it’s the same hardware.

    #870
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I think I’m going to stop supporting the UNO because of this idea. It it such a limiting board for the things we want to do. The only thing I’m unsure of at the moment is if I can use the USB-Serial converter it comes with, as it currently only works wi

    #2505
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Just wanted to see if there’s been anything with regards to using the Due as a device? All this shield talk has me wanting to join in.

    #2508
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Haha, I’ve have played with it, but haven’t gotten it sorted completely.  It’s a pretty major change to make to both sides of the code.  I know how advantageous it would be to offer both options so it WILL happen, one way or another.  If you want a shield you can order one as they currently are (software not quite finished 😉 , but coming along nicely) and test it out.

    If it turns out that I can’t make the Due work at a device without extra parts I did make the shield have a spot for an FTDI chip, but it means surface mount soldering with fine pitched pins.  If you feel comfortable doing that you could always add it later.  Or there is another alternative, you could hack something like this together and solder it to the top of the shield.

    #2516
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Sounds like a plan, I have surface mount solder experience and the equipment to match so that won’t be a problem at all.  So what are the differences when using the FTDI chip?

    #2517
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I know FTDI works.  I just haven’t finished porting the code from the old Uno days to the new Due days.  But the hardware is working.  I don’t know for sure if I can get the Due’s USB to Serial adapter to work with the drivers that are available.  I believe they should work, but I don’t know.

    As you can likely tell from the forum activity, I’ve been working hard on the HD radio stuff.  That being said everything else has been pushed down a notch in priority.  Thanks to Jeff’s help I’ve gotten tons of data I wouldn’t be able to get otherwise and it’s really helped.  I’ll have a few build this week I’m sure with the new HD stuff in varying states of functionality.   Once that is done I plan on getting the IO stuff working better.  Again, another HUGE rewrite.

    #2542
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Yeah I’ve been following the HD radio development, it’s shaping up nicely.  I’ll order my shield soon so I can start building it, I have a HD radio serial cable from my carpc days that I may see if I can get working too.

    #2543
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Awesome.  If you want to use an existing cable you’ll need to cut the end off and solder a new connector one which I can supply.  Or make an adapter between the two.  Either way.

    #2707
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I’ve got this started. The table is recognizing the Due using the built in AtMega16U2. It will take a while to change up the firmware though to send over both ports.

    #2711
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    That’s great, looking forward to testing it out.

    #2712
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    So it’s working. Not very well yet. I can receive data properly, but sending data is flakey. But this is good news, it means hopefully without too many more changes it should work nicely.

    #2715
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I’ve made some improvements today. It seems to work pretty good. I’m sure there are still issues and improvements needed, but it is working.
    You’ll need both Arduino firmware and latest nightly. Only the Arduino Due is supported. I’ve got two USB id’s for them, and only those two will be recognized. This should help stop Autosense trying to connect to other devices there isn’t support for.
    If you have an Arduino and you can’t get the USB Device popup to show, make sure the Vendor ID is: 0x2341 or 0x2a03 and the Device ID is: 0x003d

    #2716
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I’ve found I’m not getting complete chunks of data and the checksum code is failing. If I disable the checksum things go crazy.
    So I’ve been digging down deeper to try and find the cause. It seems the the Arduino is sending out full chunks as it’s supposed to, the logic analyzer backs that up (at least I haven’t found it not working). So that means it must be on the Android side. I’ve been digging deeper down all the way into the driver. I’ve found a few areas that I’ve improved, but still it seems full blocks aren’t always coming. Intermittent problems are the hardest -_-
    Everything works great with the ADK version, but switch to the serial version and things go haywire.

    #2717
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Sounds like the driver needs to be improved on the Android end. So the full blocks show up either sometimes or not at all?

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic.