27404 Parallax Inc, 27404 Datasheet - Page 238

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
#IF DEBUG_MODE = 1 OR DATALOG_MODE > 0 #THEN
#ENDIF
A constant named
that can be used for storing data logged during a round. In this example,
$150. The
Memory Map uses hexadecimal values. This makes it convenient to view the Memory
Map and decide how much memory you have available for datalogging. $10 (decimal-
16) is subtracted from
storing records will begin at EEPROM address $10.
#IF DATALOG_MODE > 0 #THEN
#ENDIF
Recall from Chapter 2, Activity #1 that converting from hexadecimal to decimal involves
multiplying the rightmost digit by 16
16
the decimal equivalent. For example, the decimal equivalent of $150, is: (1 × 256) + (5 ×
16) + (0 × 1) = decimal 336.
It's more convenient to declare
the way the EEPROM map displays all its addresses. Figure 5-4 shows the EEPROM
map for the next example program compiled with
EEPROM value not occupied by PBASIC program tokens is $257. Since records will be
stored as word values, each record will take up 2 bytes, and
Therefore,
available EEPROM.
' State constants.
ATL
ATR
GF
' Datalogging constants
MaxBytes
2
.
.
.
=256, and the next by 16
MaxBytes
$
makes a number hexadecimal. A hexadecimal value is used because the
CON
CON
CON
CON
MaxBytes
MaxBytes
could be declared as $256 - $10. This would use up all the
0
1
2
$150 - $10
3
is declared to make it convenient to set the number of bytes
= 4096, and so on. Add up all the products, and you'll have
MaxBytes
because the
0
= 1, the next digit by 16
in terms of hexadecimal values because that's
DATA
' Avoid_Tawara_Left
' Avoid_Tawara_Right
' Go-Forward
directives that set aside EEPROM for
' Maximum number of bytes stored
DATALOG_MODE = 2
MaxBytes
1
= 16, then next digit by
should be even.
. The highest
MaxBytes
is

Related parts for 27404