I agree with you 100% Jan-erik. = I'm sorry if I somehow gave you impression there was a speed problem. I wou= ldn't really know if there was. LoL. = Anyways, yes, I'm sure it's a code problem. I thought maybe the comparator = would work. I believe someone mentioned that towards the beginning. = I'm not going to use it. Obviously I'm going about this wrong. I'll send my= code and we can all have a good laugh. > Date: Tue, 21 Nov 2006 23:59:31 +0100> From: jan-erik.soderholm@telia.com= > To: piclist@mit.edu> Subject: Re: [PIC] Detecting a square wave> > My poi= nt was that the fact that your code doesn't> detect the LED is flashing, is= *not* becuse of the PIC> not having speed enough. You simply have a bug (i= n> your code or in your hardware). That's as much as can> be said with the = current information. I'm afraid.> > Regards,> Jan-Erik.> > > dax2@hotmail.c= om skrev:> > Depending on the LED situation, the code will do one of 2 thin= gs. If the > > LED is on, it will check to see if the music input is low. I= t was necessary > > to use an inverter on the detector signal since it only= went to 3.2v. So the > > signal is active low.> > If there is music then i= t will branch to a label to toggle the button, > > turning off the LED.> > = If there is no music then it simply returns to the start.> > On the next pa= th, since the LED is off and there is music, it will just loop > > till the= re is no music. Then it will once again toggle the button to turn > > the s= pots off.> > It seemed simple at first. If there were some other way to det= ect the > > controller in standby mode, I'd be thrilled to use it. I have n= o schematics > > for the controller. It's a "Light CoPilot II" made by Elat= ion.> > > > > > ----- Original Message -----> > From: "Jan-Erik S=F6derholm= " > > To: "Microcontroller discussion list - = Public." > > Sent: Tuesday, November 21, 2006 4:58 PM> > S= ubject: Re: [PIC] Detecting a square wave> > > >> dax2@hotmail.com wrote :>= >>> It flashes fairly fast, about 4-5 times a second.> >> That's very sloo= oow for a PIC... :-)> >>> >>> I figured the LED flashed slow enough (in> >>= > processor time) that it would eventually see the low.> >> Absolutely !> >= >> >>> Didn't work.> >> Why didn't it work ?> >> What does the code do apar= t from monitoring the LED ??> >>> >>> >> Regards,> >> Jan-Erik.> >>> >> -- = > >> http://www.piclist.com PIC/SX FAQ & list archive> >> View/change your = membership options at> >> http://mailman.mit.edu/mailman/listinfo/piclist> = >>> > -- > http://www.piclist.com PIC/SX FAQ & list archive> View/change yo= ur membership options at> http://mailman.mit.edu/mailman/listinfo/piclist -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist