Oct 23, 2013

PLC-LADDER LOGIC Examples-PIC16F877


Lets start programming with our own PLC using open source ladder logic LDMicro.
Thanks to  LDMicro. developer .
Here i used PIC16F877 Microcontroller
16.000000 MHz crystal

Digital input and output

1) 40th(RBO ) pin in Microcontroller will be high when a digital high is given at pin 33( RB0)

LADDER DIAGRAM:


    XRBO             YRB7       

1 ||-------] [--------------( )-------||

  ||                                  ||

  ||                                  ||
  ||                                  ||
  ||------[END]-----------------------||
  ||                                  ||
  ||                                  ||

I/O ASSIGNMENT:

 Name                       | Type               | Pin
----------------------------+--------------------+------
 XRBO                       | digital in         | 33
 YRB7                       | digital out        | 40


2) Input negated digital switch( 40th(RBO ) pin in Microcontroller will be high when a digital low is given at pin 33( RB0))

   ||      XRB0             YRB7       ||
 1 ||-------]/[--------------( )-------||
   ||                                  ||
   ||                                  ||
   ||                                  ||
   ||------[END]-----------------------||
   ||                                  ||
I/O ASSIGNMENT:
  Name                       | Type               | Pin
 ----------------------------+--------------------+------
  XRB0                       | digital in         | 33
  YRB7                       | digital out        | 40

Other examples coming soon