Disabling and Enabling Serial by tempering with registers/pins after waking-up or before sleeping? #509
dattasaurabh82
started this conversation in
Library discussion
Replies: 1 comment
-
I think you can also just set the pin INPUT. And wait, so it doesn't burn power if the tiny's TX pin is connected to FTDI's RX? o_o And wait, 11mA or 110uA? 110uA is what I would expect if the RX line were tied to an unpowered device, because the pullup is enabled,, but the pin is connected to something that is approximately grounded (within the low current regime, it might as well be tied to ground).11mA is a whole different ball game.... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I have a situation. Like always 😅
Setup:
uC: ATTINY1607-MFR clocked at 5MHz (necessary Freq for my main application later)
Operating Voltage: 3.7V from 120mAH LiPo Battery.
BOD disabled in Fuse (From IDE's tools Menu)
millis()
,micros()
, enabled and are in useSome UART functionalities are required.
So some pins are always connected to an FTDI board as such:
Problem:
I need to use serial data, when the device is Awake. After that the uC sys goes to sleep.
Preferably the FTDI serial chip should be in one PCB with the uC. If we remove it from the uC's UART bus physically detaching it from RX, TX and GND pins, then the current consumption is 0.6uA by the system. with it it is 11mA during sleep.
Current Code struct (minimal here for problem explanation):
Sleep mode current: ~116uA which is lower than ~11mA earlier before I used this mechanism.
It is still some 200 time more consumption compared to the current consumption when the FTDI chip is physically removed from the uC's UART bus (As then the current consumption is: 0.5uA).
Tried to set TX pin to input pull-up before going to sleep:
Basically can we do something with the TX Pin and some other register (if I'm missing something..)
Also tried
1607's TX pin when constantly connected to FTDI's RX PIN, has not affect.
1607's RX pin when separated from FTDI's TX PIN reduces current consumption drastically.
How can we Reduce it further without removing the FTDi chip from the uC and it's UART bus?
https://onlinedocs.microchip.com/pr/GUID-C35EC6FB-C2A0-42FF-80EF-BF1E9A5B3EE8-en-US-2/index.html?GUID-EC8461C8-689A-4FF2-A949-48CCCD0E192A
Update:
I managed to reduce the power by putting the RX pin (which is usually pulled high) to OUTPUT and setting LOW.
Don't know if that's the correct way to do it though...
Beta Was this translation helpful? Give feedback.
All reactions