Dear all, are few days I'm in trouble with the following problem: how to produce pulses bursts (from 5 portb of a 16f84 4 MHz) starting from the same instant. The number of pulses for each port can change from 0 to 65535, the pulses freq can be any, the repetition rate of the bursts is 10 sec(from an external trig). I've tried to implement sorting routines but I realized to be too heavy, more I tougth to produce a mask of the port in W, decreasing for 1 any of the 5 words checking to Z and setting to 0 the relative bit in W putting out W and more settingW to all 1s putting out it again; this approach seems to me too time expensive. This is a part of a project for a balloon borne experiment. I'm sorry for my awful english, please be patient and "grazie" for any suggestion. Maurizio -- Maurizio Viterbini Istituto di Fisica dell'Atmosfera Via Fosso del Cavaliere 100 00133 Roma Italy tel. +39 06 49934200 fax +39 06 20660291 email viterbin@ifa.rm.cnr.it -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu