Isaac Marino Bavaresco wrote: > > Nick_F escreveu: >> Hi All, >> I intend to start a project that uses a LCD display (2x16, parallel data >> input), three switches for input, three digital outputs, that each >> generates >> a pulse with a specific width. >> Pulse2 and pulse3 come after delay2 and delay3. I want to modify the >> delays >> from 1us to 200us, with a resolution of 1us, as well as the widths of >> pulse1, pulse2, pulse3. >> For this operation, I think using three switches, as: "Select Next >> Parameter/Set Value", "Up", "Down". >> > > One microsecond resolution for a 5 MIPS PIC means you have a timing loop > that takes 5 instruction cycles. > It may be feasible if you use assembly creatively. > > But you will need to stop the activity when you want to interact with > the user, or the delays and pulse widths will suffer unpredictable > stretching. > > Is the sequence always the same? (pulse1, delay1, pulse2, delay2...) > > Regards, > Isaac > > Hi Isaac, The application is not critical at all. Even if I can't get a resolution of 1us, but 2us (anything up to 5us!) is still ok. The sequence of pulses is always the same: Pulse1 - Pulse2 - Pulse3. Pulse1 has Width1, Pulse2 and Pulse3 have equal Width23. The delay between each pulse is constant. In the moment I press on the keys, to modify the parameters of the pulses, Pulse1 should stop in 0 or 1 (not sure which one at the moment). The other two pulses are not critical. Once I set the parameters, all three pulses should reappear. Regards, Nick -- View this message in context: http://www.nabble.com/Project-with-LCD%2C-keys-and-delays-on-PIC16F628A-tp23309866p23316336.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist