autodetects baud rate circuit MAX202 and PIC16C54


Posted on Mar 21, 2013

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.


 autodetects baud rate circuit MAX202 and PIC16C54
Click here to download the full size of the above Circuit.

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...




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Photodiode-amplifier
Light Meter Circuit
Temperature Controlled NICD Charger IC LM311
Circuit DIY of the inverter (picture and text is explained in detail)
sound via laser light
Single Meter Clocks
Low-noise amplifier



Top