Using SX-48 at 3.3 volts
I am attempting to use the SX-48 at 3.3 volts. I set it up for an external interrupt from Port B:
I'm using a 555 in monostable mode to trigger Port B and wake the SX-48.
At 5 volts, the SX operates very well. It comes out of SLEEP, captures data using SERIN, stores the data, and goes back to SLEEP waiting for the 555.
At 3.3 volts, it operates the same for a bit but occasionally will go to SLEEP and not wake. My impression is that Port B behaves differently at the lower voltage. Anyone else have experience with Port B wake up at 3.3 volts, or odd behavior at 3.3 volts?
Thanks,
Joe
WKED_B = %00000001 'select falling edge on bit 0 of Port B WKPND_B = 0 'clear all Port B flags WKEN_B = %11111110 'enable bit 0 of Port B for wakeup SLEEP
I'm using a 555 in monostable mode to trigger Port B and wake the SX-48.
At 5 volts, the SX operates very well. It comes out of SLEEP, captures data using SERIN, stores the data, and goes back to SLEEP waiting for the 555.
At 3.3 volts, it operates the same for a bit but occasionally will go to SLEEP and not wake. My impression is that Port B behaves differently at the lower voltage. Anyone else have experience with Port B wake up at 3.3 volts, or odd behavior at 3.3 volts?
Thanks,
Joe
Comments
It shouldn't make a difference.
Can you post all the code ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
Briefly, when the SX powers up there is some initialization. The initialization should not execute after power on so an IF statement prevents this. The remaining code triggers a camera, reads an A/D converter, and accepts data from a GPS. There is also support for writing to a file on an SD card.
Joe
I was thinking about this today. It feels like a hardware issue. I have a 555 timer, an A/D board, an opto-isolator, a buffer all on the SX protoboard. So, things like where to tie unused inputs or anything that might be an issue.
Joe
Joe
Watch out for pin directions on the I/O ports. The direction register and the values of the pins can be lost during wakeup from sleep (reset).
When you put the SX to sleep, the I/O pins hold their state. However when you wake it up, there is a reset timer that runs before the chip starts executing code (something lik 60mS). During this time period, the pin states are lost (the pins are reset to inputs). User code has to reset them to their previous state.·When the pins get set to inputs, the output values are lost.
FYI. If you rely on your outputs being in the same state after your code starts up again,·you will need to 'shadow' them to temporary registers before you put the SX to sleep, then restore them when the SX is reset again, before your code tries to read the·Output Pin·States...
I don't know if this is your trouble, but it's worth looking at!
-Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver
All of my tests are at 3.3 volts.
I commented out all of the code except that which controls the timer, Port B set up, and SLEEP. I place a PAUSE ahead of the Port B set up to pause for one second. In this manner, I can watch my LED go off for two seconds (timer), and on for one (PAUSE).
The timer has a reset pin which I had tied to Vcc. This made the timer always active. I changed it so the program controls this pin. Now, this pin is low until the timer is required. In the program, reset goes high, and then the program triggers the timer.
The program operated for about 8 minutes this way until it stopped triggering. It seemed that as I experimented more, the amount of time the program operated correctly decreased until it would run only a couple of minutes. When I watched the trigger line (the trigger requires a high-low-high transition) with the scope, it appeared at one point that it went low but not high as programmed. Is this a clue?
I think for the purpose of my program, I don't have to shadow any port values. At reset, all of the ports are set up again to their original states in PortConfig.sxb (loaded at Start). I do see the trigger line pulse when the SX wakes from SLEEP. Since the reset pin is low, I think the timer ignores this pulse.
Since it appears that the desired transition stops after a period of time, would a pull DOWN resistor assist with this issue?
Thanks again!
Joe
The set up is using the 555 timer and only enough of the program above in main.sxb to set up Port B and SLEEP. This isolates the issue.
In this set up at 5 volts, the SX-48 operates for 90 minutes and I expect it to finish my test (180 minutes). At 3.3 volts, the SX operates for barely 2 minutes.
Experiments
1. 100k pull up on the trigger pin to the 555. Result: After operating correctly for a bit, SX-48 does not wake
2. Added a bit of time after setting the trigger pin high. Result: After operating correctly for a bit, SX-48 does not wake.
Since the trigger pin (RC.7 in the program) does not behave correctly, the 555 does not get triggered so I have not tried to add a resistor on the 555 output (this connects to Port B to wake the SX-48).
The 555 is a Philips ICM7555 (http://www.semiconductors.com/acrobat/datasheets/ICM7555_ICM7555I_ICM7555C_1.pdf).
It feels like I've missed something obvious but am not sure what. Any ideas?
Joe