Patent ID: 8782300

Claim:
An electronic apparatus carrying out serial communication with another apparatus having a communication function, the electronic apparatus comprising: a serial interface circuit including a baud rate adjusting circuit and carrying out serial communication with the other apparatus; and a clock generation circuit generating an internal clock signal, the electronic apparatus being connected to the other apparatus and receiving a serial signal from the other apparatus, wherein the serial signal is composed of a start bit of 1 bit, data bits having a plurality of bits following the start bit and a stop bit of 1 bit following the data bits, wherein the baud rate adjusting circuit executes the processes of: (a) measuring a time width of each of bits composing the received serial signal by using counting operations of the internal clock signal generated by the clock generation circuit; (b) detecting a maximum value and a minimum value of time widths of the respective measured bits; (c) computing an average value of the time widths of the respective measured bits; (d) computing a maximum tolerance and a minimum tolerance based upon the average value of the time widths of the respective bits; (e) determining whether or not the maximum value and the minimum value are located within a range of the maximum tolerance and the minimum tolerance; and (f) setting a baud rate corresponding to the average value when the maximum value and the minimum value are within the range of the maximum tolerance and the minimum tolerance, and wherein the electronic apparatus executes the serial communication with the other apparatus at the set baud rate.