PCF8574AN configured as output for relay

what i want to make is to have full control on each output port.

example:
i want to switch on some pin. this pin must stay on if the code say so.
in the mean time i want have some other pin switched on or off if it is asking in the code.

hope u understand, little poor english.

edwin