This is a multi-part message in MIME format. --------------010203090502010106030005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Peter Todd wrote: > > If you got any better ideas, do tell! > I don't know about better but here's one way to do it. See attached gif. U1 is whatever you are driving your pwm from. R2 is whatever is needed to keep from overloading U1 when the current limiting fun begins. Q1/R1 limit the current when it reaches Vbe/R1 or around 20 ma, exclusive of temperature for the circuit shown. Dissipation, etc. is left as an exercise to the student. I'll leave the design of the clever switch mode power supply to others; I'm out of town through the weekend for my daughters wedding. --------------010203090502010106030005 Content-Type: image/gif; name="LED DRIVE.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="LED DRIVE.gif" R0lGODlhFQJAAvcAAAQCBISChAQChPwCBMTCxPwC/AQC/IQCRPz+/Bno5wASEgAAAAABgAAA nhUAQQAAfgnmCQAtBAD9AAB/AAABAAIAAQAAAAAAAAAAmAEA6QAAEgAAAIiwAOXoABISAAAA AOlQAOXmAIESAHwAAACACQCeAAFBAAB+AFYJAAAEAAAAAAAAAZAABOQBABIAqwAAADGwSJfo 55ISEnwAALAA5eUA2xIAQQAAfhgAmO4A6ZAAEnwAAHABCQUAAJEAAHwAAP8AAP8AAP8AAP8B AG0ErgUAsJGrrXwAAIVgmOfm6YESEnwAAADlaQDbABVBXwB+AGCwdgPoAAASaQAAAIgBZaQA ABkAdwAAAOgAM2sAABUAMgAAAACuAACwAACtEgAAAH6wUADoAAASAMAAAAAMxwDp4gASkAAA fP8B5/8AIf8AgP8AfP8cwP/sAP8SAP8AAAAoZgAvCAAVAgAAAAAJOAAA6AAAEgAAAACsGgDm ABUSAAAAAMA1YOXOnhKAgAB8fNIoIOYvAIEVTXwAAegcAGvsABUSAAAAAEoAB+MAAIEAAHwA AAAcAL/sAE8SAAAAAOgJAGsAAAEATQAAAWzmAAAtAAD9AAB/APzeAOR4ABIAAAAAAADYAADm AAASAAAAAPiFAPcrABKDAAB8ABgAaO4AnpAAgHwAfHAA/wUA/5EA/3wA//8A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L4dFcpNXMz9zW773MkteKp9 266t3flX0bG7fRAvfAAvDJbhPd7JDJaaBElfpt4QR0eY594c50aeJ98qh0akZ98xJ0aqp986 x0Ww5989l0WzJ+BaN0W5Z+BgVyiAqOBk1yeE6OCfC95MQaWb+6lOAaS87KlP0aquTIlMQtok 0deWzNqvXYfeXeL6k0W2Dd4rntBXp4YwHuMyPuM0XuM2fuM4nuM6vuM8fjfZDdXbDeTd/d2w jeIteOLc7eK0vdg93uRO/uRQHuVSPuVUXuVWfuVY7mMBAQA7 --------------010203090502010106030005 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------010203090502010106030005--