Setup: atmega328p connected to FTDI (FT232R) with SoftwareSerial (tx,rx). Device sleep 8 sec with watchdog.
To avoid parasite power of FTDI through HIGH Rx pin of atmega I need set it to LOW for a period of sleep and then restore.
My best Idea unfortunately fail:(
debugSerial.end();
digitalWrite(MODEBUGRXPIN,LOW);
.............sleep.......................
debugSerial.begin(9600);
You've mixed up your post. In the title you're writing about a Tx pin, in the body it's the Rx pin. And you didn't present a complete sketch and put no code tags around your code to complete my lesson.
If you really want to do that with the Rx pin, it probably helps to switch it's pinMode to OUTPUT before going to sleep.
Sorry for "mix up topic" Actually, to avoid parasitic power from Atmega to FTDI i need LOW on both (Rx, TX) SoftwareSerial pins
About code... don't think that reasonable and possible show all code...so big and actually don't help with topic question.
PaulS ... diring test I measure voltage on mentioned pins (4.95v). So I decide that this fail. Will try on Uno and will write test sketch and report results soon.
Pilon ..."switch it's pinMode to OUTPUT" results on unpredictable behavior of Softwareserial. Rx pin usually should be HIGH for serial communication... I also try this (it was my first idea:) it fail.
Pilon ..."switch it's pinMode to OUTPUT" results on unpredictable behavior of Softwareserial. Rx pin usually should be HIGH for serial communication... I also try this (it was my first idea:) it fail.
No, it should be an input during operation, and the other party may pull it high. You didn't tell us in your first post why you try to set it to low. Start by describing what exactly you want to achieve.
To avoid parasitic power it's easiest to set both, TX and RX to INPUT while the other party is sleeping.