1
\$\begingroup\$

I have made a UART controller in VHDL (transmitter, receiver and a FIFO for each component) and I'd like to send/receive 128 bits of data.

Is there anything that prevent me from implementing a 128-bit FIFO, and send/receive 130-bit UART frames ? Or should I send/receive 16 frames of 10 bits (8 bits of data plus 1 bit of start and 1 bit of stop).

\$\endgroup\$
  • \$\begingroup\$ What are you sending the data to? \$\endgroup\$ – Tom Carpenter Jun 25 '18 at 9:23
  • \$\begingroup\$ If you want compatibility with standard UART receivers, send the data as a 160bit frame - essentially 16 standard 10-bit UART packets strung together i.e. 0xxxxxxxx10xxxxxxxx10....xxx1. \$\endgroup\$ – Tom Carpenter Jun 25 '18 at 9:26
  • \$\begingroup\$ Sorry for being a bit unclear... I implemented the UART for my FPGA Basys3 Board, and I want to communicate with my PC through serial port. \$\endgroup\$ – Cedric Jun 25 '18 at 9:29
  • \$\begingroup\$ if you want to talk to your PC then it only does 7 or 8 bit characters you're going to be limited by that, a 128-bit uart is not going to help you \$\endgroup\$ – Taniwha Jun 25 '18 at 9:40
  • \$\begingroup\$ Would it work if I implement a UART controller in C or Python instead of using generic tools like Minicom or Putty ? \$\endgroup\$ – Cedric Jun 25 '18 at 9:42
1
\$\begingroup\$

Start and stop "frame" bits are important in asynchronous communication as they provide a way to sychronise the receiving bit clock with the stream being sent

if you send 128 bits of data the two clocks must agree in frequency to better than 0.4%. Most crystal oscillators are much better than 4000ppm so it could work. but I've not seen such a scheme ever used.

Also the better the clock agreement the better the noise immunity of the system - towards the end of the packet the signal degades as the sampling point drifts towards the edge of the bits.

However most UARTSs send only 8 bits of data between each pair of frame bits. this requires only 5% speed accuracy making communication practical with a cheap ceramic resonator, or even a good RC oscillator.

If you want to communicate with a PC you will need to use a line discipline that it understands, that typically means no more than 8 data bits between the start and stop bits, so transmitting 128 bits of data will require a total of 160 bits on the wire.

\$\endgroup\$
  • \$\begingroup\$ Ok thank you for the answer, I will try to send the whole bits in one frame and if I see it's not working I'll come back to the "traditional" protocol. \$\endgroup\$ – Cedric Jun 25 '18 at 9:39
  • \$\begingroup\$ ordinary PC serial ports can only handle (up-to) 8 bits per frame but you can pack those frames together tightly to produce a packet of several bytes. (or kilobytes....) \$\endgroup\$ – Jasen Jun 25 '18 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.