• 0

Limit of Pattern Generator Transmission


Question

Greetings,

I'm working on a project utilizing the Pattern Generator function of Analog Discovery 2. I chose the Pattern Generator function based from the WaveForms GUI. In that interface, it can be used to transmit data in parallel. I created a VB Script consisting of Pattern Generator APIs, it was working fine.

 

The problem that I encountered is its possible limitation: it can only transmit up to 102 characters. Each character consists of 10 bits (1 Start bit, 8 Data bits, and 1 Stop bit).
Here are example of that scenarios:

1). Transmitted messages using DIOs #0 and #1 were received by 2 UART Controllers successfully. 1st message was exactly 102 characters.

image.png.29843358e9872e277239855481aeb897.png

I added another character to the longer message and it became 103 characters. 
image.thumb.png.5fa5eee55a82c8564a2ed3b866d6c07d.png

2). The received results of the 2 UART Controllers is this:
image.png.310482263f21e5c0e4455492bb269faf.png

It was just blank for the other trials that I've done.

My question is can the Pattern Generator be used to transmit data with a length more than 102 characters?
If I want to transmit a minimum of 256 characters, can the Pattern Generator handle it? 

Any advice will surely help.
 

Best regards, 
Lesiastas

Edited by Lesiastas
Incomplete content
Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Lesiastas

In case you are using the default device configuration, you have 1k (1024) custom digital-out (pattern generator) bit buffer per channel available. With this you can send 102 uart characters at once, 1024/(1+8+1).
You could use the 4rd device configuration to have 16k bit available, 1638 uart chars. See the attached post below.

You should take care to pass at most the buffer size for FDwfDigitalOutDataSet. In case you want to send more data split the string and transfer sequentially.
You can also use the FDwfDigitalUartTx function which splits the string sending depending on the available device buffer.

 

Edited by attila
Link to post
Share on other sites
  • 0

Hi @attila

Thanks for the advice regarding the Analog Discovery 2's Device Configuration. I applied your advice and I can now transmit messages with more than 102 characters using the Pattern Generator Script I'm working on.

I used DIO #0 and #1 to transmit several paragraphs from a piece I've found. Here is the result that I was able to receive using 2 UART Controller:

image.png.e4e8849873be1ed37554c8e5b3a58fc6.png

It was able to transmit it perfectly! Thank you for your guidance!
More power to you and Digilent!

Best regards,
Lesiastas

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now