sx20ac Parallax, Inc., sx20ac Datasheet - Page 10

no-image

sx20ac

Manufacturer Part Number
sx20ac
Description
Configurable Communications Controllers With Ee/flash Program Memory, In-system Programming Capability And On-chip Debug
Manufacturer
Parallax, Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
sx20ac/SS
Manufacturer:
EUDYNA
Quantity:
12
Part Number:
sx20ac/SS
Manufacturer:
UBICOM
Quantity:
20 000
Part Number:
sx20ac/SS-G
Manufacturer:
IR
Quantity:
31 400
Parallax SX20AC/SX28AC
For example, suppose all four Port A pins are configured
as outputs and you wish to set RA0 and RA1 high, and
RA2 and RA3 low:
mov W,#$03
mov $05,W
The second “mov” instruction in this example writes the
Port A data register (RA), which controls the output levels
of the four Port A pins, RA0 through RA3. Because Port
A has only four I/O pins, only the four least significant
bits of this register are used. The four high-order register
bits are “don’t care” bits. Port B and Port C are both eight
bits wide, so the full widths of the RB and RC registers
are used.
© Parallax Inc.
;load W with the value 03h
;(bits 0 and 1 high)
;write 03h to Port A data
;register
Page 10 of 51
When a write is performed to a bit position for a port that
has been configured as an input, a write to the port data
register is still performed, but it has no immediate effect
on the pin. If later that pin is configured to operate as an
output, it will reflect the value that has been written to the
data register.
When a read is performed from a bit position for a port,
the operation is actually reading the voltage level on the
pin itself, not necessarily the bit value stored in the port
data register. This is true whether the pin is configured to
operate as an input or an output. Therefore, with the pin
configured to operate as an input, the data register
contents have no effect on the value that you read. With
the pin configured to operate as an output, what is read
generally matches what has been written to the register.
Figure 3-2
Port B, Port C
Configuration
Rev 1.6 11/20/2006
www.parallax.com

Related parts for sx20ac