View previous topic :: View next topic |
Author |
Message |
TSEYFARTH
Joined: 01 Jul 2006 Posts: 1054
|
Posted: Fri Jun 20, 2014 5:27 am Post subject: RFM12B Code for Sleep? |
|
|
Hello all,
Can anyone provide some code to put an RFM12B to sleep? I have been using this code, but I am still getting way too high of current consumption (.71mA) when an ATMEGA168 is also put to sleep. This is the code I have been using:
Code: |
'Clear FIFO
Spi_tx_wrd = &HCA81
Rfm12_spi_wrt
Spi_tx_wrd = &HCA83
Rfm12_spi_wrt
Spi_tx_wrd = &H8200 ' &H8201 'RFM12B SLEEP MODE
Rfm12_spi_wrt
|
I removed the radio module to confirm that uC was at least going to sleep. Its current during sleep was still a little high but not horrible at 47uA. Notwithstanding this, the radio is still pulling a consistent 703 uA above the micro controller.
Any feed back/help would be greatly appreciated!
Thank you,
Tim
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Fri Jun 20, 2014 8:30 am Post subject: |
|
|
Did the &H8201 also not work?
If not, try not disconnect the complete module but only the datalines.
This to see if the current is going in the module trough the power or data pins. _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
TSEYFARTH
Joined: 01 Jul 2006 Posts: 1054
|
Posted: Fri Jun 20, 2014 4:40 pm Post subject: |
|
|
Hello Evert and thank you for your reply.
I will try the command &H8201 again, I did not do this yesterday so I cannot recall if it worked or not.
If it fails to work, do you think it is the uC sourcing power through its output pins or the RFM12B module sourcing power to the uC?
Tim |
|
Back to top |
|
|
TSEYFARTH
Joined: 01 Jul 2006 Posts: 1054
|
Posted: Fri Jun 20, 2014 7:36 pm Post subject: |
|
|
Hello Evert,
Thank you again for your comments. I tried &H8201 and that dropped the current dramatically, total current now .1mA. Still too high but moving in the right direction.
Tim |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
|