DEVICE settings to lower current
Bean
Posts: 8,129
My SX-Video module uses the·Parallax 50MHz resonator.
I had always used "DEVICE OSCHS3" but as I was trying different parameters I found that if I used OSCXT2 the current dropped from 108mA to 88mA.
That's quite a savings. I tried other parameters, but had startup problems.
I don't remember reading anywhere that the OSC parameter could have such a big effect on the current.
But now YOU know.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"Great people talk about great things, average people talk about average things, small people talk about other people."
·
I had always used "DEVICE OSCHS3" but as I was trying different parameters I found that if I used OSCXT2 the current dropped from 108mA to 88mA.
That's quite a savings. I tried other parameters, but had startup problems.
I don't remember reading anywhere that the OSC parameter could have such a big effect on the current.
But now YOU know.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"Great people talk about great things, average people talk about average things, small people talk about other people."
·
Comments
I have experimented with the OSC??? settings when one of my designs was tested in an EMI lab. This one was also clocked from a 50 MHz resonator with a 10 kOhm resistor in parallel, and I had a DEVICE OSCHS3 directive in the original code.
With this setting, the unit nicely worked as a transmitter for 50, 100, and even 150 MHz (with all of these signals above the limits).
I then switched to OSCHS2, and even to OSCHS1 which significantly reduced the levels of the EMI peaks but it turned out that at OSCHS1, the system did not always properly restart. So I turned back to the OSCHS2 settiing, and used other methods to reduce EMI, like adapted filter capacitors, EMI filters on the output lines, and finally a new four-layer PCB with two internal Vdd and Vss layers which really did the job.
Well, this is not really your primary issue. The OSC parameter controls the gain of the SX-internal driver for external clock devices, like XTALS or resonators. It sounds logical to me that the SX consumes more power when the driver is set to a higher gain. Mr. Newton (I mean the guy whose head was hit by an apple some day, and not James) already had some interesting ideas about energy long time ago .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Guenther,
Is there anything in the manuals that show different clocking options ?
Something like "For a 50MHz ceramic resonator, use xxK resistor in parallal and use OSCHS2"
or "For a 25MHz crystal, use a xxK resistor in parallax, and two xxpF caps to ground and use OSCXT2"
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"Great people talk about great things, average people talk about average things, small people talk about other people."
·
on pages 21 and 22 of the SX 28 datasheet you can find tables with the FOSC2:FOSC0 fuse bit settings for different frequencies, and the recommended resistor/capacitor values. On page 13, you can find which oscillator modes correspond to the fuse bit values.
The SX-Key manual describes these settings on page 49.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G