Vous êtes sur la page 1sur 20

CONTENTS

PICPLC8A KEY FEATURES


CONNECTING THE SYSTEM
INTRODUCTION
Jumpers
MCU Port
Power Supply
On-Board USB 2.0 Programmer
RS-232 Communication Circuit
RS-485 Communication Circuit
Optocouplers
Relays
Direct Port Access Connectors

4
5
6
7
8
9
10
11
12
13
15
17

PICPLC8A KEY FEATURES


1. Power supply connector;
2. Optocouplers, RS-232 and RS-485 connectors;

11. PS/2 connector;


12. Power supply circuit;

3. Jumpers J1-J4 used to enable connection between on-

13. Power supply supervisor circuit;

board USB 2.0 programmer and microcontroller;

14. Reset button circuit;

4. On-board USB 2.0 programmer;

15. MCU socket with PIC18F4520 microcontroller;

5. MikroICD;
6. USB connector;

16. MCU ports pull-up/pull-down selectors;


17. Direct port access connectors;

7. Optocouplers;

18. Relays;

8. RS-232 communication circuit;


9. RS-485 communication circuit;

19. Relay driver circuit; and


20. Relay connectors.

10. Resistor network 8x10K;

CONNECTING THE SYSTEM

Step no.1

Take the development system and product CD out of the box. Insert the product
CD into CD drive. Please, do not connect the development system to a PC yet.

Step no.2

Install PICPLC8A programmer software to enable a program to be transferred from PC to the microcontroller chip. Installation instructions are con/
tained in the PICFlash 2 programmer manual.

Step no.3

Install USB drivers on your PC to enable programmer's hardware to operate properly on the PICPLC8A board. For detailed installation instructions
refer to the 'Installing USB drivers' manual.

Step no.4

Connect the PICPLC8A to PC using USB cable. Please use one of USB
ports on the back of the PC because they are directly connected to the com
puter motherboard.
The first time you switch the PICPLC8A on, your PC will automatically
detect a new hardware. You will be immediately prompted whether Windows should search for new drivers update or not. Select the option 'No, not
this time' and click 'Next'. Another window appears, click 'Next' and the
operating system will automatically find the drivers. Click 'Finish' to complete this process and run PICFlash 2 as explained in the PICFlash 2 programmer manual.
Next time you switch the PICPLC8A on, Windows will not ask for new
drivers update during driver installation.
.

After these four steps, your PICPLC8A is successfully installed and ready for use. You can read
a program from the chip or write another one into it. The product CD provides numerous simple program examples to make your first steps Easy...

CONNECTING THE SYSTEM

Apart from this manual, the development system box contains development system, product CD,
USB cable, and user's manuals for installing PICflash 2 programmer and USB drivers. In order to
use PICPLC8A properly, it is necessary to go through the following steps:

INTRODUCTION

INTRODUCTION
PICPLC8A is a programmable logic controller design to control devices in industry and automatics using relays. It has a built-in programmer so that there is no need for additional hardware for the microcontroller programming. Besides, this controller has inputs isolated by optocouplers, RS-232 and RS-485 communication modules and PS/2 communication module as
well. Four IDC-10 male connectors enable the PICPLC8A to be directly connected to the
microcontroller pins, if needed.
Figure 1 illustrates the PICPLC8A development system. There are identification marks next to
each component on a silkscreen, both on the top and bottom. These marks describe connections
to the microcontroller, operation modes and provide other useful information so that there is
almost no need for additional schematics.

Figure 1

PICPLC8A development board

JUMPERS

Jumper is commonly used as a selector between two possible connections via 3-pin connector.
As illustrated in Figure 2, the middle connector pin can be connected to the left or right pin,
depending on the jumpers position.

Jumper is not
placed and
middle pin is
unconnected.

Figure 2

Jumper as a selector

Jumper is placed
on the right side
connecting middle
and right pin.

Jumper is placed
on the left side
connecting middle and left pin.

JUMPERS

Jumpers are devices used to break or establish connection between two points. Under the plastic cover of a jumper, there is a metal contact which establishes connection when the jumper is
placed over two pins.

MCU PORT
The PICPLC8A supports 40-pin microcontrollers in DIP40
package (PIC18F4520). See Figure 3. The microcontroller
pins are routed to various peripherals. All ports are directly
connected to Direct Port Access Connectors. These connectors are normally used for connecting external peripherals to
the board or as points for connecting digital logic probes.
Some of the pins are connected to other peripherals such
as optocouplers, RS-232 communication, RS-485 communication, etc.

MCU PORT

Figure 3 PICPLC8A MCU socket

Figure 4

System connection

POWER SUPPLY

The PICPLC8A power supply can be


AC or DC. AC power supply voltage
ranges between 12 and 22V, whereas
DC power supply voltage ranges
between 16 and 30V. Isolated power
supply for optocouplers is marked with
OCVCC on the board.
Figure 5

Figure 6

Power supply circuit diagram

Note:

See optocouplers on page 13.

Power supply

POWER SUPPLY

The PICPLC8A can use one out of two


power supply sources - PICPLC8A
board power supply and isolated power
supply for optocouplers.

ON-BOARD USB 2.0 PROGRAMMER

10

ON-BOARD USB 2.0 PROGRAMMER


There is no need to use external equipment during programming as the PICPLC8A development
system has its own on-board USB 2.0 programmer. All you need to do is to connect the system
to PC using the USB cable and enable
Development MODE by setting jumpers
J1, J2, J3 and J4 in the left hand position.
Then, load a program into the microcontroller via the PICflash2 programming software supplied with the board.

Figure 7 USB 2.0 programmer

Figure 8 USB 2.0 programmer circuit diagram

RS-232 COMMUNICATION CIRCUIT


RS-232 communication circuit enables point-to-point data transfer. It
is commonly used in data acquisition applications to transfer data
between the microcontroller and PC. Since the voltage levels of the
microcontroller and PC are not directly compatible with each other,
a level converter such as MAX232 must be used.

Figure 9

RS232 connector

Figure 10 RS232 circuit diagram

RS-232 COMMUNICATION CIRCUIT

11

12

RS-485 COMMUNICATION CIRCUIT

RS-485 COMMUNICATION CIRCUIT

RS-485 communication circuit enables point-to-point data transfer. It is commonly used to transfer data between several microcontrollers. LTC485 interface transceiver is used to transform a signal on microcontrollers Rt, Rx and
Tx lines into a differential signal on A and B lines.
The PICPLC8A development board has one RS-485 communication circuit. In
order to provide more flexible system, the microcontroller is connected to
LTC485 via three jumpers (J10,J11 and J12) as shown in Figure 12.

Figure 11 RS-485 communication circuit

Figure 12 RS-485 circuit diagram

OPTOCOUPLERS

13

OPTOCOUPLERS

The PICPLC8A has 8 optocouplers inputs. Optocouplers are widely used in industrial applications
where inputs must be electrically isolated from the rest of the development board. The main objective is to protect the microcontroller from voltage spikes that might occur on input lines.

Figure 13 Optocoupler group

In order that input circuit is electrically isolated from the rest of the board, it must have its own
power supply (12V DC).The optocoupler chip has two LEDs on each input and two open collector transistors on each output pin. All optocoupler outputs are connected to the microcontroller PORTB. PORTB must be driven high by putting jumper J6 in the upper position (pullup), because optocoupler has open drain output.

OPTOCOUPLERS

14

Figure 14 Optocoupler circuit diagram

RELAYS

15

RELAYS

In order to control devices using high power for their operation, the PICPLC8A has 8 relays connected to the microcontroller PORTD. The relay coil voltage amounts to 12V DC (+U12).

Figure 15 Relays

The microcontroller PORTD pins cannot provide enough current necessary to directly run
relays so that they are connected to the ULN2804 Darlington drivers. Each relay has one LED
indicator connected in parallel with its coil. It is used to indicate whether the appropriate relay
is active or not. There is only normally open contact on each relays output (for example W0A and W0-B).

Figure 16 Relays circuit diagram

RELAYS
16

DIRECT PORT ACCESS CONNECTORS

17

These connectors, shown in Figure 17, can be used to connect the


system to external devices such as Serial Ethernet, Compact Flash,
keyboard etc. If external and on-board peripherals use the same
pins, then on-board peripherals must be disconnected from the
microcontroller by setting the appropriate jumpers. The connectors
can also be used for attaching logic probes or other test equipment.

Figure 17 Direct port access


connectors

Figure 18 Direct port access circuit diagram

DIRECT PORT ACCESS CONNECTORS

All microcontroller input/output pins can be accessed via IDC-10


(2x5) connectors placed along the right side of the board. For each
microcontroller port, there is one 10-pin connector providing up to
eight port pins and two additional pins connected to VCC and GND.

Relays

Power supply
regulator

External power
supply 16V-30V
DC 12V-22V AC

Relays input/output connectors

Optocoupler,RS-232 and
RS485 connectors

Reset pushbutton

Power supply
supervisor

MCU 8MHz
crystal

USB 2.0 programmer

MCU in DIP40 package

RS-232 module with


selectable TX and RX

PICPLC8A

Optocouplers

Direct port
access

Jumpers to
determine input
pin performance in idle
state (connected to pull-up or
pull-down resistors)

RS-485 module
connector

PS/2 connector

USB 2.0
connector

Vous aimerez peut-être aussi