I think in AN521 they assume that 1.8V is close enough to 0v for a 120V sine wave. For a low level zero crossing you will probably need a comparator. If you just have 0V & 5V supplies you can AC couple the signal to a level within your range. Some PICs have built in comparators but the 877 is not one of them. How much accuracy do you need? (time & voltage) Sherpa Doug > -----Original Message----- > From: David Dunn [mailto:ddunn@TCAINTERNET.COM] > Sent: Tuesday, November 06, 2001 11:35 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: Zero Crossing Detector > > > this helps a bit, but i already have the hardware side > figured out, it's not AC LINE that i need zero crossing > detection, i have a signal that > i've filtered down to under 5v pp i need to detect zero crossing on. > > what i'm not quite figuring out is if a pic pin shows high at > around 1.8v (i think that's what it is) how is is that you > can detect a zero > crossing ? > > thanks ! > > dld > > On Tue, 6 Nov 2001 11:20:30 -0500, Douglas Butler wrote: > > >I would start with Microchip's application note AN521. It > mostly covers > >hardware issues. > > > >Sherpa Doug > > > >> -----Original Message----- > >> From: David Dunn [mailto:ddunn@TCAINTERNET.COM] > >> Sent: Tuesday, November 06, 2001 11:15 AM > >> To: PICLIST@MITVMA.MIT.EDU > >> Subject: [PIC]: Zero Crossing Detector > >> > >> > >> I'm sure in my surfing i've seen that you can do a zero > >> crossing detector on a pic, possibly with PB0 ? I'm using a 16F877. > >> > >> Anybody have links on how to set this up ? > >> > >> > >> Thanks, > >> > >> DLD > >> > >> -- > >> http://www.piclist.com#nomail Going offline? Don't AutoReply us! > >> email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > >> > >> > >> > > > >-- > >http://www.piclist.com#nomail Going offline? Don't AutoReply us! > >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body