Discussion in "PIC Microcontroller Discussion" started by    needginer    Mar 2, 2008.
Thu Jul 31 2008, 08:44 pm
#31
you cant connect Interrupt pin with LCD as it is used for interrupts only from IR sources. So connect LCD control pins to port A rather or any pin you like.
Fri Aug 01 2008, 01:20 pm
#32
I wanna interface it to my pc with visual basic program. I need to add a RS232 to my circuit right? where should i connect it to? im using Microchip PIC KIT, MPLAB and ICD2
Fri Aug 01 2008, 09:16 pm
#33
yes add RS232 circuit (MAX232) in your circuit.
Wed Aug 06 2008, 06:27 am
#34
Hi Matt

It seems to me you have too many components, something to avoid
where ever possible.

The 2N3904s and the LM324 are both acting as amplifiers and you don't need both.
You certainly don't need the 7476. Whatever it does should be done in software.
Removing these items will clean up your circuit and make it more reliable.

As for sharing interrupts, why bother ?
The PIC has nothing else to do so why not just connect the detectors to
two pins and continuously poll them as Ajay suggested.

>I need to add a RS232 to my circuit right? where should i connect it to?

Connect pins 25 and 26 to a MAX232 (or similar) level converter chip and connect that
to the tx and rx pins of your PC's D9 connector.

I'll leave it to you to sort out which pins,
but try this handy tutorial.
http://www.8051projects.net/serial-communication/introduction.php

Plus... you could use a smaller PIC as you don't need so many pins for the display.
A minor point, but it's better to use a name like "visitorCount" than "I" as a variable name.


[ Edited Fri Aug 08 2008, 06:26 am ]
Sun Aug 10 2008, 03:20 pm
#35
Hi ExperimenterUK,

Really appreciate your advice as it really had help me alot.thanks so much. i will try to make some adjustments to my circuit and program first. later if i have any problems i will ask for help.
Mon Aug 18 2008, 09:41 pm
#36
the polling of the IR detectors how is it done in hardware? do i just connect them by wires? or do i buy an AND gate component?
Mon Aug 18 2008, 10:12 pm
#37
[blank]


[ Edited Sun Aug 31 2008, 10:00 pm ]
Tue Aug 19 2008, 12:52 am
#38
matt you do not need opamps inbetween controller and photo-transistor, rather you can directly connect IR Receiver (photo-transistor) to controller pin or connect 2N3904 o/p to controller, which also makes polling simpler..

polling can be done the following way..
lets say normally your sensor o/p is high and when someone crosses it, o/p becomes low..

while(sensor1 && sensor2); // wait for any of sensor 1 or 2 to be crossed
if(sensor1 == 0){
     //someone crossed sensor1
}
if(sensor2 == 0){
     //someone crossed sensor2
}

this is how polling is done.
Tue Aug 19 2008, 06:46 pm
#39
is it i should remove the LM324? what about the flip flop? do i keep it?
Wed Aug 20 2008, 12:49 am
#40
Just connect the collectors of the 2 transistors to 2 PIC gpio pins and remove all the rest of the components in between.
Without the comparator you would probably need to tinker a bit with the 3904's biasing to make it trigger the PIC appropriately.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm
Robertgurse
Wed Apr 24 2024, 02:43 pm
Richardedils
Wed Apr 24 2024, 04:07 am