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
 
Tools
Old 28th December 2006, 03:57 PM   #1
Default Detecting a Break in Beam

Hello,
I want to make a cool, entrance light for my room. I am thinking of using an Infrared LED emitter, and a phototransistor. I want to detect if the beam is broken, and turn on the LEDs in a pattern.

I am thinking of using a 16F628A, 16F630 or 16F688 with BASIC. I have no idea how to do this, any help would be appreciated.

Thanks,
Omar
Omar.M is offline  
Old 28th December 2006, 05:56 PM   #2
Default

Active HIGH Logic: LOW-->HIGH
====================
#DEFINE IR_RX PORTB, 1
MOVLW B'00000010'
MOVWF TRISB

MAIN:
BTFSS IR_RX
GOTO $ - 1

DO_PATTERNS:
...
...
...

GOTO MAIN
END_MAIN:


Active LOW Logic: HIGH-->LOW
====================
#DEFINE IR_RX PORTB, 1
MOVLW B'00000010'
MOVWF TRISB

MAIN:
BTFSC IR_RX
GOTO $ - 1

DO_PATTERNS:
...
...
...

GOTO MAIN
END_MAIN:



Active HIGH + Debounce Filter Logic: LOW-->HIG(SUPRESS)->LOW-->HIGH
====================
#DEFINE IR_RX PORTB, 1
MOVLW B'00000010'
MOVWF TRISB

MAIN:
BTFSS IR_RX
CALL X_MILLISEC_DELAY
BTFSS IR_RX
GOTO $ - 3

DO_PATTERNS:
...
...
...

GOTO MAIN
END_MAIN:



Pulse HIGH + Debounce Filter Logic: LOW-->HIGH->LOW
====================
#DEFINE IR_RX PORTB, 1
MOVLW B'00000010'
MOVWF TRISB

MAIN:
BTFSS IR_RX
CALL X_MILLISEC_DELAY
BTFSS IR_RX
GOTO $ - 3
BTFSC IR_RX
GOTO $ - 1


DO_PATTERNS:
...
...
...

GOTO MAIN
END_MAIN:
donniedj is offline  
Reply

Tags
beam, break, detecting

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Building IR BEAM Break alarm system damenace Electronic Projects Design/Ideas/Reviews 4 28th April 2009 08:30 PM
infared break beam detector from forrest mims green book maverick8888 Electronic Projects Design/Ideas/Reviews 14 30th July 2004 08:34 AM
Does this work? Laser break beam sensor and delay timer RuaRi Electronic Projects Design/Ideas/Reviews 5 6th May 2004 05:40 PM
IR Beam Break Circuit schapman43 General Electronics Chat 2 7th February 2004 04:38 AM
HELP: Break Beam Switch using IR LED/rec (long) funkmasterta Electronic Projects Design/Ideas/Reviews 3 17th April 2003 04:03 AM



All times are GMT. The time now is 07:33 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker