TAMS / Java / Hades / applets: contents | previous | next | ||||
Hades Applets contents visual index introduction std_logic_1164 gatelevel circuits delay models flipflops adders and arithm... counters LFSR and selftest memories programmable logic state-machine editor misc. demos I/O and displays DCF-77 clock relays (switch-le... CMOS circuits (sw... RTLIB logic RTLIB registers latches registers counter shift-register 16-bit setta... ROM RAM DPRAM stack stack address-decoder byte- vs. wo... memory demo ALU (user-de... PIO 8255 PIO 8255 USART 8251 8251 text-to... 8251 transmi... 8251 databit... 8251 parity ... 8251 prescaler 8251 loopbac... 8251 loopbac... 8251 error d... microprogram full micropr... 1-address da... 3-address da... 2-address da... Prima processor D*CORE MicroJava Pic16 cosimulation Mips R3000 cosimu... Intel MCS4 (i4004) image processing ... [Sch04] Codeumsetzer [Sch04] Addierer [Sch04] Flipflops [Sch04] Schaltwerke [Sch04] RALU, Min... [Fer05] State-Mac... [Fer05] PIC16F84/... [Fer05] Miscellan... [Fer05] Femtojava FreeTTS | USART 8251 parity modes demonstration
Circuit Description
This applet demonstrates the parity modes of the
USART 8251
universal synchronous and asynchronous receiver and transmitter.
For an overview and register description of the USART chip,
please visit the 8251 overview applet page.
Most RS-232 receivers and transmitters include the option to calculate and append a parity bit to each sent data character; usually, either even or odd parity can be selected. If the receiver is setup to the same parity mode as the transmitter, all signle-bit errors (and half of the multi-bit errors) in the data-stream can be detected. Naturally, automatic error-correction is not possible with a simple parity code; if necessary a better ECC code or a handshaking protocol for data retransmission must be used on top of the raw RS-232 encoding.
As you can see, the circuit shown in the applet includes a total of three 8251 chips. The TXC inputs of all three chips are driven by the same clock generator which is set to a clock period of 1.6667 msec or 600 baud. The nCTS (clear to send) inputs of all chips are tied to ground to enable the transmitters. A stimuli generator component is used to automatically initialize all three USARTs for transmission at the start of the simulation. However, different communication parameters are selected for the three USART chips:
After the initialization sequence, the stimuli generator component drives the databus with a few selected 8-bit characters and then enables the nWR signals of all three USARTs simultanously. Therefore, all three 8251 chips start to transmit the same characters at the same time, but with different parity modes. The first few transmitted characters are selected because they are easy to recognize via their bit-pattern in the RS-232 encoding: 0x55 0xAA 0x33 0x00 0x01 0x02 0x03 0x00Afterwards, the string "Hello, world!" is transmitted: 0x48 0x65 0x6c 0x6c 0x6f 0x2c 0x20 ...Note that the stimuli-generator pauses the simulation after its automatic sequence has finished. This should take at most a few seconds. When the automatic sequence has finished, you should look at the signal waveforms and compare the RS-232 datastreams and check the different parity modes. Just click the repaint button in the waveform viewer to update the waveforms, and use the zoom buttons or the zoom-region option to enlarge the areas of interest. The screenshot below shows example waveforms during the first block of transmitted characters.
To explore the circuit, just continue the simulation via clicking the "run" button (play) in the simulator control panel. You can now use the DATA input switch and the nWR write-enable switch to transmit other data characters via the three USART chips. Use the nCS lines (nCS_NONE, nCS_ODD, nCS_EVEN) to enable one, two, or all three of the chips. You can also type the following bindkeys to control the applet: 'r' for nRD, 'w' for nWR, 'x' for RESET, 'n' for nCS_NONE, 'o' for nCS_ODD, and 'e' for nCS_EVEN.
| |||
Print version | Run this demo in the Hades editor (via Java WebStart) | ||||
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German) | ||||
Impressum | http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/50-rtlib/65-usart8251/usart-parity.html |