Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 13th March 2007, 05:43 PM   (permalink)
Default IR detector which port? RB0 (int), CCP1 or generic PIC pin?

When using a 38KHz IR detector, what type on input pin is your favourite (least software overhead)?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 14th March 2007, 12:59 AM   (permalink)
Default

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."
Sceadwian is offline  
Old 14th March 2007, 03:14 AM   (permalink)
Default

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?
Mike, K8LH is offline  
Old 14th March 2007, 04:17 AM   (permalink)
Default

I'm using CCP1 (PWM) to run a relay, and tmr1 osc (32KHz) and will lose the CCP2. So I have to use RB0.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 14th March 2007, 09:37 AM   (permalink)
Default

You're using a PWM signal to drive a relay?
Mike, K8LH is offline  
Old 14th March 2007, 01:42 PM   (permalink)
Default

PWM 100% to pull in the relay and 50% or so to keep it engaged.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 14th March 2007, 02:09 PM   (permalink)
Default

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.
Mike, K8LH is offline  
Old 14th March 2007, 02:20 PM   (permalink)
Default

Quote:
Originally Posted by Mike, K8LH
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.
If you place an electroytic capacitor across the resistor the charging current will provide a full voltage pulse to the relay, then after it's charged the resistor will provide the holding current - fairly standard practice!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
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



All times are GMT. The time now is 08:07 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker