Description: The popularity and easy access of RS-232 ports lend them to many communication projects. You can use a port as is or as a tiny parallel port when the exchange uses only control lines. Before the asynchronous serial-data transfer between two devices can take place, you must ensure that both devices are configured to the same data format and transmission rate. Usually, the OS utility or application program on the host computer performs this task, which the OS or a combination of switches selects in the peripheral. More: The design in Figure 1 and the accompanying software realize the requirement of automatically equalizing the speed of the parties by adapting the bit rate of a microcontroller’s serial port to that of a host computer. The host sends a known ASCII code to a microcontroller that estimates the bit rate of the transmission. The microcontroller samples the receiving end of a transmission line. As soon as the line goes low, indicating a start bit, the microcontroller clears the timer. After the line again goes high, the microcontroller reads the timer’s value and uses this value to calculate the bit rate of a transmission. The microcontroller uses the calculated bit rate in a timing-delay loop for clocking out the data from the microcontroller to the host computer during transmission and for sampling the incoming data during receiving mode. The time between those falling and rising edges on a transmission line depends, of course, on the transmitted ASCII symbol. It is good practice to use a symbol with 2k21 zeros on the low side. Then, when you include the start bit, there are 2k trailing zeroes. One timing unit is easier to derive by substituting a division with k right shifts. The application in Figure 1 uses an 8-bit RISC microprocessor and an ASCII code of 8 (38 hex) to establish a serial communication. Any symbol that ends with 8H also works. The timer increments its value every 4P/FOSC seconds, where P is a prescaler factor and FOSC is the microprocessor’s clock frequency. Thus, the timer’s value after 4 bits have transmitted during the time between the falling and rising edge, is T54/BR, is N5FOSC/(BR3P), where BR is the bit rate. Now you can derive the 1-bit transmission time, which is a reciprocal of a transmission rate.
The RS-232 communication protocol is widely utilized for establishing serial communication between devices. The described circuit involves a microcontroller (mC) that is configured to adapt its serial port bit rate to match that of a host computer. The initial step in this process involves the host sending a known ASCII character to the microcontroller, which serves as a reference for determining the transmission bit rate.
Upon receiving the start bit, indicated by a transition from high to low voltage on the transmission line, the microcontroller initiates a timer. This timer measures the duration until the line transitions back to high, thereby allowing the microcontroller to calculate the bit rate based on the timing of the start and stop bits.
The microcontroller's timing mechanism is crucial for ensuring accurate data transfer. The timer is designed to increment its count every 4P/FOSC seconds, where P represents the prescaler value and FOSC denotes the clock frequency of the microcontroller. The formula T54/BR = N5FOSC/(BR3P) provides a means to derive the timer's value based on the bit rate (BR) and the clock frequency.
The application employs an 8-bit RISC microprocessor, and the ASCII code used for communication is 8 (38 hexadecimal). The choice of symbols for transmission is significant; using symbols with trailing zeros enhances the reliability of the communication by providing clear start and stop indicators.
Overall, this design exemplifies a robust method for synchronizing communication between a microcontroller and a host computer, ensuring that data is transmitted and received accurately based on dynamically calculated timing parameters.The popularity and easy access of RS-232 ports lend them to many communication projects. You can use a port as is” or as a tiny parallel port when the exchange uses only control lines. Before the asynchronous serial-data transfer between two devices can take place, you must ensure that both devices are configured to the same data format and transmission rate. Usually, the OS utility or application program on the host computer performs this task, which the OS or a combination of switches selects in the peripheral.
The design in Figure 1 and the accompanying software realize the requirement of automatically equalizing the speed of the parties by adapting the bit rate of
a mC’s serial port to that of a
host computer. The host sends a known
ASCII code to a mC that estimates the bit
rate of the transmission. The mC samples
the receiving end of a transmission line. As soon as the line goes low, indicating a
start bit, the mC clears the timer. After the
line again goes high, the mC reads the
timer’s value and uses this value to calculate the bit rate of a transmission.
The
mC uses the calculated bit rate in a timing-delay loop for clocking out the data
from the mC to the host computer during transmission and for sampling the incoming data during receiving mode. The
time between those falling and rising
edges on a transmission line depends, of
course, on the transmitted ASCII symbol.
Its good practice to use a symbol with
2
k
21 zeros on the low side. Then, when
you include the start bit, there are 2
k
trailing zeroes. One timing unit is easier to
derive by substituting a division with k
right shifts. The application in Figure 1 uses an 8-
bit RISC mP and an ASCII code of 8 (38
hex) to establish a serial communication. Any symbol that ends with 8H also
works. The timer increments its value
every 4P/FOSC
seconds, where P is a
prescaler factor and FOSC
is the mP’s clock
frequency.
Thus, the timer’s value after 4
bits have transmitted during the time between the falling and rising edge, is
T54/BR, is N5FOSC
/(BR3P), where BR
is the bit rate. Now you can derive the 1-bit transmission time, which is a reciprocal of a
t
The project demonstration has been successfully completed, with the only remaining task being the final project report due on June 15, which will be integrated with a conference paper. This update marks the last entry in the electronic notebook, although...
A project is underway to control the speed of an electric fan (220Vac, 60W, 5A max.) automatically using a microcontroller based on certain parameters.
The circuit design for controlling the speed of an electric fan involves several key components to ensure...
A small transmitter board interfaces with a microcontroller and conductivity probe to measure liquid conductance and conductivity. Precise equations and measurements are provided for this microcontroller-controlled conductivity meter.
The described circuit consists of a compact transmitter board that serves as an...
The kit employs an off-the-shelf microcontroller based on the AtMega328P-PU Arduino, along with a simplified version designed for ease of replication and modification by collaborators and students. This initiative aims to enable the fabrication of simplified microcontrollers for DIY synthetic...
Function generators are essential in the design, testing, and operation of encoders, modulators, demodulators, and measurement instruments. This document presents an economical method to construct a bus-controlled sinewave oscillator that exhibits exceptionally low distortion. The circuit produces a sinusoidal output...
The following circuit is an example of how to get power from an RS-232 serial port. It provides regulated +5V power for logic circuits and also unregulated positive and negative power supplies for the RS-232 transmitting circuit. The circuit delivers...
This project is a microcontroller-based college automation system aimed at addressing the challenges faced in educational institutions. It replaces the conventional notice board with an automated device that allows users to both hear and read the information being announced through...
The DS protocol was designed to provide firmware-based bidirectional host-to-slave inter-processor communications for situations in which no hardware solution is available and the host and/or the slave is incapable of tending the interface in real-time. The only specialized hardware required...
The SP6691 circuit is designed to provide a high output voltage using a lower voltage boost regulator by incorporating a charge pump circuit. This configuration can convert a standard 30V boost regulator into a 60V boost regulator if necessary. Testing...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more