Forum
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.
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.
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.
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.
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
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.
The excellent response to my above question:
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).
-
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.
-
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.
-
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.
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!
Testing USB communications with a DueProLogic device involves several steps to ensure that the device is properly communicating with your computer.
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.
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.