- SS-HQ1 Application Notes -
Ver.1.0.0 January 7, 2005
81
10.1.7. Port Driver Setting Example
The basic setting method for port drivers is as follows.
If reset after writing to EEPROM
(Example)
Set up the switching control of the 8-bit parameter AESPEED. (CAT14_Byte12_bit0-7).
AESPEED is set to FF[h] when the input port P0 is a "low."
AESPEED is set to 20[h] when the input port P0 is a "High."
(Setting Procedure)
1. Set PDR to OFF (and set PDRHOLD = 1[h]).
2. Set the port driver initial value when the port input is "Low" (make the initial value FF[h]).
3. Set FF[h] in AESPEED (CAT14_Byte12_bit0-7).
4. Set the port P0 setting parameter (CAT20). (See: 10.1.3 Parameter Setting Instructions)
5. Write CAT20 to EEPROM.
6. Reset. -> Port driver initialization
7. Set PDR to ON (and set PDRHOLD = 0[h]).
8. Afterward, the parameter will be switched to AESPEED = FF[h] when the P0 port input is "Low" and
to AESPEED = 20[h] when it is "High".
If port driver initialization is performed through external communication
(Example)
Set up the switching control of the 8-bit parameter AESPEED. (CAT14_Byte12_bit0-7).
AESPEED is set to FF[h] when the input port P0 is a "low."
AESPEED is set to 20[h] when the input port P0 is a "High."
(Setting Procedure)
1. Set PDR to OFF (and set PDRHOLD = 1[h]).
2. Set the port driver initial value when the port input is "Low" (make the initial value FF[h]).
3. Set FF[h] in AESPEED (CAT14_Byte12_bit0-7).
4. Set the port P0 setting parameter (CAT20). (See: 10.1.3 Parameter Setting Instructions)
5. Up to this point, the procedure is the same as for the example "If reset after writing to EEPROM."
6. Perform port driver initialization through external communication.
7. Set PDR to ON (and set PDRHOLD = 0[h]).
8. Afterward, the parameter will be switched to AESPEED = FF[h] when the P0 port input is "Low" and
to AESPEED = 20[h] when it is "High".
In the case of this setting method, these port driver settings become invalid after reset because they are
not written to EEPROM. Thus, if you want to enable these settings as the default settings after reset,
write CAT20 to EEPROM.
If reset without EEPROM
When reset without EEPROM, the port drivers function by default settings stored in the system.
The default settings without EEPROM are the same as cited in "10.1.5Port Driver Initial Settings,
Depending on Presence of EEPROM."