0% found this document useful (0 votes)
59 views16 pages

Lecture 2 - ES - MH501

The document discusses microcontroller I/O interfaces including parallel and serial interfaces. A parallel interface uses 8 data lines to transmit data simultaneously while a serial interface transmits a single bit of data at a time. It also discusses analog to digital converters (ADCs) and digital to analog converters (DACs) which are used to convert analog signals to binary codes and vice versa. Finally, it provides an overview of a typical control program flow that reads a setpoint, measures the actual value, calculates error, determines the output, and loops continuously.

Uploaded by

N Nandini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views16 pages

Lecture 2 - ES - MH501

The document discusses microcontroller I/O interfaces including parallel and serial interfaces. A parallel interface uses 8 data lines to transmit data simultaneously while a serial interface transmits a single bit of data at a time. It also discusses analog to digital converters (ADCs) and digital to analog converters (DACs) which are used to convert analog signals to binary codes and vice versa. Finally, it provides an overview of a typical control program flow that reads a setpoint, measures the actual value, calculates error, determines the output, and loops continuously.

Uploaded by

N Nandini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Microcontroller I/O Interface

Parallel port interface (parallel interface)

 8 Bit parallel interface: simultaneous transmission using eight lines


8Bit data。data bus Communication interface with the outside world 。
(right ON-OFF Device, parallel interface is the ideal interface for
input and output)
 Every 1-bit signal is called a logic variable (logic variable);8 Bit
parallel port, providing eight logic variable。
 e.g. Limit switch use 1 input bit;control one ON-OFF Motor 1
output bit.
8 Bit DAC (Digital-to-Analog Converter)
output Signal by I/O needs to be converted by DAC before
outputting to the computer
Example

An 8-bit DAC is 10 V Vand


ref the binary input is 10011011.
Find the analog output voltage.
Sol:
The decimal value of binary input 10011011 is 155, From
the eq. The analog output voltage can be calculated:

Vout = (input × Vref)/256 = (155 × 10V)/256 = 6.05V


16- pin DIP

150 ns Conversion speed


 ADC analog-to-digital converter: A circuit that
converts analog voltages into groups of digits.

Must be between 0 and Vref

Output: binary output


Example:

An 8-bit ADC is 7 Vdc, and the analog input is 2.5 Vdc.


What is the ADC binary output code?
Sol:
 An 8-bit word has its maximum decimal output
value is 255 when, Vin  Vref so the analog input
voltage (Vin) of 7 Vdc can be converted to 255
(decimal). Using the input/output data relationship
to get a ratio, and then use it to find the output of
this particular input 2.5 Vdc:
 Output/Vin = 255/(7Vdc)
 Output = (2.5 Vdc×255)/7Vdc = 91decimal =
01011011 binary
100 µs conversion speed
700 times slower than DAC0808

20- pin DIP


Control System using Parallel Interface

Logic 1 CW
Logic 0 CCW
Serial interface (serial
interface)

 Send a series of single-bit data.


 Just "data" and "return (return)" Two
lines.
 Can use the existing telephone
system to transmit data.
 In the computer, the data appears side by side
 UART (universal asynchronous receiver transmitter)
Parallel data←→serial data conversion
Figure shows a Standard format of asynchronous serial data.
A start bit (start bit), then the capital Data, then a parity, and a
stop Stop bit.

 Standard bit transfer rate: 300 bps (bits per second), 1200
bps, 2400 bps, 9600 bps, 14,400 bps, 28,800 bps, 33,600
bps, 57,600 bps.
Serial transmission interface (RS-232
standard)

Divided into data terminal equipment (DTE: data terminal


equipment) And data communication equipment (DCE: data
communication), DTE is usually a computer, and DCE is
usually a modem

Figure, the RS-232 interface has seven signal lines Pin 2


sends serial data, pin 3 receives data, pin 4 requires Request
to send data, pin 5 clear send (clear to send) information, etc.
 Networking remote control
 Local area network (LAN: local area network) is most
commonly used
Control program planning
Figure shows a generalized controller program,
and an explanation of the program follows:
1. The program reads in the set-point data (recall
that the set point is the desired position
of the controlled variable). This data could be
read in from an input port or from memory.
2. The program directs the computer to read
(from a sensor) the actual value of the controlled
variable.
3. The actual data are subtracted from the set
point lo gel the error.
4. Based on the error data the computer
calculales a new actualor control signal.
5. The new output is sent to the actuator.
6. The programs loops back to step I and starts
over again.
Microcontroller (single chip microcomputer) Especially
designed for control applications. Including a microprocessor,
memory (RAM and ROM), input/output ports, and other
unique features.

Motorola 68HC1l (8-bit microcontroller)


Intel 8051 (8-bit microcontroller)
Microchip Technology PIC 16C72 (8-bit)
Parallax Inc. BASIC Stamp

You might also like