Page 8 - Making PIC Microcontroller Instruments and Controllers
P. 8
viii colllEl{Ts
Blink One LED 50
Blink Eighl LEDS in Sequence 51
Dim and Brighten One LED 52
LCD Display 53
Conlroling the Dgiialand Analog Setungs 56
Wling Binary, Hex, and DecimalValues to the LCD 56
and Displaying the Besulls on ihe LED Barcraph 57
Reading a Potentiometer
A Simple Beep 60
an RC Servo lrom lhe Keyboard 63
Advanced E)(ercise:Conlrollng
Read ng the Inputs 67
Flead Keyboard and Display Key Number on lhe LCD z3
Read One Potentiometer and Display lts 8-Bit Value on LCD in Binary,
Hex, and Decimal Notalion, Also lmpress lhe Binary value on
lhe Bargraph 74
Read Al Th ree Potentiometers and D splay The r Values on the LC D 76
Inlerlaces and
Adding lhe Kind ol Flexibility Thal Del nes CompLrler
Dernonstrales Adjushents 78
the Abl ity to Make sophisilcaied Fleal-Time
Exercises 79
Chapter 6 Timers and Counters e3
General 83
Timers 84
Timerl:The Sscond Tim€r 93
Timer2:The Third T mer 102
Counlers 104
ExercisesforTlmers 112
Exercises ior Counl€fs 112
Chapter 7 Clocks, Memory and Sockets ll3
Mernory Devces 113
Sockets lJ3, U4, and U5: For SerialOne-Wire
Whlch EEPROIIITvoe Should You Use? 115
Sockel U3-l2C SEEPROM 115
Socket U4-SP| SEEPROIVI 1tZ
Socket us-Microwire Devices 118
Socket lJ6 Real-Tlme Clocks 120
The LTC1298 12-Bit Alo-D Caryetlet lAlso Used in Socket U6) 124
Sockeis U7 (and U8) 126
g
Chapter Scrial Communications: Sockets lJg and UIO l3l
jl
When and How Will I Know ll ls Working? lU
Using the RS485 Communicalions 137
Chapter 9 Using Liquid Cryslal Displays: An Extended
Information Resource t39
General 139
tjsing LCDS in Your Pfojects 142
tjndetsiand ng the Hardware and Soltware Inleraction 743
Talking to ihe LCD 144