English
Language : 

AN975 Datasheet, PDF (6/11 Pages) STMicroelectronics – As part of a process of continuous improvement
UPGRADING FROM ST625X/6XB TO ST625X/6XC
set bit, datacopy
ld A, datacopy
ld DRA, A
1.2.2.2 Safe I/O State Switching Sequence
Switching the I/O ports from one state to another should be done in a sequence which ensures
that no unwanted side-effects can occur. The recommended safe transitions are illustrated in
Figure 4. All other transitions are potentially risky and should be avoided when changing the
I/O operating mode.
Figure 4. Diagram showing Safe I/O State Transitions
Interrupt
pull-up
010*
Input
011
Analog
Input
pull-up (Reset 000
state)
001
Input
Output
Open Drain
100
101
Output
Open Drain
Output
Push-pull
110
1.2.2.3 Handling Unused Port Bits
Output
111
Push-pull
On ports that have less than 8 external pins connected:
– Leave the bits related to the unbonded pins in reset state and do not change their configu-
ration.
– Do not use instructions that act on a whole port register (INC, DEC, or read operations). Un-
available bits must be masked by software (AND instruction). Thus, when a read operation
performed on an incomplete port is followed by a comparison, use a mask.
1.2.3 8-bit Timer
On C revision devices, in order to use the 8-bit timer in gated mode, the PC1/TIM1 pin has to
be configured in input mode either with or without pull-up through the Port C DDR, OR and DR
registers.
On B revision devices, it was possible to define PC1/TIM1 pin as output in this mode. But on
C revision devices, if this pin is configured as output, the Schmitt trigger input is disabled and
the timer will therefore not work properly.
6/11