Olimex PIC-P28 User guide

PIC-P28 development board
Users Manual
All boards produced by Olimex are ROHS compliant
Rev. D, February 2008
Copyright(c) 2008, OLIMEX Ltd, All rights reserved
Page 1
INTRODUCTION:
What you can do with PIC-P28? A lot of stuff let’s see what we have:
PIC-P28 have RS232 connector and driver, so you can interface your PIC microcontroller to other embedded or PC with RS232. The RS232 driver have 4 lines Tx, Rx, CTS and jumper selectable RTS or DTR. The pin labeled RX is output and should be connected to PIC UART Tx. The pin labeled TX is input and should be connected to PIC UART Rx. Note that MAX232 driver on the socket is 5V device, so if you decide to run your PIC on 3.3V you should replace it with MAX3232 which works on 3.3V
The on-board ICSP connector allow you to program the PIC on the board without pulling it of the socket, by ICSP programmer like PIC­MCP, PIC-MCP-USB, PIC-PG1, PIC-PG2, PIC-PG3, PIC-PG4 or to program and debug it with PIC-ICD2, PIC-ICD2-POCKET or PIC-ICD2­TINY. IMPORTANT: all programmers provide power supply through
ICSP connector during the programming PIC-P18 should not be powered via the external power jack!
The power supply circuit have diode bridge after the power supply jack which allow you to power this board with both AC and DC power supply adapters. The input voltage could be anything within the range +7.5 – 15V DC or 6-12V AC.
Voltage regulator is made with LM317 adjustable voltage regulator and have jumper which selects what voltage you supply to the PIC microcontroller +3.3V or +5V, so you can work with PICs on both low and normal voltage.
The oscillator circuit is made with 20 Mhz crystal oscillator, so you can run your PIC at maximum performance.
The RESET circuit is made with simple RC circuit and RESET push button, the reason to not use RESET IC is that the board should support both 3.3V and 5V operation while RESET ICs are on fixed voltage.
PIC-P28 have user button for user input connected to PIC microcontroller’s RA5 port. When RA5 port is initialized as INPUT you will read “0” when the button is pressed and “1” when it is depressed.
Status LED is connected via jumper to PIC microcontroller’s RA0 port. When your RA0 port is initialized as OUTPUT and set to “0” LED will go ON, when RA0 port is set to “1” LED will go OFF.
PIC-P28 have handy GND pin for connection to oscilloscope.
Page 2
Page 3
FEATURES:
ICSP/ICD connector for programming and debugging
RS232 interface with MAX232 IC on socket
DIL28 microcontroller socket
Quartz crystal 20Mhz
LED to RA0 through jumper
user Button to RA5
Reset button and circuit
Power plug-in jack, accept AC and DC input
selectable +3.3V / +5V power supply voltage regulator (3.3V when jumper is
closed)
Extension slot on every uC pin
Gird 100 mils
GND bus
Vcc bus
Four mounting holes 3,3 mm (0,13")
FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print
Dimensions 100x80 mm (3,9x3,15")
Page 4
SCHEMATIC:
ICSP
12345
D1
1N4004
C11
6
100n
18
15
16
26
28
24
PGC/RB627PGD/RB7
PGM/RB3
20
VDD
17
21
RB122RB223RB425RB5
TX/RC6
RX/RC7
INT/RB0
SDO/RC5
SDI/SDA/RC4
8
VSS
19
PIC28p in
VR
+5V
LM317
G1
IN OUT
240/1%
R4
ADJ
B-DIL
C7
100uF/16VDC
C8
100n
390/1%
R3
C6
U1
1
R2
10K
NA
C12
R1
7
330
RA0/AN02RA1/AN13RA2/AN24RA3/AN35RA4/T0CKI6RA5/AN4
MCLR#/THV
OSC1/CLKIN9OSC2/CLKOUT
10
Q1
4-20MHz
RC0/T1OSO11RC1/T1OSI12RC2/CCP113RC3/SCL/SCK
14
RST
LED
22p
C9
22p
C10
LED_J
+5V
PIC-P28
Rev. D
COPYRIGHT(C) 2008, Olimex Ltd.
http://www.o limex.co m/de v
10k
R6
BUT
TX
RX
CTS
4.7uF/25VDC
3.3V
C4
1
330/1%
R5
C1+
U2
V+2V-
C1
470uF/16VDC
+5V
4.7uF/25VDC
C3
3
4
5
12
9
11
10
C1-
C2-
C2+
T1IN
T2IN
R1OUT
R2OUT
R1IN
R2IN
T1OUT
T2OUT
8
6
7
13
14
C2
RTS/DTR
1516
GNDVCC
U2P
MAX232
J1
C5
+5V
123
4.7uF/25VDC
12-RTS
23-DTR
4.7uF/25VDC
6VAC
PWR
9VDC
4.7uF/25VDC
12345
RS232
678
9
Page 5
SOFTWARE:
DEMO1: PIC16F876-I/P BLINK LED
This is demo code which blinks the LED on PIC-P28 board.
Note:
LED jumper should be closed!
DEMO2: PIC16F876-I/P BUTTON read
This is demo code which show how to read BUTTON status and to switch the LED ON when button is pressed and LED off when the button is depressed.
DEMO3: PIC16F876-I/P RS232 send / receive routines
This is demo code, which show how to use the USART to send and receive characters from host PC via RS232 cable.
The MAX232 by default is not connected to PIC on the board so you have to solder two wires – one from RC6 (pin #17) of PIC16F876 Tx signal to MAX232 Rx labeled pin, and second from RC7 (pin #18) of PIC16F876 Rx signal to MAX232 Tx labeled pin.
You must program the HEX code to PIC16F876 and run the code.
If you programmed the PIC correctly and wired the UART, when you open Hyperterminal on your host PC computer with 9600 bps, 8 data bit, 1 stop bit, No flow control and apply power supply to the PIC-P28 every character you type on the hyperterminal will be printed back with “*” i.e. if you type “abc” you will receive “a*b*c*”.
Page 6
ORDER CODE:
PIC-P28 – assembled and tested (no kit, no soldering required) PIC-P28/PCB – blank PCBs only
How to order? You can order to us directly or by any of our distributors. Check our web www.olimex.com/dev
Revision history:
REV. D - create February 2008
for more info.
Page 7
Disclaimer: © 2008 Olime x Ltd. All r ights rese rved. Olim ex®, logo and combinati ons thereof, are registered trademarks of
Olimex Ltd. Other terms and product names may be trademarks of others. The information in this document is provided in connection with Olimex products. No license, express or implied
or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Olimex products.
Neither the whole nor any part of th e information contained in or the product described in this document may be adapted or reproduced in any material from except with the prior written permission of the copyright holder.
The product described in this document is subject to continuous development and improvements. All particulars of the product and its use contained in this document are given by OLIMEX in good faith. However all warranties implied or e xpressed including but not limited t o implied warranties of merchantability or fitness fo r purpose are excluded.
This document is intended onl y to assist t he reader in the use of the product. O LIMEX Ltd. shall not be liable for any loss or damage a rising from the use of any information in this document or any error or omission in such information or any incorrect use of the product.
Page 8
Loading...