I have an ATTINY841 that is utilizing a Dataflash SPI flash chip (AT45DB011D). The SPI pins are connected to the same pins used for programming the ATTINY841. When I program the ATTINY841, I find that the Dataflash chip is being erased, and I have to reprogram it also. This happens even though the Write Protect pin on the Dataflash is asserted (connected to Ground). To prevent this I currently need to remove the Dataflash from the circuit when programming the ATTINY841 and replacing it when finished, however I won't be able to do that when the circuit is transferred to PCB. Has anyone experienced this or know how to deal with it? Do I have a bad chip?