PLC-LADDER LOGIC Examples-PIC16F877

Photo of author

By Jackson Taylor

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:

NameTypePin
XRBOdigital in33
YRB7digital out40

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:

NameTypePin
XRB0digital in33
YRB7digital out40

Other examples coming soon

See also
ARM M4 - TM4C123G-ENERGIA