27220 Parallax Inc, 27220 Datasheet - Page 206
27220
Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet
1.27220.pdf
(230 pages)
Specifications of 27220
Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
- Current page: 206 of 230
- Download datasheet (3Mb)
Once a value has been adjusted, the conversion back to BCD is equally simple:
Of the four pushbuttons connected, three are used to advance the minutes, hours,
and day (the seconds are reset when any other element is changed). To roll an
element back, the fourth button is held down. Note how the modulus operator is
used and keeps each element update to a single line of code.
Taking It Further
In applications where time-based math is concerned, a simple solution – if minutes
resolution is adequate – is to convert the time to a single value in minutes:
This will result in a value of 0 (midnight) to 1439 (23:59 or 11:59 PM). With this
single value mathematic operations are simplified.
minutes is simple too:
This will result in 24-hour time format. For 12 hour format, calculate hours like this:
To determine the state of AM/PM, simply look at the
between 0 and 719, PM times are between 720 and 1439.
Challenge
Reconnect the MC11489 multiplexer and display the running time on the 7-segment
LEDs.
rawTime = (hours * 60) + minutes
hours = rawTime / 60
hours = rawTime // 60
hours = 12 – (24 – (rawTime / 60) // 12)
decVal = (bcdVal.NIB1 * 10) + bcdVal.NIB0
bcdVal = (decVal / 10 << 4) + bcdVal // 10
rawTime
Getting back to hours and
value; AM times are
Related parts for 27220
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: