Download SP.710, Spring 2001: "Intro to Microcontrollers" Handout 1:

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
SP.710, Spring 2001: "Intro to Microcontrollers"
Handout 1:
1.
2.
3.
4.
5.
6.
A schematic of the PIC circuit you will wire up today (due by class Wednesday).
The pinout of the PIC16F876.
A description of the function of each of the PIC’s pins.
The pinout of a standard 78L05 5-volt regulator.
How to read resistors.
How to read capacitors.
References:
web page for this seminar at:
http://web.mit.edu/rec/seminars/spring01/sp710.html
full PIC datasheet available at:
http://web.mit.edu/rec/datasheets/PIC16F876.pdf
full 78L05 datasheet available at:
http://web.mit.edu/rec/datasheets/LM78L05.pdf
([email protected], 2/12/2001)
7805
+9V
IN
OUT
+
GND
10k
10k
PIC16F876
Vdd
10uF
typ.
MCLR
RC4
220
XTAL
RC5
OSC1
220
OSC2
Vss
GND
PIC16F87X
Pin Diagrams
PLCC
PIC16F877
PIC16F874
39
38
37
36
35
34
33
32
31
30
9
RB3/PGM
RB2
RB1
RB0/INT
VDD
VSS
RD7/PSP7
RD6/PSP6
RD5/PSP5
RD4/PSP4
RC7/RX/DT
44
43
42
41
40
39
38
37
36
35
34
QFP
7
8
9
10
11
12
13
14
15
16
17
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1
RD2/PSP2
RD3/PSP3
RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
NC
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
RD3/PSP3
RD2/PSP2
RD1/PSP1
RD0/PSP0
RC3/SCK/SCL
RC2/CCP1
RC1/T1OSI/CCP2
NC
RA4/T0CKI
RA5/AN4/SS
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CK1
NC
RA3/AN3/VREF+
RA2/AN2/VREFRA1/AN1
RA0/AN0
MCLR/VPP/THV
NC
RB7/PGD
RB6/PGC
RB5
RB4
NC
RB7/PGD
RB6/PGC
RB5
RB4
RB3/PGM
RB2
RB1
RB0/INT
VDD
VSS
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
6
5
4
3
2
1
44
43
42
41
40
28
27
26
25
24
23
22
21
20
19
18
17
16
15
18
19
20
21
22
23
24
25
26
27
282
1
2
3
4
5
6
7
8
9
10
11
12
13
14
MCLR/VPP/THV
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4/SS
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
PIC16F876/873
DIP, SOIC
PIC16F877
PIC16F874
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
6
7
8
9
10
11
NC
RC0/T1OSO/T1CKI
OSC2/CLKOUT
OSC1/CLKIN
VSS
VDD
RE2/AN7/CS
RE1/AN6/WR
RE0/AN5/RD
RA5/AN4/SS
RA4/T0CKI
NC
NC
RB4
RB5
RB6/PGC
RB7/PGD
MCLR/VPP/THV
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RC7/RX/DT
RD4/PSP4
RD5/PSP5
RD6/PSP6
RD7/PSP7
VSS
VDD
RB0/INT
RB1
RB2
RB3/PGM
DS30292B-page 2
 1999 Microchip Technology Inc.
PIC16F87X
TABLE 1-1:
PIC16F873 AND PIC16F876 PINOUT DESCRIPTION
DIP
Pin#
SOIC
Pin#
I/O/P
Type
OSC1/CLKIN
9
9
I
OSC2/CLKOUT
10
10
O
—
Oscillator crystal output. Connects to crystal or resonator in crystal
oscillator mode. In RC mode, the OSC2 pin outputs CLKOUT
which has 1/4 the frequency of OSC1, and denotes the instruction
cycle rate.
MCLR/VPP/THV
1
1
I/P
ST
Master clear (reset) input or programming voltage input or high
voltage test mode control. This pin is an active low reset to the
device.
RA0/AN0
2
2
I/O
TTL
RA1/AN1
3
3
I/O
TTL
RA1 can also be analog input1
RA2/AN2/VREF-
4
4
I/O
TTL
RA2 can also be analog input2 or negative analog reference
voltage
RA3/AN3/VREF+
5
5
I/O
TTL
RA3 can also be analog input3 or positive analog reference
voltage
RA4/T0CKI
6
6
I/O
ST
RA4 can also be the clock input to the Timer0 module. Output
is open drain type.
RA5/SS/AN4
7
7
I/O
TTL
RA5 can also be analog input4 or the slave select for the
synchronous serial port.
Pin Name
Buffer
Type
Description
ST/CMOS(3) Oscillator crystal input/external clock source input.
PORTA is a bi-directional I/O port.
RA0 can also be analog input0
PORTB is a bi-directional I/O port. PORTB can be software
programmed for internal weak pull-up on all inputs.
RB0/INT
21
21
I/O
TTL/ST(1)
RB1
22
22
I/O
TTL
RB2
23
23
I/O
TTL
RB3/PGM
24
24
I/O
TTL
RB3 can also be the low voltage programming input
RB4
25
25
I/O
TTL
Interrupt on change pin.
RB5
26
26
I/O
TTL
Interrupt on change pin.
RB6/PGC
27
27
I/O
TTL/ST(2)
Interrupt on change pin or In-Circuit Debugger pin. Serial
programming clock.
RB7/PGD
28
28
I/O
TTL/ST(2)
Interrupt on change pin or In-Circuit Debugger pin. Serial
programming data.
RC0/T1OSO/T1CKI
11
11
I/O
ST
RC0 can also be the Timer1 oscillator output or Timer1 clock
input.
RC1/T1OSI/CCP2
12
12
I/O
ST
RC1 can also be the Timer1 oscillator input or Capture2 input/
Compare2 output/PWM2 output.
RC2/CCP1
13
13
I/O
ST
RC2 can also be the Capture1 input/Compare1 output/PWM1
output.
RC3/SCK/SCL
14
14
I/O
ST
RC3 can also be the synchronous serial clock input/output for
both SPI and I2C modes.
RC4/SDI/SDA
15
15
I/O
ST
RC4 can also be the SPI Data In (SPI mode) or
data I/O (I2C mode).
RC5/SDO
16
16
I/O
ST
RC5 can also be the SPI Data Out (SPI mode).
RC6/TX/CK
17
17
I/O
ST
RC6 can also be the USART Asynchronous Transmit or
Synchronous Clock.
RC7/RX/DT
18
18
I/O
ST
RC7 can also be the USART Asynchronous Receive or
Synchronous Data.
VSS
8, 19
8, 19
P
—
Ground reference for logic and I/O pins.
VDD
20
20
P
—
Positive supply for logic and I/O pins.
RB0 can also be the external interrupt pin.
PORTC is a bi-directional I/O port.
Legend:
I = input
O = output
I/O = input/output
P = power
— = Not used
TTL = TTL input
ST = Schmitt Trigger input
Note 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in serial programming mode.
3: This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
 1999 Microchip Technology Inc.
DS30292B-page 7
LM78LXX Series
3-Terminal Positive Regulators
General Description
The LM78LXX series of three terminal positive regulators is
available with several fixed output voltages making them
useful in a wide range of applications. When used as a zener
diode/resistor combination replacement, the LM78LXX usually results in an effective output impedance improvement of
two orders of magnitude, and lower quiescent current. These
regulators can provide local on card regulation, eliminating
the distribution problems associated with single point regulation. The voltages available allow the LM78LXX to be used
in logic systems, instrumentation, HiFi, and other solid state
electronic equipment.
The LM78LXX is available in the plastic TO-92 (Z) package,
the plastic SO-8 (M) package and a chip sized package
(8-Bump micro SMD) using National’s micro SMD package
technology. With adequate heat sinking the regulator can
deliver 100 mA output current. Current limiting is included to
limit the peak output current to a safe value. Safe area
protection for the output transistors is provided to limit inter-
nal power dissipation. If internal power dissipation becomes
too high for the heat sinking provided, the thermal shutdown
circuit takes over preventing the IC from overheating.
Features
n LM78L05 in micro SMD package
n Output voltage tolerances of ± 5% over the temperature
range
n Output current of 100 mA
n Internal thermal overload protection
n Output transistor safe area protection
n Internal short circuit current limit
n Available in plastic TO-92 and plastic SO-8 low profile
packages
n No external components
n Output voltages of 5.0V, 6.2V, 8.2V, 9.0V, 12V, 15V
n See AN-1112 for micro SMD considerations
Connection Diagrams
SO-8 Plastic (M)
(Narrow Body)
(TO-92)
Plastic Package (Z)
DS007744-3
DS007744-2
Bottom View
Top View
8-Bump micro SMD
micro SMD Marking Orientation
DS007744-24
Top View
(Bump Side Down)
DS007744-33
Top View
© 2000 National Semiconductor Corporation
DS007744
www.national.com
LM78LXX Series 3-Terminal Positive Regulators
November 2000
Resistor Color Codes
Most common resistors have four colored bands. The band at one end of the resistor will be a metallic
color (gold, silver, or bronze). This indicates the accuracy of the resistor (+/- 5%, 10%, or 20%,
respectively).
If you call this the "4th band", the other three bands tell you the resistance in ohms according to the
following table:
Color:
Band:
1st 2nd 3rd
Black
0
0
* 100
Brown
1
1
* 101
Red
2
2
* 102
Orange 3
3
* 103
Yellow 4
4
* 104
Green
5
5
* 105
Blue
6
6
* 106
Purple
7
7
* 107
Grey
8
8
* 108
White
9
9
* 109
To illustrate, the common yellow-purple-orange-gold resistor is 47 * 103 ohms = 47000 ohms (+/- 5%).
([email protected], 2/12/2001)
Capacitor Codes
Capacitors are labeled in a wide variety of different ways, but this handout lists the most common
markings on capacitors and what they mean.
Electrolytic and Tantalum capacitors often have the capacitance (in uF) and voltage (maximum
allowed voltage) printed on them in human-readable form. The capacitance will usually be followed by
the letters "uF" to indicate measurement in microfarads, but the voltage may or may not be followed by
a V. These capacitors are also often polarized, and typically have a + or a - printed on the case next to
one lead (the - may be rotated 90 degrees from the horizontal). Non-polar electrolytics do exist, and
often have the letters "NP" printed on them.
Ceramic, Polyester, Metallized Film, and other low-capacitance capacitors are often marked using a
different system. Commonly the capacitor will have one or two numbers printed on it. Here are
explanations of the most common cases:
Only one number, which is one or two digits long:
The capacitance is this number of picoFarads (pF).
Only one number, three digits long:
If we call the digits ABC (with C<6), the capacitance is given by the formula (AB * 10C) pF. For
example, a capacitor that reads 224 is 22 * 104 pF = 220,000 pF = 220 nF = 0.22 uF.
Only one number, three digits long, followed by a letter:
Same capacitance as in the previous case, but the letter indicates a tolerance:
D = +/- 0.5 pF
F = +/- 1%
G = +/- 2%
H = +/- 3%
J = +/- 5%
K = +/- 10%
M = +/- 20%
P = +100% / -0%
Z = +80% / -20%
Two numbers, one of them followed by a letter:
The number followed by a letter indicates the capacitance and tolerance of the cap, as in the
previous case. The other number is the rated voltage (in volts). For example, a capacitor that reads:
104J
630
Is a 100,000 pF (= 0.1 uF) +/-5% capacitor rated to 630 Volts.
([email protected], 2/12/2001)
Related documents