> for a beginner, programming will not be easiest than a 555 with > two resistors, one trim, two capacitors and one or two diodes, all > of these will cost together less than a PIC12F629, that's sure Cheap, yes, but not very adventurous ;-) Just thinking - You should be able to this simply with two alternating Timer1 IRQs. I was too engrossed in my other method to see the simplicity The overall time frame is 20ms, which is 20,000 instruction cycles You work out what will be the loading for the mark, and what will be the loading for the space For example, 30:70 will result in two values, 6,000 and 14,000 Timer1 is first loaded with 6,000, and the output pin set high. At the IRQ, the pin is set low and Timer1 is loaded with 14,000. At the IRQ, pin set high, load with 6,000 and so on. The result will be a wave that is 6ms high, 14ms low -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist