HP488 30 3
HP488 30 3
Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. About this document.................................................................................................................................................................. 2 General information................................................................................................................................................................... 3 Board layout .............................................................................................................................................................................. 6 Testing this product ................................................................................................................................................................... 7 Circuit description ................................................................................................................................................................... 10 PICmicro microcontroller pin out details ................................................................................................................................ 14 Bus connections and jumpers .................................................................................................................................................. 15 Liquid Crystal Display............................................................................................................................................................. 18 Sensors..................................................................................................................................................................................... 20 Appendix 1 Circuit Diagram
page 1
3. Disclaimer
The information in this document is correct at the time of going to press. Matrix Multimedia reserves the right to change specifications from time to time. This product is for development purposes only and should not be used for any life-critical application.
4. Technical support
If you have any problems operating this product then please refer to the troubleshooting section of this document first. You will find the latest software updates, FAQs and other information on our web site: www.matrixmultimedia.com . If you still have problems please email us at: [email protected].
page 2
2. General information
1. Description
This flexible development board is an ideal platform for learning and project development.The board will program a range of 8, 14, 18, 28 and 40 pin PICmicro microcontroller devices from the 12, 16 and 18 series PICmicro range. The board is programmed using the USB port (from which it can also take power) and is supplied with a comprehensive programming utility - PPP. The board is ideal for using in conjunction with one of our 3 PICmicro CD ROM resources to help learn PICmicro programming using flow charts, C or assembly code. The board can program Low Voltage Programmable PICmicro MCUs and deliver a limited amount of power using only the USB supply, but we recommend that an external power supply (product code HPPSU2) is used to take maximum advantage of the board's features. The board is compatible with our range of E-blocks modules which contain circuitry for a wide range of functions - from simple switches and LEDs, through to internet servers, and Bluetooth transceivers. The board is also compatible with Microchip's In Circuit Debugging 2 system.
2. Features
Makes it easier to teach and learn PICmicro programming o Designed for educational use o 3 CD ROM based resources in assembly, C, and flow chart programming are available o Free download software, PPP, provides seamless send and verify functions Makes it easier to develop PICmicro projects o Supports low cost Flash-programmable PICmicro devices o Fully featured displays - 16 individual LEDs, quad 7-segment display and LCD display o USB programmer o Supports PICmicro microcontrollers with A/D converters o On-board sensors o A comprehensive range of external analogue and digital sensors are available for project work o Fully protected expansion bus for project work o All inputs and outputs available on screw terminal connectors for easy connection o E-Blocks compatible with 2 E-Blocks connectors fitted to ports C and D Low cost Used as a programmer and as a development board Programs a wide range of PICmicro MCU devices Full suite of programming software available RC or Xtal operation In-Circuit Debugging via MPLAB ICD2
page 3
4. Block schematic
S2
RC slow Xtal fast
VBUS
Programming Circuity
Read/Write LED
RB3 RB4 LVP prog. Selection RB5
Unregulated supply
2 way screw term
-ve
2.1mm DC Jack
+ve
regulation 0V 5V PSU
Clock circuit
audio out
1 [RA0]
PIC devices
[R A0 - RA4]
I C D
U S B
analogue inputs
Vernier sensor light trimmer
Ana RA0 RA1 RA2 RA3 Dig
Port A
Port B
push switches
push switches
SA7
SA6
SA5
SA4
SA3
SA2
SA1
SB7
SB6
SB5
SB4
SB3
SB2
SB1
SB0
LEDs LEDs
LA7 LA6 LA5 LA4 LA3 LA2 LA1 LA0 LB7 LB6 LB5 LB4 LB3 LB2 LB1 LB0
page 4
5. Supported devices
Currently PPP and the HP488 support the following devices:
PIC12F629, PIC12F675, PIC12F635, PIC12F683 PIC16F627A, PIC16F627, PIC16F628A, PIC16F628, PIC16F630, PIC16F648A, PIC16F676, PIC16F684, PIC16F688, PIC16F636, PIC16F716, PIC16F72, PIC16F737, PIC16F73, PIC16F747, PIC16F74, PIC16F767, PIC16F76, PIC16F777, PIC16F77, PIC16F818, PIC16F819, PIC16F83, PIC16F84A, PIC16F84, PIC16F870, PIC16F871, PIC16F872, PIC16F873A, PIC16F873, PIC16F874A, PIC16F874, PIC16F876A, PIC16F876, PIC16F877A, PIC16F877, PIC16F87, PIC16F88 PIC18F242, PIC18F248, PIC18F252, PIC18F258, PIC18F442, PIC18F448, PIC18F452, PIC18F458, PIC18F1220, PIC18F1320, PIC18F2220, PIC18F2320, PIC18F2331, PIC18F2410, PIC18F2420, PIC18F2431, PIC18F2439, PIC18F2455, PIC18F2510, PIC18F2515, PIC18F2520, PIC18F2525, PIC18F2539, PIC18F2550, PIC18F2585, PIC18F2586, PIC18F2610, PIC18F2620, PIC18F2680, PIC18F2681, PIC18F4220, PIC18F4320, PIC18F4331, PIC18F4410, PIC18F4420, PIC18F4431, PIC18F4439, PIC18F4455, PIC18F4510, PIC18F4515, PIC18F4520, PIC18F4525, PIC18F4539, PIC18F4550, PIC18F4585, PIC18F4586, PIC18F4610, PIC18F4620, PIC18F4680, PIC18F4681
page 5
3. Board layout
HP488-74-3.cdr 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. Power supply connector 5V outputs for E-blocks connection USB connector Single bit audio output E-blocks connectors for ports C and D Reset switch Power selector link blockUSB or Power connector USB interface chip 2 line 16 character alphanumeric display Screw terminal connectors for port B In Circuit Debug socket ICD/USB programming selection Screw terminal connectors for port A RC speed potentiometer Oscillator mode selection switches Removable crystal Sockets for programming 8, 14, 18, 28 and 40 pin PICmicro devices On-board light sensor Quad 7-segment displays Analogue input potentiometer External analogue sensor input External digital sensor input Port A switches and LEDs Port B switches and LEDs Power indicator Programming indicator LVP pin selector Port A analogue/ digital selector
Digital sensor selector LCD display LVP mode selector 7-segment display enable Expansion bus LCD enable
page 6
1. installing PPP
To install run PPPv3.exe, which is located at <D>:\PPPv3\PPPv3.exe and follow the instructions provided. <D>
f_test_1.hex
page 7
SetHardware Set-up
Set up development board with: HP488 Options Power supply PICmicro device S4 (Fast/Slow) S2 (RC/Xtal) Xtal frequency Port C Port D Test program
1)
f_test_2.hex
Ensure power is supplied to the board 1. USB cable required 2) Set Jumper J29 to USB 3) Ensure Jumper J20 set to USB 4) Send the test program to the board using PPP 5) Check the illumination of all Port A and B LEDs
Note
If the chip has been set to high voltage programming then the board will require a high voltage to re-enable the LVP. This must be done before attempting to program in LVP however when shipped the chip is already configured in LVP.
Then the PPP will indicate that the chip has not been erased. There is no point in continue to try to program the PICmicro.
page 9
5. Circuit description
The PICmicro development board is designed for learning how to program PICmicro applications in educational and industrial context. It also allows a wide range of PICmicro microcontrollers to be programmed and the seamless nature of the programming software supplied with the product (PPP) makes it suitable for the development of a range of PICmicro projects. The board is optimised for use with a PIC16F88 from Arizona Microchip, which has a number of features: Crystal or RC operation 2 ports: Port A - 5 pins and Port B - 8 pins i.e.: 15 programmable pins that can all be used as inputs and outputs. Flash programmable - up to 1,000,000 programming cycles On-board A/D, internal clock, internal USART and a host of other functions and features The PIC16F88 has analogue capability and is a very functional PICmicro. It has been selected for use with this development board for a number of reasons: It is a low cost device - suitable for project work in schools It is electrically re-programmable Features are up-ward compatible with larger chips such as the PIC16F877A A full list of other PICmicros that the board can support is listed below. The board has been designed to allow those with little or no experience of embedded microcontroller programming to be able to produce highly functional designs in as short a time as possible. With this in mind we have included switches on port A and B input/output pins, a quad 7-segment display, a 2 line 16 character alphanumeric display, a choice of crystal or RC oscillator, simple on-board analogue sensor (light) and sensor simulator (potentiometer) and the ability to interface the board to a host of external sensors including motion, temperature, pH. humidity etc. Ports A and B are also connected to screw terminals on the sides of the board via 150ohm resistors which protect the device on the board itself. The board can be used with ZIF sockets if required: please bear in mind that you may need to insert one or more turned pin DIL sockets to raise the height of some ZIF sockets to clear surrounding components. Full tutorials in programming the PICmicro in Assembly code, C, and flowcharts are available. These sets of tutorials are available on CD ROM and require no other software - all compilers and development environments are included on the CDs themselves.
2. Port A bus
Under normal operation all of the jumper links in the J14 link block are in the Digital position. This means that the Port A I/O pins are routed to the push switches and LEDs. The actual circuit is described in the Circuits section. Note that operating the push switches whilst a voltage is connected to port A via the external screw terminals is not advisable, as it will result in unpredictable results. Port A screw terminal connectors are fed to the pins on the PICmicro via 150 ohm resistors which provide short circuit protection.
page 10
With J14 links in the Digital position port A is routed to its push switches (SA0 to SA7), LEDs, digital Vernier sensor I/O, and the quad 7-segment display. Bits RA0, RA1, RA2 and RA3 are used for the common anodes of each of the four 7-segment displays. RA0 is used for tone generation via the jack plug, and bit RA2 is used for the digital Vernier sensor input. With J14 links in the Analogue position port A is switched to the analogue sensor section of the board. This means that RA0 is connected to the on-board light sensor, RA1 is connected to the potentiometer resistor to form an adjustable voltage divider for sensor simulation, and bit RA3 is connected to the external analogue Vernier sensor connector. With J14 links in the Analogue position you should be aware that on-board switches and LEDs RA0-3 will not operate. If you want to use the external port A screw terminal connectors for analogue inputs you should remove the links off J14 altogether. Note that links can be set individually so that RA0 could be used in analogue mode and the rest in digital mode.
3. Port B Bus
Port B I/O pins are routed to its push switches (SB0 to SB7), the LEDs (LB0 to LB7), the quad 7-segment displays, the LCD display and the screw terminal connectors. Note that the screw terminal connectors are fed to the pins on the PICmicro via 150ohm resistors, which provide short circuit protection. However operating the push switches whilst a voltage is connected to Port B is not advisable as it will result in unpredictable results. Port B is also used for programming the PICmicro - the PPP software used for programming the PICmicro will automatically take over pins required for programming, verifying and resetting the PICmicro on the board. If you are using the board in LVP mode then B3 (or B4 or B5 for some chips) may not be used as an I/O line.
4. Port C & D E-Block Bus Connection EPorts C and D of the PICmicro MCU are fed out onto 9 way D-type connectors at the back of the board. These can be used to add one of a wide range of E-blocks boards to the development board. E-blocks vary from simple LED and switch boards through to more complex subassemblies like Bluetooth boards, CAN bus, internet boards, IrDA transceivers etc. The addition of E-blocks boards allows you to considerably expand the functionality of your system to develop a very wide range of electronic systems.
6. Clock circuitry
During early stages of learning PICmicro programming students often want each clock cycle to be large (1 second) so that they can see code executing very slowly (flashing LEDs dont simply become less bright LEDs). The PIC16F88 supports this feature by having an RC mode of operation. Use of RC mode also reduces component count and cost for small projects. S2 selects between RC mode and Crystal mode. S4 selects fast or slow operation when RC mode is selected. RV1 adjusts the speed of the clock within a range dictated by S4.
page 11
However more advanced students require a faster clock speed, for setting up parameter such as the LCD module. Therefore the board is supplied with a 19.6608MHz crystal. The crystal is supplied mounted in ultra low profile sockets allowing the crystal to be changed.
When using the 13.5V regulated power supply the board will only supply up to 250mA. This is due to the thermal dynamics of the on board regulator. Therefore if more current is required the DC supply voltage must be reduced to 8 9V and LVP mode must be used.
Remember that other E-blocks will have to receive 5V by placing a connecting wire from the +V Out screw terminal of the Multiprogrammer to the +V screw terminal of each E-Block that requires a voltage.
8. Displays
The LCD display is connected to Port B I/O. The LCD display is turned on by switch S5. The quad 7-segment display is connected to both Port A and Port B. Port B is used to control each of the 8 segments (7 for the main character and 1 for the full stop). Port A bits 0 to 3 are used to select each of the 4 characters. The quad 7-segment display is turned on by switch S3. Note that turning on the display will affect the operation of Port B I/O and when using the quad 7-segment displays it is recommended that you do not use Port B for any other purposes. Under certain circumstances you will notice that segments of the quad 7-segment display may be lit up very dimly by Port A/B operation even when S3 is in the off position. This is a feature of the low cost driver circuitry and is unavoidable. The jumpers J19 and 20 can be used to select alternative pins for the LCD where Low Voltage Programming is required. J19 selects D7 for the LCD from RB3 (default) or RB6. J20 selects the RS pin for the LCD from RB5 (default) or RB7. Due to space constraints the LCD display can not be used with devices that require RB4 to be used as the LVP pin.
page 12
9. Microchip In-Circuit Debugger (ICD2) InThe board is compatible with the Microchip ICD2 in-circuit debugging tool. This allows the debugging of the actual hardware and the software program that is programmed onto the chip. The ICD2 allows the user to step through the program whilst it is actually programmed on the chip therefore allowing the hardware to be tested with the software. The ICD2 can also program the targeted chip as well. For more information regarding the ICD2 please visit the Microchip website: www.microchip.com The ICD2 for Microchip plugs directly into the ICD socket (J22) on the Development board. Jumper J20 must be moved to the left hand side of the pins, into the IDC2 position. This means that the ICD2 can now control the programming and the in-circuit debugging of the hardware. Note that the ICD2 has speed limitations and ifusing an ICD2 you should use a crystal of less than 5MHz. If using an ICD2 then the power must be applied to the ICD2 before power is applied to the development board.
page 13
1 2 3 4 18-pin PICmicro
8 7 6 5
Vss GP0/AN0 GP1/AN1/Vref GP2/TOCKI/AN2/INT Vdd RA5/T1CKI/OSC1/CLKIN RA4/T1G/OSC2/CKLOUT RA1/AN1 RA0/AN0 OSC1/CLKIN/RA7 OSC2/CLKOUT/RA6 Vdd RB7/T1OSI RB6/T1OSO/T1CKI RB5 RB4/PGM Vpp/ MCLR RA0/AN0 RA1/AN1 RA2/AN2/Vrl/Vref-
14 13 12 11 10 9 8
RA2/AN2/Vrefout RA3/AN3/CMP1/Vrefin RA4/T0CKI/CMP2 Vpp/RA5/THV/ MCLR Vss RB0/INT RB1/RX/DT RB2/TX/CK RB3/CCP1
1 2 3 4 5 6 7 8 9
18 17 16 15 14 13 12 11 10
28-pin PICmicro
Vpp/MCLR RA0/AN0 RA1/AN1 RA2/AN2/Vrl/VrefRA3/AN3/Vrh/Vref+ RA4/T0CKI RA5/AN4/SS/Avdd/Lvdin Vss OSC1/CLKI OSC2/CLKO/RA6 RC0/T1OSO/T1CKI RC1/T1OS/CCP2I RC2/CCP1 RC3/SKC/SCL
RA3/AN3/Vrh/Vref+ RB7/PGO RB6/PGC RB5 RB4 RB3/PGM/CCP2 RB2/INT2 RB1/INT1 RB0/INT Vdd Vss RC7/RX/DT RC6/TX/CK RC5/SDO/D+ RC4/SKI/SDA/DOSC2/CLKO/RA6 RC0/T1OSO/T1CKI RC1/T1OSI/CCP2 RC2/CCP1 RC3/SCK/SCL RD0/PSP0/C1IN+ RD1/PSP1/C1INRA4/T0CKI RA5/AN4/SS/Lvdin RE0/AN5/RD RE1/AN6/WR RE3/AN7/CS Avdd Avss OSC1/CLKI
1 2 3 4 5 6 7 8 9 10 11 12 13 14
28 27 26 25 24 23 22 21 20 19 18 17 16 15
page 14
11*
12* 13* 10 9 8 7 6 5
For the 18, 28, and 40 pin devices the buses on devices are largely upwards compatible pin connections on an 18pin device appear on a 28-pin device and a 40-pin device, and pins on a 28-pin device appear on a 40-pin device. This allows the 18, 28, and 40 pin DIL sockets to be connected in parallel with the PICmicro bus structure intact. * This parallel connection is not possible with 8 and 14 pin devices due to programming requirements which means that there are anomalies with the pin connections for the 8 and 14 pin devices as follows:
page 15
2. Connections on J5
Bus Name Vpp/MCLR VCCchip GND OCS1 OCS2 RA0/AN0 RA1/AN1 RA2 RA3/AN3 RA4/AN4 RA5 RB0 RB1 RB2 RB3 RB4 RB5 RB6 RB7 RC0 RC1 RC2 RC3 RC4 RC5 RC6 RC7 RD0 RD1 RD2 RD3 RD4 RD5 RD6 RD7 RE0/AN5 RE1/AN6 RE2/AN7 40 Pin 1 11 & 32 12 & 31 13 14 2 3 4 5 6 7 33 34 35 36 37 38 39 40 15 16 17 18 23 24 25 26 19 20 21 22 27 28 29 30 8 9 10 IDC connector 1 18 & 21 20 & 23 25 27 3 5 7 9 11 13 16 14 12 10 8 6 4 2 29 31 33 35 36 34 32 30 37 39 40 38 28 26 24 22 15 17 19
3. Connections on J24
Bus Name Vpp/MCLR VCCchip VCC IDC connector 1 21 & 22 29
page 16
page 17
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67
The LCD Module uses a Samsung KS0066U controller, which is similar to the Hitachi HD44780 controller. The PICmicro board uses port B [B0 to B5] to program the LCD, as shown in the circuit diagram below. When the PICmicro board is turned on, data can only be sent to it after 30ms, this is the time taken for the LCD to initialize [as it clears all the RAM and sets up the Entry Mode]. Default connections are:
LCD Module
Note that you can use J19 and J21 to alter RS and Enable respectively. To send a command to the LCD, data must be sent in two steps, the MSB followed by the LSB [byte is data on B0 to B3]. As each byte is sent to the LCD, B5 must be go high then low, for the LCD to acknowledge the byte. After the second byte has been acknowledged the LCD executes the command. The PICmicro board must wait for at least the length of the execution time for that command, before the next command can be sent. A timing diagram of this process is shown below.
The first command to be sent to the LCD must be Function Set [to setup the LCD], this is usually followed by Display Control and then Clear Display. According to Entry Mode Set after each character is sent to the LCD, the position of the cursor changes [by default it is incremented].
page 18
DDRAM is Display Data RAM DDRAM address is location of cursor CGRAM is Character Generator RAM X is Don t Care
0 Decrement cursor position No display shift Display off Cursor off Cursor blink off Move cursor Shift left
1 Increment cursor position Display shift Display on Cursor on Cursor blink on Shift display Shift right
Hint please look at our web site for examples of code that shows how to program the 7-segment display. (TEST40.ASM factory test routine.)
page 19
9. Sensors
To use an analogue sensor, the Development board must manually be set to analogue mode and an analogue-capable PIC must be used. Whilst in analogue mode certain port A pins [A0/RA0,A1/RA1 etc] are able to convert an analogue signal to an 8 or 10 bit digital signal, using the on-board A to D converter inside the PICmicro device. Please refer to Microchip data sheets for more details. The analogue sensors are not normally connected to the PICmicro pins but are switched to them under the control of the jumpers on J14. To use the external digital sensor please remove the link J1. A full list of the 40 sensors compatible with this board can be found at www.matrixmultimedia.com.
1. LDR
A compact cadmium sulphide light dependent resistor is soldered onto the development board. When J14 link RA0 is in the analogue position it is connected to A0 on the PICmicro microcontroller. The resistance of this device reduces as light falling on to it increases. Technical specification Dark resistance Resistance @ 10 Lux Peak spectral response
2. Potentiometer
Most passive sensors are based on a simple potential divider circuit. In order to get your code up and running as simply as possible it is therefore useful to have a simulation of the full operation range (0V to 5V) that a sensor might provide. This function is simulated by a simple 4k7 preset potentiometer (RV3) with a series 10k resistor, which produces a voltage in the range of 0V to 5V on RA1. Note that J14 / 1 will need to be in the analogue position to use this circuit. 5V
A1 10k
5k
page 20
3. Core sensors
We recommend that customers who want to introduce their students to sensors purchase a core set that will introduce students to different techniques and strategies of gathering real world data in both analogue and digital form. In brief these are:
Sensor Temperature probe Motion detector Heart rate monitor Photogate and pulley wheel Output/action Simple potential divider Gives out a digital pulse correlating to distance Gives out an analogue voltage pulse When IR light path is interrupted, digital output changes Coding strategy A/D conversion, calibration, value look up, display Active sensor, pulse time measurement, conversion and display Data slicing, and timing Various
page 21