45300 Parallax Inc, 45300 Datasheet - Page 88
45300
Manufacturer Part Number
45300
Description
BOARD PROTO SX48
Manufacturer
Parallax Inc
Type
MCUr
Specifications of 45300
Contents
Board
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SX48
For Use With
130-28029 - KIT PARTS SMART SENSORS45111 - MANUAL FOR SX-KEY/BLITZ VER. 2.028850 - CARRIER BOARD BOARD OF EDU USB
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
453001
Manufacturer:
LITTELFUSE/力特
Quantity:
20 000
Company:
Part Number:
453002
Manufacturer:
LITTELFU
Quantity:
1 000
- Current page: 88 of 184
- Download datasheet (2Mb)
10 SX Special Features and Coding Tips
10.2.1 Port Direction
Each of the I/O pins in each of the ports can be configured to an input or output direction by writing to
the appropriate tristate register (TRIS_A, TRIS_B, TRIS_C, TRIS_D and TRIS_E). The default I/O pin
direction is input. I/O pin direction configuration is usually done once, near the start of code, however,
the pin directions can be changed multiple times at any place in the code.
To configure the direction of the I/O pins to inputs or outputs:
The following code snippet demonstrates this:
If the logic-level of output pins are expected to begin at a certain state (0 or 1), care should be taken to
set the output latch appropriately before setting the pin’s direction to output. Failing to do so may result
in a momentary glitch on the pin during initialization. For example, if all output pins were expected to
begin in a low state (0), insert the following lines above the previous code snippet:
Page 88 SX-Key/Blitz Development System Manual 2.0 Parallax, Inc.
1) Set the MODE register to $0F (the default value at startup).
2) Use the port configuration instruction to set the individual directions of each I/O pin within each
port. A high bit (1) sets the corresponding pin to input mode and a low bit (0) sets the pin to out-
put mode.
; Direction Configuration
;
MODE $0F
MOV
MOV
MOV
* Port C not available on SX20 devices, Port D and E only available on SX48/52 devices.
NOTE: More options exist for the SX48/52 parts. See chapter 15.4.2 for details.
$07 - $00
MODE
$0D
$0C
$0A
$0F
$0E
$0B
$09
$08
!ra,#%0000
!rb,#%11110000 ; Port B bits 4-7 to input, bits 0-3 output
!rc,#%00001111 ; Port C bits 4-7 to output, bits 0-3 input
TRIS_A
Port A
LVL_A
PLP_A
; Set Mode to allow Direction configuration
; Port A bits 0-3 to output
Table 20 - MODE Register Settings
Swap W with WKPEN_B
Swap W with COMP_B
WKEN_B
WKED_B
Port B
TRIS_B
LVL_B
PLP_B
ST_B
Port C*
TRIS_C
PLP_C
LVL_C
ST_C
Port D*
TRIS_D
LVL_D
PLP_D
ST_D
Port E*
TRIS_E
LVL_E
PLP_E
ST_E
Related parts for 45300
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: