Access Control with a PCSC CTRL – Reader And Control on Command and Status

A PCSC Controller is a board ctrl for access control.You can connect a reader , a door command and a door status on it.
When you present the card on the reader, it will be decoded by the controller and if you have the correct authorization then it will activate the relay to open the door.

The goal of this project is to act as a interface between the PCSC CTRL and the command of the door. It will also decode the card number.

  • JP4 is the connector to connect the reader : HID reader PROX reader. It will be used to decode the card number.
  • JP5 is the connector that goes on the PCSC CTRL. In fact, it is a direct connection of the reader to the CTRL.
  • JP3 is for the DOOR command and status.
  • JP2 is the command coming from the CTRL.

Between JP2 and JP3, there is a mechanism to increase the command pulse and the pulse status coming from the door.

IQ200PIC_Pcb_V1_01

The schematic :

IQ200_SCH_V2_01

A picture of the project on the controller :

P1020692

P1020687

Concerning the code, it has been made in C using CSS compiler.

The code to decode the card number is here : it uses an interrupt on RB0 to detect data Bits on DATA line D0 and D1.

//*************************************************************************************************************
int8 Startbit=10;  //26 bits sensor=10, PCSC=17
int8 NumberofBit=16;
#int_EXT
void EXT_isr() 
{
   Nbdata++;
   if ((Nbdata >=Startbit) && (Nbdata <Startbit+NumberofBit))
		{
		Carte=(Carte<<1);
		If (input(PIN_B4)==_low)
			{
			Carte+=1;
			}  
		}
}
//*************************************************************************************************************
	

Full code with PCB schematic is here.