![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| When using a 38KHz IR detector, what type on input pin is your favourite (least software overhead)? | |
| |
| | (permalink) |
| An interupt pin set to rising edge, unless you have a problem with noise.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| Good question. And one I've been comtemplating recently. If you want to decode Sony SIRC 12, 15, and 20 bit codes and you use the CCP "capture" mode timers then how would you know if you're decoding a 12, 15 or 20 bit code? In other words, how would you know when to stop waiting for a new edge interrupt? It almost seems better to use CCP "compare" interrupts at computed intervals to sample and filter the 2400/550 "start" bit, the 550/550 "0" bit, or the 1100/550 "1" bit and simply clock in 20 bits, though the last several bits may be null for 12 and 15 bit codes. Is there a better way to come up with a small simple reliable interrupt driven background decoder task? | |
| |
| | (permalink) |
| I'm using CCP1 (PWM) to run a relay, and tmr1 osc (32KHz) and will lose the CCP2. So I have to use RB0. | |
| |
| | (permalink) |
| You're using a PWM signal to drive a relay? | |
| |
| | (permalink) |
| PWM 100% to pull in the relay and 50% or so to keep it engaged. | |
| |
| | (permalink) |
| That's got to be one of the most exotic uses for PWM I've come across (grin). I've used a resistor in series with a relay to accomplish something similar. When you first key the relay it sees the full voltage and as the current ramps up there's a small voltage drop built up across the resistor. Of course this wastes power on the resistor while your scheme is conserving energy quite nicely. Last edited by Mike, K8LH; 14th March 2007 at 02:14 PM. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Need help badly on Inchworm and MPLAB | thushy | Micro Controllers | 14 | 11th March 2007 07:05 PM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 02:05 PM |