In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Beau Schwabe wrote: Electronegativity, Do you really want the LED's to be that bright? There are some very impressive 2mA LED's that put out lots of light. Anyway, there are some other ways to reduce the amount of current without any external parts, by making use of the internal RC oscillator settings of the SX you can have dramatic results. I did not have a SX20, but I did have a SX28. The datasheet indicates that they should be the same. Here is the DATA I obtained by placing a 10 Ohm resistor in series with the power to the SX and measuring the voltage across the resistor. [code] 50MHz resonator - 0.538V = 53.8mA -------------------------------------- 4Mhz internal RC - 0.068V = 6.8mA 1Mhz internal RC - 0.028V = 2.8mA 128KHz internal RC - 0.015V = 1.5mA 32KHz internal RC - 0.014V = 1.3mA The program was just a simple program to toggle one of the I/O pins at 1/10th the clock frequency. [code] Tris_A = %00000000 'Make ALL pins on PortA output This is because we just don't want any pins to float. Tris_B = %00000000 'Make ALL pins on PortB output Floating pins EAT current. Tris_C = %00000000 'Make ALL pins on PortC output Asm Main: MOV RB.0,#1 '2 Clocks NOP '1 Clock NOP '1 Clock NOP '1 Clock (5) Clocks "ON" MOV RB.0,#0 '2 Clocks JMP Main '3 Clocks (5) Clocks "OFF" ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=89554#m89712 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)