Can anyone help me with a vaguely PIC related problem...? I have a project in which I need to control the brightness of a 12V lamp from a PIC. The lamp has to go from maximum brightness to the off state. I am planning on implementing this using varying mark-space ratios so to minimise power loss. Can anyone advise me on a cct. for doing this? I am close by using a E2POT digital potentiometer from Xicor and a CA555 timer, but this will only give me a mark:space ratio of 1:1 at one extreme. i.e. I can only get it half dimmed, or half bright depending on the polarity of the output. However, this cct. does have the advantage of only using two pins on the PIC. If anyone could advise of a timer circuit with which I can use the E2POT and still obtain a full range of mark:space ratios (with minimal component count) I would be very grateful. One additional point is that mains supply is not available, so this cannot be used as a frequency generator. I have a feeling the answer is fairly simple, but I just can't see the wood for the trees! :-) Thanks a lot! Chris Windram