I would like to control the brightness of some LEDs (directly attached = to a port on a PIC) thru code. Each LED would be at full bright or dim -- = just 2 intensities. Here's what I thought... Assume as some point in the code, I want to set the output to 'ooBoDDBo' where 'o' is Off, 'B' is Bright, and 'D' is Dim. Let V1 =3D value of port for dim LED's. In this case V1 =3D '00001100' Let V2 =3D value of port for bright LED's. In this case V2 =3D = '00100010' Then set V3 1 =3D V1 OR V2 =3D 00101110' Now in my code, every time I come around in the main loop, I would alternate the output between V1 and V3. Bright LEDs would get set all the time (both times), and dim LED's would get set only on alternate cycles -- sort of like a pulse-width dimmer. Perhaps I may need to have 3 cycles with V1, V1, V3 depending on=20 relative brightness level, etc. Is this reasonable? Is there an easier/better way to do this? I'll be using a 16F84 or 16F872 for this. Thanks, -Neil. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics