This project shows the serial communication using MC68HC11A8. To simulate circuit in this project, initially activate Mixed Mode simulator from the Schematic Editor window. Simulation can be performed by selecting Run Transient analysis (Oscillograph) or Analysis -> Transient Analysis from Simulation menu.
The circuit contains MC68HC11A8 microcontrollers, Seven Segment Display drivers–9368, and LED Display units. In the circuit, U1(MC68HC11A8) receives data transmitted from U2(MC68HC11A8). The data being received at U1 is converted from hex by a display decoder – 9368 to display information and then given to the display unit .
To simulate this functionality, U1 is configured as serial receiver and U2 as serial transmitter. The controller U2 is programmed to transmit hex code from 0x00 to 0xFF continuously.
At simulation time, U2 initiates transmission by placing a data on SCDR (SCI data register). The SCI module serially transmits this data through TX pin (PORT D 1), and sets TDRE bit (7th bit of SCSR) upon completion. When this flag is set, next data is placed in SCDR after clearing the flag bit. At U1, the data received at RX pin (PORT D 0) is stored in SCDR and sets RDRF bit (5th bit of SCSR) upon completion. When RDRF bit is set, the data in SCDR is transferred to Port B. Port B, which is an output port, is used to pass the received data to seven segment display decoder. The display decoders, at Port B convert this data to display information for seven segment display.
The display shows numbers from 00 to FF when simulated. Serial data at transmit line and equivalent parallel data at Port B can be observed in waveform viewer when simulation completes.
The source cThe source code written either in C or Assembly language can be viewed from the
code editor window.