Forum

 
DueProLogic USB com...
 
Notifications
Clear all

DueProLogic USB comms test

moffy
(@moffy)
Active Member

Hello, I have just purchased a DueProLogic board and after some initial problems have it working with Quartus Lite 20.1 and the PC apps compile nicely on  VS2022. Thanks for a great board.

I managed to run the demo app successfully but now I would like to do my own USB read project. I would like to set up a counter, easy enough, counting at 2MHz and on each count I would like to transfer that via USB to the PC. The PC app is simple enough, which I have done before, open a comm port and read continuously, but are there any special protocols I need to be aware of with the Active Transfer Library? I will be writing the PC app in C/C++ for VS2022.

Secondly, how to set up the ATL in such an instance, excuse my ignorance, but it is just a black box at present? Are there handlers needed for any command protocols via USB? Your advice about how to approach this would be appreciated.

Quote
Topic starter Posted : 16/04/2024 2:37 am
Topic Tags
moffy
(@moffy)
Active Member

Well I guess I will answer my own questions as there appears to be no support for what is a good product. Port B of the FT2232H needs to be configured for Async FT245 mode in its EEPROM via FT_Prog, because it is currently configured for UART, and that is what the ATL and Host software in the examples works with. They have code for an FT245 interface but how that is invoked I have no idea as the EEPROM for the FT2232H needs to be reprogrammed to use port Bs async FT245 interface.

ReplyQuote
Topic starter Posted : 18/04/2024 4:03 pm
joannaylor
(@joannaylor)
New Member

Test your setup thoroughly to ensure reliable communication between the microcontroller and PC. Use debugging tools to troubleshoot any issues that may arise during development.

strands

ReplyQuote
Posted : 25/04/2024 8:12 am
moffy
(@moffy)
Active Member

@joannaylor

Sorry, but that advice is so general as to be meaningless, it applies to almost any debugging which is not what the question is about.

ReplyQuote
Topic starter Posted : 25/04/2024 1:52 pm
admin
(@admin)
Admin

@moffy

Hello, my apologies for the late response. Yes, you are correct, the DPL is set up for Bi-Directional UART via USB. That being said, we do have a version of the software package that can use the FTDI chip in the FT245 Asynchronous mode. There are no hardware changes needed, the board is already set up for the FT245 mode. Unfortunately, we created our own *.inf file to use this communication scheme. This custom *.inf file is not signed by Microsoft. So, you will have to change your Windows PC to the "Disable Driver Signage" mode. 

 

If you are interested in getting a copy of the software package, please email me at sales@earthpeopletechnology.com

 

Thanks, Richard

 

ReplyQuote
Posted : 25/04/2024 11:20 pm
moffy
(@moffy)
Active Member

@admin

Thank you for your response. Could you also answer a question? I used FT_Prog to look at the EEPROM and it showed port B configured as UART, also isn't UART mode and FT245 incompatible since they use some of the same pins, isn't EEPROM programming necessary to switch between them or does the setbitmode function allow switching between them? The data sheet states that for port B EEPROM programming is necessary for FT245 async mode and I assumed that you couldn't then switch between that and other modes.

P.S. I asked the same question in my email and am repeating it here for the benefit of others. Thanks.

ReplyQuote
Topic starter Posted : 26/04/2024 3:00 am
moffy
(@moffy)
Active Member

The excellent response to my above question:

"The answer to your question is, the channel B must be set up as FTBUS. It looks like this in Template:
 
 
So, since you did NOT ask, I will give you the five minute history of these products. Back in 2012, myself and my colleague developed the first of the EPT products, the UnoProLogic. The idea was to develop a piece of hardware that will easily allow Electrical Engineers to capture, store and send/receive data using a Windows PC. We made it compatible with the Arduino Uno as that was the most popular MCU platform at the time. We wanted to use the asynchronous FT245 mode as this was the fastest data transfer method. My colleague wrote the Windows HAL in C++ and we used C# as the API as that was a popular, easy platform at the time. We decided to NOT distribute the Windows code as Open Source. So, FTDI gave us a set of PID numbers for use with EPT. Using the PID numbers we created our own *.inf file. However, we did not go through the Microsoft Driver Signing process as it was too costly. Back in 2014, this was not a problem as Windows 7 was standard platform and turning of driver sign checking wasn't a big deal. In 2020, Windows 10 made Disabling Driver Signage a problem. And customers started complaining about this. So, we released a new version of software that used the default FTDI *.inf  and used UART communications only. Now, customers are happy with the seamless loading of drivers, but we are limited in speed by the UART settings. However, for the DueProLogic, all the signals are connected between the FPGA and the FTDI chip for asynchronous FT245 mode. All you need is the software. "
 
ReplyQuote
Topic starter Posted : 29/04/2024 12:35 am
David Menk
(@davidmenk3)
New Member
Posted by: @moffy

Hello, I have just purchased a DueProLogic board and after some initial problems have it working with Quartus Lite 20.1 and the PC apps compile nicely on  VS2022. Thanks for a great board.

I managed to run the demo app successfully but now I would like to do my own USB read project. I would like to set up a counter, easy enough, counting at 2MHz and on each count I would like to transfer that via USB to the PC. The PC app is simple enough, which I have done before, open a comm port and read continuously, but are there any special protocols I need to be aware of with the Active Transfer Library? I will be writing the PC app in C/C++ for VS2022.

Secondly, how to set up the ATL in such an instance, excuse my ignorance, but it is just a black box at present? Are there handlers needed for any command protocols via USB? Your advice about how to approach this would be appreciated.

Hello,

Great to hear you’re enjoying the DueProLogic board! It's good that you've got everything up and running smoothly.

For your USB read project, where you want to transfer a 2MHz counter value to your PC, there are a few things to keep in mind with the Active Transfer Library (ATL).

  1. Protocols: The ATL simplifies USB communication, but you’ll need to familiarize yourself with its command protocols. Generally, you’ll be sending and receiving data packets, so ensure your counter values are packaged correctly.

  2. Setup: To set up ATL, you'll need to initialize it in your code. This often involves setting up the USB connection and configuring endpoints. The library documentation should have examples that can guide you through this process.

  3. Handlers: Yes, you will need handlers for command protocols. These handlers manage the data packets sent and received. You’ll write functions that respond to incoming data, ensuring your counter values are correctly transferred and read by the PC application.

Here’s a basic approach:

  • Initialize the ATL in your project.
  • Configure the USB endpoints and set up your counter logic.
  • Create handlers to manage the data transfer, ensuring your counter values are sent in the correct format.

Your PC application, written in C/C++ with VS2022, should continuously read the data from the comm port, which you mentioned you’ve done before.

For detailed steps, I recommend checking the ATL documentation and examples provided with the library. They’ll give you a clearer picture of how to implement this.

By the way, if you're looking to monetize your projects or blog about your experiences, you might want to explore some of the best paying affiliate programs. It’s a good way to generate some extra income while sharing your knowledge.

Hope this helps, and best of luck with your project!

Best regards.

ReplyQuote
Posted : 20/05/2024 10:17 am
DoM
 DoM
(@dom)
Active Member

Hey everyone,

I have been using DueProLogic for USB comms testing, which is quite effective for my projects. It simplifies the testing process and offers reliable results. I would love to hear about others' experiences with it!

ReplyQuote
Posted : 17/06/2024 6:54 am
Andreaa23
(@andreaa23)
New Member

Testing USB communications with a DueProLogic device involves several steps to ensure that the device is properly communicating with your computer.

Geometry Dash Breeze

ReplyQuote
Posted : 07/08/2024 7:14 am
Xerred
(@xerred)
Active Member

I have done this kind of testing in a written format and it was very difficult. Luckily I found https://www.nursingpaper.com/sample/ and they helped me through it. Contact them for help.

This post was modified 4 months ago by Xerred
ReplyQuote
Posted : 27/08/2024 8:17 am
kaihavertz
(@kaihavertz)
New Member

To set up the DueProLogic board for USB data transfer, you need to initialize the ATL, create a USB endpoint, and register a handler function.

Retro Bowl College

ReplyQuote
Posted : 16/10/2024 3:14 am
Share:
Copyright © 2021, EarthPeople Technology. All rights reserved.