Jinx escreveu: > Nick, I've had a quick read of the constructional article > > http://www.geotech1.com/pages/metdet/projects/hammerhead/HHv1p5.pdf > > and it's a lot clearer now > > So, there's an astable 555 running at 900Hz - 2300Hz with adjustable > duty cycle. This pulse train drives two 74HC221 monostables, which > in turn each output a delayed pulse with adjustable pulse width > > The short answer is that this can be done fairly easily with the 628 > using code suggested so far. PWM will work to replicate the original > 555 train but as the other two need to be done in s/w you might just > as well use s/w for all > > In the schematic > > http://www.geotech1.com/pages/metdet/projects/hammerhead/HHd1.pdf > > the controls are analogue (pots). It won't be possible to emulate this > exactly using pushbuttons without some disruption to the output until the > new values come into effect but in this app I don't think that's too much > of a big deal. OTOH the pulse parameters will be more consistent and > precise with a digital generator > = I didn't studied the circuit, but perhaps the interval between pulse sequences (between Pulse3 and next Pulse1) is not critical. If so, the code may test for keypresses only once each loop. If no key is pressed, it immediately starts the next sequence and no disturbance is seen in the pulses. If a key is pressed, the interface routine is called and treats this keypress and returns immediately to the pulse generating routine. This way a small extra delay is added between two pulse sequences only when a key is pressed, and its results are seen immediately also. > My thought would be to use B0 INT to break into the pulse train. Push > buttons would be diode-OR'd to generate an interrupt from any button > press, with each button also going to its own PIC input. These inputs can > be polled to determine which button caused the interrupt and which > parameter is changed > = A more intuitive interface would be having three rotary buttons with quadrature encoders, or just one rotary button and one push-button for selecting which value is being changed. Regards, Isaac. > = __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist