Question

Good morning, I am currently developing a graphical interface that allows visualizing the XADC data of the NEXYS 4 DDR, I found the problem that the UART communication protocol sends 8 bits as information, the xadc samples to 12 bits, someone knows some idea, solution or module that allows me to send the 12 bits of xadc by uart?


Thank you

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

@cristian_zanetti

A few ideas:

You could wait to send a sample over UART until you have two samples available, stored in a simple FIFO, then send out a three-byte group, with four bits of each of the samples packed into the third byte.

If you don't need full 12 bit resolution, you could just send the eight uppermost bytes of each sample.

If UART bandwidth isn't a problem, you could send each sample as two bytes in sequence, with one of the bytes containing four dummy bits.

 

To get a better idea of what implementation you might want, we would need a better idea of your needs. Do you want your application to run in real time? How high of a resolution do you need? Meaning both the size of the samples the application is receiving, and how frequently the application can receive them.

Thanks,

Arthur

Share this post


Link to post
Share on other sites
  • 0

thanks for your answer, I need my implementation to see the data in real time, to do the input signal, to select one of the 4 channels, all this in a matlab interface.
I was working on the idea of first sending 8 bits and then 4 concadenados with zeros. But I have problems with synchronization ie until I send the 4-bit frame and confirm that I get to my Matlab interface I can not receive a new data from xadc, I have been testing but I get data wrong.

I will continue to try.

Share this post


Link to post
Share on other sites
  • 0

@cristian_zanetti,

Why not send six bits at a time, and use the top two bits to specify which of the six bits you are sending?  { 2'b00, 6'b(highbits) } or {2'b01, 6'b(lowbits)} ?

Then any time you receive 2'b01 in the high bits, you can join it to the previous 2'b00 high bit value.

Dan

Share this post


Link to post
Share on other sites
  • 0
16 hours ago, jpeyron said:

Hi @cristian_zanetti,

Is your project using hdl(Verilog/VHDL) or are you using Microblaze? Have you thought of using Ethernet to transfer the data?

cheers,

Jon

I am using VHDL and the cable uart jtag of the card, besides the data I am visualizing them in matlab. and I have not thought about the Ethernet cable, since I do not have information on how to send it over Ethernet, only by uart jtag.

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, D@n said:

@cristian_zanetti,

Why not send six bits at a time, and use the top two bits to specify which of the six bits you are sending?  { 2'b00, 6'b(highbits) } or {2'b01, 6'b(lowbits)} ?

Then any time you receive 2'b01 in the high bits, you can join it to the previous 2'b00 high bit value.

Dan

It is a good idea, but it prevents me from seeing the data in real time, since the programming in matlab must first save them and then analyze them, and I do not need to see the data in real time.

Share this post


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