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

Wed Jul 15 2020, 09:59 AM
Sharon Jefferson
As you know, Google is constantly changing its SEO algorithm. The only thing that has remained consistent is that adding an explainer video increases website rank and most importantly keeps customers on your page for longer, increasing conversions ratios.
Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 115, Members: 0 ...

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

Members: 38215
Newest member: Mirza123
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 11:07 PM
PS: I am a new learner thats why my question may s...
Mirza123 Avatar
Posted By Mirza123
Wed Jul 01 2020, 02:05 PM
Thanks for the assistance. I have read the data sh...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 10:12 AM
See section 15 (Ports) of the data sheet. ...
wimac Avatar
Posted By wimac
Tue Jun 30 2020, 10:05 AM
How did you know that it is not 8051. Mirza123It i...
Mirza123 Avatar
Posted By Mirza123
Tue Jun 30 2020, 08:39 AM
It seems ports on the AT89LP2052 is not like on th...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jun 30 2020, 08:34 AM
It seems ports on the AT89LP2052 are not like on t...
Mirza123 Avatar
Posted By Mirza123
Thu Jun 25 2020, 04:07 PM
Hello!i am trying to use AT89LP2052 ( AT89LP2052 h...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 09:42 PM
It is about capacitor? i should put it between Vcc...
cerouno Avatar
Posted By cerouno
Wed Jun 17 2020, 10:37 AM
Take another look at the power supply to the LCD.A...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 02:01 AM
Take another look at the power supply to the LCD.A...