Professional Documents
Culture Documents
c) 1101100 = 108
108 x 5 mV = 0.540 V
1101100 = 108
108 x 1.3 mV = 0.135 V
HW7
10011001 = 153
153 x 1.25 mV = 0.19125
and INT2.
Ans: False
2. If the PICs A/D converter is used with Vref set to 2.0 volts,
what would be the step size?
Ans: 2/1024 = 0.001.953v or ~2mV.
3. If the PICs A/D converter with Vref set to 2.0 volts is used
to interface with a distance sensor that indicates a 200 mm
displacement for 2 volts and 0 volts for 0 mm displacement,
what what would be the step size in mm?
Ans: 200mm/1024 v = 0.1953mm
Open-Collector
Open-Collector devices are commonly used to connect
multiple devices to a bus (i.e., one carrying interrupt or writeenable signals). This enables one device to drive the bus
without interference from the other inactive devices if openCollector devices are not used, then the outputs of the
inactive devices would attempt to hold the bus voltage high,
resulting in unpredictable output.
High Priority
Same actions as low priority
Plus, saves STATUS, WREG, and BSR into the PIC (not the
stack only one level).
RETFI - FAST:
Restores PC, and STATUS, WREG, BSR (The low priority will
not include these)
Open Drain
An open drain terminal is connected to ground in the low
voltage (logic 0) state, but has high impedance in the logic 1
state. This prohibits current flow, but as a result, such a
device requires an external pull-up resistor which is also
connected to the positive voltage
Switch Types
SPST Single Pole Single Throw
SPDT Single Pole Double Throw
DPDT Double Pole Double Throw
Relays
A relay is an electrically operated switch that are used where
it is necessary to control a circuit by a low-power signal (with
complete electrical isolation between control and controlled
circuits), or where several circuits must be controlled by one
signal.
Mechanical relays consists of an armature, spring, and a set of
electrical contacts. Instead of a person closing a mechanical
switch as in the previous slide, an electromagnet (the
magnetic field is produced by the flow of electric current) is
energized causing the armature to close the contact of two or
more electrical contacts as illustrated in the following side.
Note: An opto-isolator or optical isolator, is a component that
transfers electrical signals between two isolated circuits by
using light.
Practice Assignment
1. Given: A/D Converter, +- 5 Volts, 12 bit, offset binary data
format: For the following offset binary readings (hex) compute