If I write a zero to the output register, and enable the pullup on the same pin, can I switch between driven low output and input with pullup simply by settting/clearing the DIR bit? Will the pullup still be in circuit when the output is enabled? I have studied the datasheet and the associated schematic, but this is still not clear to me.