Professional Documents
Culture Documents
Introducció
Introducció
interfacing
Una mala traducció : "Interfícies de Computadors"
A microprocessor is a
CPU in a single chip.
A microcontroller is a small
computer on a single chip,
containing a processor core,
memory, and programmable
input/output peripherals.
Microprocessor & Microcontroller
Computers are everywhere:
-Some are developed to be as powerful as possible, without concern for price or other
restrictions.
-Others are designed into a product, in order to provide its control. This computer is
hidden from view. This sort of product is called an embedded system.
Around Computer Interfacing
Embedded systems
Humans
Ubiquitous computing
Sensors
Ambient intelligent needs interaction with
Actuators
Internet of things
Other digital systems
Wearable computer
Temari de l’assignatura
• Introducció
• Arquitectura del micro
• Ports d'E/S
• Interrupcions
• Timers i CCP (entrades/sortides impulsionals)
• Conversors A/D (interfícies analògiques)
• Interfícies de comunicació sèrie
• Busos i DMA
Bibliografia
- Recursos on-line
https://www.microchip.com/applicationnotes
https://learn.mikroe.com/ebooks/piccprogramming/
https://learn.mikroe.com/ebooks/microcontroladorespicc/ (en castellà)
Avaluació
• Introducció
• Arquitectura del micro
• Ports d'E/S
• Interrupcions
1r parcial
• Timers
• E/S impulsionals (CCP)
2n parcial
• Interfícies analògiques
• Interfícies de comunicació sèrie
3r parcial
• Busos i DMA*
Tingueu en compte que a totes les sessions s’avaluarà amb un 0 tota pràctica en
la que:
• No s’hagi entregat el treball previ mínim dins del termini establert.
• L’estudiant no sàpiga respondre correctament alguna pregunta que el professor faci
sobre el seu propi treball entregat.
• Hi hagi una demostració manifesta de que l’estudiant no sap adaptar el seu propi treball
previ a la resolució de la pràctica demanada pel professor ‘in situ’ al laboratori.
Cal entregar una còpia del treball previ de cada pràctica via electrònica abans d’assistir a
la sessió de laboratori corresponent. No s’acceptarà cap entrega fora de data.
hjgsdfjhdsfdjd.sd
dsndsfdsfjd dfjndsd
dfjbvd vnd dnf bbfe
df dfdn fnd fje ekween
fkwe fkd d dkjbnd
sdkfjhdsjkf dsf
dfd fdf dfd djfdjfdfd
Human-machine interface:
Input devices: keyboard, mouse, microphone, camera
Output devices: CRT, printer, light panel, audio amp.
Digital - Analogue Interface:
Input devices: A/D converters, modems, sensors
Output devices: D/A converters, modems, transducers,
actuators, stepper motors
Control devices: switches, multiplexers, amplifiers, attenuators
Digital - Digital Interface:
Connectors: wires, ribbon cable, coax, twisted pair, PCB
I/O devices: buffers, level-shifters, synchronizers
Why is computer interfacing so important?
1. The human-machine interface determines the ultimate
success or failure of many computer based systems
(Apple iPhone)
MicroComputer has 3
basic parts connected
by an internal bus
CPU
Memory
Registers
I/O registers
data, control, status
I/O port is a collection
of I/O pins on the chip
that represents a unit of
data
Single chip computer
Harvard & Von Newman Architecture
RISC vs. CISC
RISC CISC
Simple instruction set Complex instruction set
Wired instructions, take only one or a few Complex microcoded instructions, take
clock cycles to execute. many clock cycles to execute.
Separated data and program memory Combined data and program memory
Most operations are register to register Most operations can be register to memory
Take shorter time to design and debug Take longer time to design and debug
Provide large number of CPU registers Provide smaller number of CPU registers
4. Ex: IN AL, $10 (copy values of port $10 into register AL)
Advantages / Disadvantages?
I/O Addressing
If the same address bus is used for both memory and I/O, how
should the hardware be designed to differentiate between
memory and I/O reads and writes?
I/O
CPU Memory
Interface
Data
Address
Control
Memory mapped I/O
Memory mapped I/O
PICs use a
memory mapped
solution
Example of a simple input operation
Input
Port
Data
Transfer CPU
OR
Sensor
MEMORY
Port’s
Register
Example of a simple output operation
Output Port
Data
Transfer
CPU
Instrument
Panel Port’s
Register
Example of a simple input operation
Timer
Program timer’s
interrupt interval
MCU Market