Discussion in "Hardware" started by    helloleong    Jul 28, 2010.
Wed Jul 28 2010, 09:42 AM
#1
I got a circuit problem to ask.

Here is the circuit diagram


The question i wanna ask is when the PIC send a 0v and at the same time EM module send 5V, what signal will the controller detect?

This circuit is done by the previous trainee engineering.
The PIC is the reader to detect button press and read card.
So the EM module is use to read card. When no card was read D0 and D1 always stay high (5V). When card present it will send out 0 pulse.

So i had set the pic 2 pin to input to detect read card
And set to output when button press, if the button press signal finish send to the controller it will set back to input to detect card.

It still works, but some times the controller cannot detect signal send.
And my boss said reader hang, and ask me why.
But just the controller no response, the reader still running as usual.

Thank you
Wed Jul 28 2010, 11:20 AM
#2

The question i wanna ask is when the PIC send a 0v and at the same time EM module send 5V, what signal will the controller detect?


other controller will get 0, as complete circuit current is sink inside the PIC who is sending 0.

One question to you..
Do you understand weigand protocol?

the reason for asking question is that you cannot set D0 or D1 to be o/p pins they are always input to controller side and o/p on reader side. so controller is always in reading mode. as soon as card is detected on reader, it will send data in weigand format.

usually two interrupt pins are used to read weigand modules, programmer just have to shift in 0 or 1 depending on which input goes low. if D0 goes low means reader is sending a 0, if D1 goes low means reader is sending 1.

I suggest you to read wikipedia for more information on weigand format. also refer datasheet of reader module you're using.
 helloleong like this.
Thu Jul 29 2010, 01:18 AM
#3
Thanks for your reply . I still have a question to ask. as a complete circuit will the current sink in to the another micro-controller too?(Except PIC that you said)

This PCB is done by the previous trainee. I think the reason she did like this is because the PIC no need detect the card wiegand and always set as output to send out the button wiegand to the controller.

So when i take over the project my boss say she want indication when card read. So i have to always set the D0 and D1 input (Port B interrupt) and output (send out button wiegand).

I know the PIC should always sets as input. But they already make the PCB like this, and i had tell my boss this problem (She seems like half believe only, and said is the reader hang, ask me add watchdog to the software) so they are changing another version of PCB to make the D0 and D1 not to be parallel.

So now the reader software change to output only to send out the button wiegand and let the em module send out card wiegand it self(Like the previous trainee does). Hope its no problem happen.

Thu Jul 29 2010, 05:14 PM
#4
I am really not sure what is point of misunderstanding in your company.

I am confused with few things.. are you trying to tap weigand o/p of reader?

I think the reason she did like this is because the PIC no need detect the card wiegand and always set as output to send out the button wiegand to the controller.


what is button wiegand? i dont understand it.

tell you truth i dont understand whats you exactly trying to do.

all i can say is wiegand reader will act as o/p, pic and other controller act as i/p. so they always read and never write anything on wiegand data lines.
 helloleong like this.
Thu Jul 29 2010, 07:56 PM
#5
I share Ajay's confusion
but I think you are saying you have a card reader and a keypad.

You read the keypad with the PIC labled "reader", and want to send the
output of the PIC and EM module to the controller PIC over the Wiegand bus.

The problem is, it does not seem that the Wiegand bus can be shared !
you can only have one sender and one listener.

The best way to avoid transmission clashes is to have the EM module talk
to the "reader" PIC only.
The same PIC can get input from the keypad and send both inputs
out over the Wiegand bus to the controlling PIC.
 helloleong like this.
Fri Jul 30 2010, 02:58 AM
#6
At first i also confuse like you all. ExperimenterUK was right.

What the company want is a product with 2 version of software. One is a reader another is a standalone controller.

Reader: Only send out button data and card data to another controller unit
Standalone Controller: Process the button data and card data it self to check whether password correct & etc.

So the question i ask earlier is the reader software. (The controller software i set it as input only has no problem)

And i think the hardware unit should goes like this


But the current board hardware goes like this (although they are changing the to a new PCB, but they still testing on this current board unit.)


So the previous software version i did the wiegand bus line as input and output. But most of the time it works fine, just some of the time the controller fail to detect data send.

(The pic detect card just to show card readed indication and did not process the data, because at the same time the card data is parallel sending to the another controller unit to process it self.


So i change back to another software just set wiegand bus line as output to the controller and let the card wiegand send data it self without pic process.

But i have a question about the current flow for this circuit

Question: When the reader unit power on and did not send out any data, then the card generator send out card wiegand, but the other controller cannot detect any thing. Only after the button data(eg. 1=0x0001) send out to the controller, then the following card data only can be detect by the controller. Anybody know hows the current flow?

Thank you very much.


[ Edited Fri Jul 30 2010, 03:06 AM ]
Sat Jul 31 2010, 07:59 PM
#7
well in short.. you cannot get card data and keypad data sent over common weigand line.. your data will clash for sure incase both are transmitting at that moment. incase only one is transmitting i believe then it wont be a problem, but still cant say coz depends on other circuit connected on those weigand lines. logical connections may create problem..

PIC and controller unit outside should have direct connectivity like you have shown in first pic "Proper Circuit"

you can use any other serial interface like SPI/UART to do so.

In PIC Software V2, when any of controller/reader makes data line low, you will read low on the controller end. but incase both are transmitting it is possible that both lines goes low at same time as one is transmitting 1 and other 0 so clashes are still possible. consider the communication approach i suggested above.
 helloleong like this.

Get Social

Information

Powered by e107 Forum System

Conversation

Thu Nov 21 2019, 12:30 PM
raj2555
how to interface 8051 microcontroller with NRF24L01+ module
ExperimenterUK
Sat Oct 12 2019, 10:23 PM
Log in.. then post your code in the 8051 forum
Sat Oct 12 2019, 10:18 AM
Bhadra Sajikumar
i am doing a countdown timer with 8051 for my project, unfortunately our professor had to take a leave of absence before he could teach us most of it.. can someone explain the .asm code of it for me?
Mon Sep 23 2019, 07:37 AM
Nathaniel
I am doing a project for my schools wireless security system with cameras,sensors and spot lights using 8051 micro controller, could you help me out with the design and its source code.
Wed Sep 18 2019, 08:48 PM
Caryn Kover
Thank you for your time,
ExperimenterUK
Mon Aug 05 2019, 07:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 04:33 PM
Ismail balghmi
Hello. Please I won't download
ExperimenterUK
Wed Jul 24 2019, 12:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 06:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.
ExperimenterUK
Thu Jul 11 2019, 07:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html

Downloads

Comments

nabiha_anaya
Sun Dec 08 2019, 09:16 AM
ananyagupta
Tue Dec 03 2019, 07:53 AM
wells
Mon Nov 25 2019, 08:25 PM
auwal
Tue Nov 19 2019, 03:13 PM
ANKITPATEL
Mon Nov 18 2019, 11:00 AM
Casmir
Wed Nov 13 2019, 06:25 AM
DeepakBGattani
Mon Nov 11 2019, 01:31 PM
Jeanbusatta
Sun Nov 10 2019, 04:42 AM

Online

Guests: 41, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38108
Newest member: nabiha_anaya
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Dec 10 2019, 04:49 PM
ilylily07 Avatar
Posted By ilylily07
Sun Dec 08 2019, 01:24 PM
Hi .im humbly ask for your advice as i wrongly pur...
nabiha_anaya Avatar
Posted By nabiha_anaya
Sun Dec 08 2019, 09:19 AM
My teacher assign me a project on "voice control h...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Nov 29 2019, 04:24 AM
" Is it possible to interface a fingerprint scanne...
ilylily07 Avatar
Posted By ilylily07
Thu Nov 28 2019, 03:50 PM
You will not find any code for an 8051 as no one w...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 26 2019, 05:44 PM
You will not find any code for an 8051 as no one w...
ilylily07 Avatar
Posted By ilylily07
Tue Nov 26 2019, 04:13 AM
I tracked down a OV7670 data sheet.The OV7670 puts...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 26 2019, 12:08 AM
I tracked down a OV7670 data sheet.The OV7670 puts...
ilylily07 Avatar
Posted By ilylily07
Mon Nov 25 2019, 04:38 PM
The 8051 has too little memory to do anything us...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 19 2019, 10:44 PM
The 8051 has too little memory to do anything us...