TRNG9803 Serial Port True Random Number Generator

The TRNG9803 is a simple serial port device combining simplicity and a very competitive price. In some applications the complexity of an USB driver could be problematic; if you also need to investigate and validate the USB-driver's internal function(s). In that case most customers prefer working with a serial port device, that can be run using a minimum of external system software.
The 9803 is compatible with most serial ports and application softwares.

Direct link the the shop's product page here.
Download the TRNG9803 true hardware random number generator information sheet.


  • The example software is written in "C"
  • A module for handling of the serial port/hardware
  • Test software for the hardware
  • Processing of random numbers
  • The application can execute concurrently with the random number system
  • A memory buffer that can be adjusted
  • Binary random number interface
  • Numeric random number interface
  • Example applications as oulined below
  • All is in source code
  • Code compiled in Windows EXE console applications

The software is written to be as portable as possible. It compile on Windows and Linux. Other operating systems/platforms, that is similar in style to Linux, is also be supported. The "main" function include a simple test/debug loop. We also supply four other "main" functions that implement a simple test application with random numbers.

Debug/Test Program

The debug program start and run the random number subsystem. You can follow the operation using the enabled debug print. Included is code to obtain current buffer level and input random number quality level.

Binary Random Numbers

The program take a file name and a file size as parameters, and fill the file with a binary random string. Optionally can a continuous stream of numbered files be generated.

Random Code Generator

The program generates a series of numeric codes in a specified range. The software checks for duplicates so each numeric code appear only once. This is useful in some applications like phone scratch off cards or for printing security labels.

Random Text Generator

The random text generator application print randomised symbols taken from an input symbol set. A typical input symbol set could be numbers 0-9 or letters A-Z. The set is held in a configuration file, making it easy to build your own set suitable for your application. The random text appliaction can be used when generating random passwords, or when generataing random number codes.

Lotto Number Generator

The application run a simple lotto system. Input parameters is the ball set size, the number of numbers to draw from the urn to be printed in ascending order; the number of "Extra" balls to draw to be printed unsorted. By associating the proper parameters of a problem with the lotto application several selection and random order problems can be solved.

Label TRNG9803


If your program communicates using only a keyboard and printed text on the screen, it is called a console application. You can read more about a console application HERE! We have had customers who never before seen a console application in Windows.


Ordinary desktop computers seldom have serial ports nowadays. A problem with serial ports, is that some bad implementations exist, that don't really work in any serious application. If you have a problem with a serial port product, check if another computer possibly have a "good" port, and the product works.

We can not provide any list of ports, manufacturers, models that are OK and work. The ports that did not work was found on economy prised motherboards. All expansion boards have worked, so forth.



Some simple randomization problems can be solved directly using the provided application.