28123 Parallax Inc, 28123 Datasheet - Page 186

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
The display is turned so that the three on the display is upside-down because it more
clearly shows how the values in
%11010110
ones to set P9, P10, P12, P14 and P15 high. The line just before the command is a
comment that shows the segment labels line up with the binary value that turns that
segment on/off. The next example program shows how to set
make the 7-segment LED display count from zero to nine.
Your Turn – Displaying A through F
Figure out what bit patterns (combinations of zeros and ones) you will need to
display the letters A, b, C, d, E, and F.
Modify SevenSegment0to9 so that it displays A, b, C, d, E, F.
Inside the
OUT15 = 1
OUT15 = 1
DIR15 = 0
uses binary zeros to set I/O pins P8, P11, and P13 low, and it uses binary
OUTH = %11010110
HIGH
. You can then use
followed by
followed by
and
BAFG.CDE
LOW
DIR15 = 1
DIR15 = 1
OUTH
commands: The command
IN15
line up with the I/O pins. The command
. If you want to change P15 back to an input, use
to detect (instead of send) high/low signals.
. Likewise, the command
Figure 6-13
Using OUTH to
Control the
High/Low Signals
of P8 – P15.
HIGH 15
OUTH
LOW 15
to binary numbers to
is really the same as
is the same as
OUTH =

Related parts for 28123