Ah! you are right. The position within the loop of the reads and writes only affects latentcy, not uncertainty. Sorry about that. I am a C programmer (CCS PCB). To get better than the obvious few assembly instructions will require someone more familliar with the quirks of PIC assembly code than me. I am actually comptemplating my first project that will require some assembly embedded in the C. I will have to write the code, count the cycles, THEN choose the crystal frequency. I have to generate exactly four cycles of exactly 300kHz with complementry outputs. Sherpa Doug > -----Original Message----- > From: Dan Lanciani [mailto:ddl@DANLAN.COM] > Sent: Friday, February 08, 2002 3:09 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: minimum uncertainty input->output > > > Douglas Butler wrote: > > |The obvious solution to both latency and uncertainty is an > external AND > |gate. When you want the signal propagated you just turn on the AND > |gate, and turn it off when you want to stop. Latency is the delay of > |the gate and uncertainty is nil. > > I'm not trying to design a circuit. I'm trying to determine > the best that > the firmware in an existing design could be doing. There is > no external gate. > > |If you must do it in software look at what clock phases the > bit test and > |set operations work on. > > Could you expand on this? It isn't clear to me how that > timing would affect > the uncertainty. > > |Sherpa Doug > | > |> -----Original Message----- > |> From: Dan Lanciani [mailto:ddl@DANLAN.COM] > |> Sent: Friday, February 08, 2002 4:11 AM > |> To: PICLIST@MITVMA.MIT.EDU > |> Subject: [PIC]: minimum uncertainty input->output > |> > |> > |> Given a 16C54 class device, what is the minimum > |> uncertainty/jitter with > |> which a change in a general input can be propagated to a > |> general output? > |> My first thought is that a bit test & skip/goto loop gives a > |> three instruction > |> cycle uncertainty, but I'm probably missing a trick. I don't > |> care (within > |> reason) about minimizing the latency, just the absolute > |> uncertainty in the > |> latency. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.