45181 Parallax Inc, 45181 Datasheet - Page 92
45181
Manufacturer Part Number
45181
Description
SX TECH TOOL KIT NO POWER
Manufacturer
Parallax Inc
Series
SXr
Type
Microcontrollerr
Datasheet
1.45180.pdf
(184 pages)
Specifications of 45181
Contents
SX Book, SX Key, SX Tech Board, Samples, Resonators, Cable and Manual
Product
Microcontroller Basic Stamps
Operating Supply Voltage
5 V
For Use With/related Products
SX MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 92 of 184
- Download datasheet (2Mb)
10 SX Special Features and Coding Tips
To configure the I/O pins to Schmitt-Trigger input:
The following code snippet demonstrates this:
10.2.5 Edge Detection
Every I/O pin in port B can be set to detect logic level transitions (rising edge or falling edge). This can
be configured by writing to the Edge Selection register (WKED_B) and detected by monitoring the
Pending register (WKPEN_B). The I/O pins are set to detect falling edge transitions by default. By
configuring edge detection on input pins, the SX chip can set the pin’s associated bit in the Pending
register when the desired edge arrives. The Pending register bits will never be cleared by the SX alone;
the running program is responsible for doing so. This means, if a desired edge is detected, the flag
indicating this will remain set until the program has time to attend to it. This feature can be used by the
SX program for signals that need attention, but not necessarily immediately.
To configure the I/O pins for edge detection:
Page 92 SX-Key/Blitz Development System Manual 2.0 Parallax, Inc.
1) Set the MODE register to $0C (the value for Schmitt-Trigger register configuration).
2) Use the port configuration instruction to set the individual Schmitt-Trigger state of each I/O pin
3) Set I/O pin directions as necessary.
1) Set the MODE register to $0A (the value for Edge Detect register configuration).
2) Use the port configuration instruction to set the individual edge to detect on each I/O pin. A high
3) Set I/O pin directions as necessary.
within each port. A high bit (1) sets the corresponding pin to normal and a low bit (0) sets it to
Schmitt-Trigger.
bit (1) sets the corresponding pin to falling-edge detection and a low bit (0) sets it to rising-edge
detection.
; Schmitt-Trigger Configuration
;
MODE $0C
MOV
MOV
MODE $0F
MOV
MOV
!rb,#%11110000 ; Port B bits 4-7 to normal, bits 0-3 to S.T.
!rc,#%00001111 ; Port C bits 4-7 to S.T., bits 0-3 normal
!rb,#%10110011 ; Port B bits 2,3,6 to output, all others input
!rc,#%11011110 ; Port C bits 0,5 to output, all others input
; Set Mode to Schmitt Trigger configuration
; Set Mode to allow Direction configuration
Related parts for 45181
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Terminals 3 Pin Single Row Header (long)
Manufacturer:
Parallax Inc
Part Number:
Description:
Headers & Wire Housings 16 Pin Single Row Header
Manufacturer:
Parallax Inc
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:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: