8. Communications Flashcards
Do microcontrollers need to communicate with other digital devices? Examples where it is the main purpose of the mc?
Yes many, or even most, do. In many cases this is the main purpose of the microcontroller: remote controls, keyboards. Many are used primarily as interfaces to larger digital systems.
Is the scale of communication large or small? Examples?
Mostly the scale of communication is modest. Keyboards and other human devices: few bytes per sec. Sensors, few kbytes per sec.
What does communication within a piece of equipment usually mean?
Communication with other devices of the same PCB.
What are examples of communication within a piece of equipment?
- user interface (eg keypads, selector switches) can easily run from pins on the ports of a small mC
- Sensors with digital interfaces
- additional memory, perhaps for data logger or processing
- displays more complicated that the mC can drive directly (eg LCD displays which usually have their own mC built in)
- other mCs in a big system
What interfaces are available to deal with these?
serial (eg USB), microwire, serial peripheral interface (SPI), inter-integrated circuit (I2C) bus, LINbus, one-wire bus…
Can mCs have these interfaces built in?
Many do, which makes them very easy to use
What are examples of communication between pieces of equipment?
Huge range of possibilities:
- components of a hi-fi or home cinema system may be linked with a control system - sometimes I2C
- test equipment, often linked together with a specialised interface called IEEE-488
- control of a large building (heating, cooling, ventilation, lighting, fire,..)- might be linked on a network, smart buildings
what interfaces are used for communication between pieces of equipment?
Tended to use proprietary systems in the past but are increasingly based on the internet for larger systems, eg buildings.
What is the specialized network for cars called?
CANBUS
What are the characteristics of CANBUS?
- designed to be robust physically and electrically, with several levels of error checking
- needs a dedicated interface, either a separate chip or built into a mC
How might communication with a computer be done?
- serial port (COM1 etc)
- parallel (printer) port
- keyboard and mouse ports
- USB
- firewire , similar to USB but more specialised
- wireless eg bluetooth
- can use the bus inside the PC
What is serial communication?
data is sent as a stream of bits, only one at a time
What is parallel communication?
Many bits (usually 1, 2 or 4 bytes) are sent at the same time
What is the most common type of communication and why?
Serial because it is simpler and needs fewer wires.
What is an exception to this trend?
The venerable parallel port on PCs
What is the result if more than 2 nodes are connected?
A network or bus and most modern interfaces are of this kind.
What has taken the place of serial ports (2 items only) ?
bus (USB), up to 127 nodes.
What is full duplex?
Can send data in both directions at the same time
What is half duplex?
Can send in both directions but not at the same time
What is synchronous communication?
A clock signal is sent along with the data
What is asynchronous communication?
The receiver must generate its own clock to match that in the transmitter
What does the clock do?
Defines when signals contain valid data
What is protocol?
Need to ensure that data arrives safely, messages don’t collide when 2 nodes try to transmit at the same time, and so on
What is the I2C bus?
The inter-integrated circuit bus is a very widely used, simple, synchronous interface.
What is I2C often used to interface a microcontroller to?
- sensors, real-time clock/calendars, ADCs, DACs, extra I/O ports
- Memory (RAM or Flash)
- interfaces to other systems such as displays, IEEE-488
- other microcontrollers, sometimes other equipment