ST10F269-T3 Datasheet

  • ST10F269-T3

  • 16-BIT MCU WITH MAC UNIT, 256K BYTE FLASH MEMORY AND 12K BYT...

  • 1513.42KB

  • 160页

  • STMICROELECTRONICS   STMICROELECTRONICS

扫码查看芯片数据手册

上传产品规格书

PDF预览

ST10F269-T3
12.2.4 - Alternate Port Functions
Each port line has one associated programmable
alternate input or output function.
鈥?PORT0 and PORT1 may be used as address
and data lines when accessing external memory.
鈥?Port 2, Port 7 and Port 8 are associated with the
capture inputs or compare outputs of the CAP-
COM units and/or with the outputs of the PWM
module.
Port 2 is also used for fast external interrupt in-
puts and for timer 7 input.
鈥?Port 3 includes the alternate functions of timers,
serial interfaces, the optional bus control signal
BHE and the system clock output (CLKOUT).
鈥?Port 4 outputs the additional segment address
bit A16 to A23 in systems where segmentation
is enabled to access more than 64K Bytes of
memory.
鈥?Port 5 is used as analog input channels of the
A/D converter or as timer control signals.
鈥?Port 6 provides optional bus arbitration signals
(BREQ, HLDA, HOLD) and chip select signals.
If an alternate output function of a pin is to be
used, the direction of this pin must be
programmed for output (DPx.y=鈥?鈥?, except for
some signals that are used directly after reset and
are configured automatically. Otherwise the pin
remains in the high-impedance state and is not
effected by the alternate output function. The
respective port latch should hold a 鈥?鈥? because its
output is ANDed with the alternate output data
(except for PWM output signals).
If an alternate input function of a pin is used, the
direction of the pin must be programmed for input
(DPx.y=鈥?鈥? if an external device is driving the pin.
The input direction is the default after reset. If no
external device is connected to the pin, however,
one can also set the direction for this pin to output.
SINGLE_BIT: BSET
BSET
BIT_GROUP:
BFLDH
BFLDH
P4.7
DP4.7
P4, #24H, #24H
DP4, #24H, #24H
In this case, the pin reflects the state of the port
output latch. Thus, the alternate input function
reads the value stored in the port output latch.
This can be used for testing purposes to allow a
software trigger of an alternate input function by
writing to the port output latch.
On most of the port lines, the application software
must set the proper direction when using an
alternate input or output function of a pin. This is
done by setting or clearing the direction control bit
DPx.y of the pin before enabling the alternate
function. There are port lines, however, where the
direction of the port line is switched automatically.
For instance, in the multiplexed external bus
modes of PORT0, the direction must be switched
several times for an instruction fetch in order to
output the addresses and to input the data.
Obviously, this cannot be done through
instructions. In these cases, the direction of the
port line is switched automatically by hardware if
the alternate function of such a pin is enabled.
To determine the appropriate level of the port
output latches check how the alternate data
output is combined with the respective port latch
output.
There is one basic structure for all port lines
supporting only one alternate input function. Port
lines with only one alternate output function,
however, have different structures. It has to be
adapted to support the normal and the alternate
function features.
All port lines that are not used for these alternate
functions may be used as general purpose I/O
lines. When using port pins for general purpose
output, the initial output value should be written to
the port latch prior to enabling the output drivers,
in order to avoid undesired transitions on the
output pins. This applies to single pins as well as
to pin groups (see examples below).
; Initial output level is "high"
; Switch on the output driver
; Initial output level is "high"
; Switch on the output drivers
Note: When using several BSET pairs to control more pins of one port, these pairs must be separated by
instructions, which do not apply to the respective port (See Chapter 6 - Central Processing Unit
(CPU)).
60/160

ST10F269-T3相关型号PDF文件下载

您可能感兴趣的PDF文件资料

热门IC型号推荐

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!