Forum Discussion
That would be the correct pin to send the TX data on to the RS232 connector.
Either 3.3V LVTTL or 3.3V LVCMOS should work as the signal type.
It would be interesting if you could post a sample ModelSim waveform for the TX data line for some known character.
As I mentioned before, I need to transmit data from FPGA for 7 bit and I need it binary. So I didn't check for characters, only for binary bits.
here is waveforms when I sent 01010101. tx_dv should be on to send the data, tx_serial is serial data (PIN_G9).
based on the waveform it is sending the each bit data for CLK_PER_BIT (clk/baud rate) times of clk.
- _AK6DN_3 years ago
Frequent Contributor
Well that waveform is really not useful at all.
Sending the same data over and over like that (a 0/1 pattern) it is virtually impossible to determine the start and stop bits.
Their is no bit timing measurement, and the clock waveform can't be used as is to determine the bit period is valid.
I would suggest sending more varied data patterns (ie, not the same one over and over).
Space them out in time a bit, so that the start and stop bits can be easily discerned.
And show a measurement of edge-edge transitions of a bit cell to be able to validate the baud rate is correct.
- MG0073 years ago
New Contributor
Thank you for the feedback.
I tried different data strings, 01010101, 00000000,11111111,10101010,11110000, and 00001111.
It seems to work fine.
It starts sending bit 0 as starting bit then sending the 8 bit data and sending 1 as ending bit. all 10 bits sent for 435 clk(50M/115200). And it sends data from MSB to LSB.
- MG0073 years ago
New Contributor
I again tested the UART transmitted with some constant 8 bit data, and it looks working fine. But I have some other issue to resolve. I am using Serial Port Monitor Software to read the transmitted data, but it reads it continiously in large length. How can I get the data in 8 bits only?
For example I sent 01010101 which is "55" in hex and I get this:
Or when I sent 10101010 which is "aa" in hex I get this:
How I only get 55 or aa only ?
- _AK6DN_3 years ago
Frequent Contributor
Do you mean how do you get a single character 0x55 or 0xAA in your receiver?
I suspect you are probably enabling the UART module to transmit a blast of characters, rather than just one.
Maybe unintentionally, but that is what it appears to be doing.
You need to adjust the control inputs to your UART module to transmit just one character, and then stopping.
You don't show what the top level control signals driving your uart look like so I am just speculating based on the waveform.
- MG0073 years ago
New Contributor
Yes, I meant 0xAA or any data.
I was also guessing that the enable being one is the issue (just wanted to make sure I am not doing sth wrong), for this testing I used the switches on the FPGA for implementing the enable for transmit.
I also wanted to know if there is any software I can use for reading the serial data in PC that I can put the recorded data in excel easily. This one I am using, Serial port monitor, shows the data in a table but does not save it in a table. it only can be saved as text. I need to save the received data like a table in excel.
- _AK6DN_3 years ago
Frequent Contributor
Excel can easily import data from text files using a .CSV (comma separated value) file format. For example:
1,123,456 2,789,345 3,000,123so just output a comma between data values on a line, and end a line with a LF character.
Just about any Windows terminal program allows you to capture the text from the serial link and save it to a file.
I happen to like an use a program called TeraTerm just because I've used it for like 25+ years.
But there are lots of other choices.