PIC Evaluation/Development Board...

27
PIC Evaluation/Development Board Implementation Team Dec02-12 Project Design Report April 23, 2002 Client: ECPE Senior Design Faculty Advisors: Dr. Rover & Dr. Weber Team Members: Chad Berg, Luke Bishop, Tyson Stichka, Nicholas Veys

Transcript of PIC Evaluation/Development Board...

Page 1: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

PIC Evaluation/Development Board Implementation

Team Dec02-12

Project Design Report April 23, 2002

Client: ECPE Senior Design

Faculty Advisors: Dr. Rover & Dr. Weber

Team Members:

Chad Berg, Luke Bishop, Tyson Stichka, Nicholas Veys

Page 2: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

i

Table of Contents Table of Contents ..................................................................................... i List of Figures ......................................................................................... ii List of Tables ......................................................................................... iii Abstract.................................................................................................. 1 Acknowledgement ................................................................................... 2 Definition of Terms.................................................................................. 3 1. Introduction ........................................................................................ 4

1.1 General Background........................................................................ 4 1.2 Technical Problem........................................................................... 4 1.3 Operating Environment.................................................................... 4 1.4 Intended Users & Uses .................................................................... 4 1.5 Assumptions & Limitations ............................................................... 5

2. Design Requirements ........................................................................... 6 2.1 Design Objectives ........................................................................... 6 2.2 Functional Requirements.................................................................. 6 2.3 Design Constraints .......................................................................... 7 2.4 Measurable Milestones ..................................................................... 7

3. End-Product Description ....................................................................... 8 4. Approach and Design ........................................................................... 9

4.1 Technical Approaches ...................................................................... 9 4.2 Technical Design............................................................................. 9 4.3 Testing Description ....................................................................... 14 4.4 Risks and Risk Management ........................................................... 16 4.5 Recommendations for Continued Work............................................ 16

5. Budgets ............................................................................................ 17 5.1 Financial Budget ........................................................................... 17 5.2 Personal Budget............................................................................ 17 5.3 Project Schedule ........................................................................... 17 6.1 Project Team Information .............................................................. 22 6.2 Summary ..................................................................................... 22 6.3 References ................................................................................... 23 6.4 Appendices................................................................................... 23

Page 3: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

ii

List of Figures Figure 4.2.1 – Internal Device Block Diagram............................................... 10 Figure 4.2.2 – PIC Pin Schematics............................................................... 11 Figure 4.2.3 – Input Device Schematics ....................................................... 12 Figure 4.2.4 – I/O Schematics .................................................................... 12 Figure 4.2.5 – Output Device Schematics ..................................................... 13 Figure 4.2.6 – Programmer Layout.............................................................. 13 Figure 4.2.6 – Power System Schematics ..................................................... 14 Figure 4.2.2 – PIC Programmer Schematic................................................... 15 Figure 4.2.3 – Power Supply Schematic ....................................................... 16 Figure 5.3.1 – Original Gantt Chart, Spring 2002 Semester ............................ 18 Figure 5.3.2 – Revised Gantt Chart, Spring 2002 Semester ............................ 19 Figure 5.3.3 – Original Gantt Chart, Fall 2002 Semester................................. 20 Figure 5.3.4 – Revised Gantt Chart, Fall 2002 Semester ................................ 21

Page 4: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

iii

List of Tables Table 5.1 – Financial Budget ...................................................................... 17 Table 5.2 – Personal Effort Budget.............................................................. 17 Table 6.1.1 – Team Members..................................................................... 22 Table 6.1.2 – Faculty Advisors.................................................................... 22

Page 5: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

1

Abstract The objective of this project is to produce a PIC evaluation/development board to be used by future ECPE senior design project teams. Many project implementations call for some sort of microcontroller unit in the final product, and this need can often be met by a simple PIC microcontroller. However, the development of a PIC solution is often beyond the expertise and available time of the design team. The board to be produced by this project will enable design teams to quickly and easily develop a PIC for use in their projects. The board will include a wide variety of input and output devices and interfacing ports. It will also be designed to provide a high degree of flexibility, giving future design teams the needed functionality to produce a successful end product.

Page 6: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

2

Acknowledgement Special thanks are due to our faculty advisors, Dr. Diane Rover and Dr. Robert Weber. They have provided valuable advice and insight, and continue to play an active role in enabling the development of this project to its maximum potential.

Page 7: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

3

Definition of Terms

• PIC – Peripheral Integrated Controller. High speed, low cost, and programmable in C.

• ZIF – Zero insertion force. ZIF sockets are locking mounts for electronic circuits or chips that allow them to be changed easily with little chance of damaging the fragile pins. The socket has a lever or some mechanism that can tighten the socket's connection on the pins, which makes insertion and removal far easier than standard chip sockets.

Page 8: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

4

1. Introduction

1.1 General Background Many senior design and other class design projects within the computer and electrical engineering department require a micro controller unit (MCU). However, before they can be used in a design project, these units require additional components and design, often beyond the expertise or time available within a design team. The objective of this project is to design and fabricate an evaluation/development board for a PIC, which will provide the required power supply, frequency source, and other supporting components needed to realize a fully functional, low cost, “off-the-shelf” MCU for use in future senior design projects. Having such units readily available will allow senior design teams to concentrate on completing their assigned design rather than expending time and effort on supplementary components. Full documentation will include tutorials and design guides for using the PICs in various applications.

1.2 Technical Problem In order to implement a development board for a PIC, there are several components which must be designed to work together. The components used will provide a design team with flexibility of use which will allow the board to be used in varying applications. Necessary apparatus includes the microcontroller unit (MCU), and one or more of the interfacing components. The PIC evaluation/development board will include an LCD display, general purpose output LEDs, a bar graph LED, 7-segment displays, a RS232 port for serial PC interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared transceiver, analog and digital thermal sensors, and an Ethernet module. These devices will allow the board to be quite versatile. The PIC programmer will also be included on the board for quick and easy programming.

1.3 Operating Environment Because this product is designed to be used as a “stepping stone” in future senior design projects, an exact operating environment is unknown. However, it is preferable for the board to be functional in as wide of a range of environments as possible to allow the most flexibility. The operational range will be temperatures of 0° - 60°C and 0 - 90% humidity.

1.4 Intended Users & Uses The PIC evaluation/development board will be built for use by people with experience with electrical and computer engineering. More specifically, this

Page 9: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

5

board is intended to be used by students in future senior design projects. Other users of this product could include faculty members, as well as undergraduate students in a lab environment. The very design of this board allows for a variety of uses. These uses could include, but are not limited to: data acquisition, control, or information processing.

1.5 Assumptions & Limitations The following assumptions and limitations impact the implementation of the project. Assumptions:

• Users have an electrical/computer engineering background. • Users have access to a personal computer with a free parallel port (for

programming the PIC). Limitations:

• Budget of one hundred dollars. • Typical PCB fabrication uses 12”x12” boards. Therefore the layout at a

maximum must fit that constraint. The board will be constructed to be smaller than a standard sheet of paper (8½”x11”).

• Environmental factors – The board will only be able to operate in a “normal” environment. This consists of no abnormal EMI fields, no water and no extreme temperatures (outside of the operating ranges of the components).

• The on-board programmer will have a separate socket than those for normal operation. Therefore, the user will have to move the PIC back and forth between the two sockets for programming and normal operation.

Page 10: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

6

2. Design Requirements

2.1 Design Objectives • Support for multiple PICs – The board will support the following PIC

models: 16F628, 16F876 and 16F877. Three different ZIF sockets will be provided for the different supported pin counts.

• Versatile – The PIC evaluation and development board will be useful in a

wide variety of applications. The board will be designed with jumpers and DIP switches to allow the user to interface the PIC with any of the components on the board.

• Programmer – The board will include a PIC16 programmer with a 40-pin

ZIF socket, as well as the software required to develop and upload the program to the PIC.

• Multiple output devices – The board will include a character LCD

display, eight general purpose LEDs, bar graph LED, a 4-digit 7-segment display, and a piezo buzzer.

• Input capabilities – The user will be able to give input to the PIC with a

matrix keypad, several on-off push buttons, and digital and analog temperature sensors.

• Interfacing capabilities – The board will have the capability to

interface with other devices via an RS-232 serial port, an infrared transceiver, and an Ethernet module.

2.2 Functional Requirements • Provide solutions for a variety of applications – The user will be

able to program (and reprogram) his or her selected PIC using the integrated PIC16 programmer. Once programmed, the PIC can be transferred to one of the available ZIF sockets for normal operation.

• Allow development of several PICs – The user will be able to design a

system with any of a number of selected models (given above in Design Objectives) of Flash re-programmable PICs – 18-, 28-, and 40-pin models. The ZIF sockets will provide the capability to swap PICs quickly and easily.

• User-friendly design environment – The board will be packaged with

a simple design environment for programming and testing. The prototyping environment will include a number of ASM libraries to support the board’s devices.

Page 11: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

7

• Well-documented – The package will include extensive documentation, including tutorials and design guides, so that the user will be able to quickly adapt the board to any application.

2.3 Design Constraints • Cost – Care must be taken to limit the cost of the board components as

well as the complexity of the design, both to meet the budget of the team and to ensure that future design project teams will be able to use the board within the means of their budget.

• Environment – Because this board is being designed to accommodate

unknown future projects, it must be designed to operate in a wide range of environmental conditions. The possible operating range will be defined as 0° – 60°C and 0 – 90% humidity.

• Size – The board must be small enough to be practical for most

applications, without sacrificing versatility. The board will be constructed to be smaller than a standard sheet of paper (8½”x11”).

• EMI – The board layout must be designed to limit the effects of

electromagnetic interference. Excessive EMI can have serious negative effects on the operation of the board.

• Simplicity – The board will be designed in a way that allows the user to

fully understand its layout and operation. This constraint will allow each group to use this prototyping board to design a functional end product.

2.4 Measurable Milestones • Complete project definition • Subsystems designed • Board layout completed and simulated • 50% of peripheral subsystems prototyped and tested • 100% of peripheral subsystems prototyped and tested • Prototype board assembled • Programming environment developed • All supported PICs tested successfully • ASM libraries developed • Full documentation written and user-tested • Sample code for every module written • Final board operational

Page 12: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

8

3. End-Product Description This product is being developed for use in future senior design classes. As a result, the board is being designed with a several common uses in mind; therefore, many different peripheral devices will be available along with support for several different microcontrollers. The board will also have sockets for each part included to allow ease in switching parts when one or more parts has failed. In addition, the board also will be designed simply so that the user will be able to easily understand the layout and operation.

Page 13: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

9

4. Approach and Design

4.1 Technical Approaches Components have been chosen based on simplicity and functionality. They were also chosen based on what may be used in future senior design projects. After the parts were chosen, a board layout was made. Using schematic capture software, the design was drawn. From this a PCB layout was drawn, and traces routed. Once parts are obtained, each device will be prototyped and tested on the bench to ensure its proper operation under the required constraints. The PCB will then be fabricated, and the prototype board assembled. Example software and thorough documentation will accompany each peripheral device in order to speed the development process for the end user.

4.2 Technical Design

• The board will contain a PIC16 programmer with a 40-pin ZIF socket. This will be based on an open standard with easily obtainable software for the programming.

• Three ZIF sockets – 18-, 28- and 40-pin – will be provided to mount the desired PIC for normal board operation.

• A 16x2, HD44780-compatible character LCD display will provide the user

with a means of simple text output over a serial connection. • A block of four 7-segment displays will provide the user with another

means of text-like output, controlled either directly, or by a MAX7221 7-segment display controller which communications via an SPI connection.

• A byte-long segment of LEDs will allow simple debugging and visual general purpose outputs for the user.

• An LED bar-graph will allow for a similar effect, but in one solid common-anode device.

• A piezoelectric or other type of speaker will allow audio feedback.

• A matrix keypad will allow easy input via a scan-and-check interface.

• Several momentary (on)-off push buttons will give the option of simple user input.

Page 14: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

10

• To read environment information, two thermal sensors will be added; outputting analog voltages calibrated in both degrees Fahrenheit (LM34) and Centigrade (LM35).

• A MAX232 RS-232 transceiver will allow true RS-232 communication for

interfacing with terminal devices.

• An infrared receiver and transmitter will be integrated, to allow simple wireless communication.

• An Ethernet module from EmbeddedEthernet.com will be used to provide 10BaseT Ethernet connectivity.

IRModule

IRModule

RS-232Transceiver

RS-232Transceiver

EthernetControllerEthernetController

ProgrammerModule

ProgrammerModule

CharacterLCD

Display

CharacterLCD

Display

LEDs7-Segment

Displays

LEDs7-Segment

Displays

SpeakerSpeaker

TemperatureSensor

TemperatureSensor

MatrixKeypadMatrix

Keypad

PICPIC

IRModule

IRModule

RS-232Transceiver

RS-232Transceiver

EthernetControllerEthernetController

ProgrammerModule

ProgrammerModule

CharacterLCD

Display

CharacterLCD

Display

LEDs7-Segment

Displays

LEDs7-Segment

Displays

SpeakerSpeaker

TemperatureSensor

TemperatureSensor

MatrixKeypadMatrix

Keypad

PICPIC

Figure 4.2.1 – Internal Device Block Diagram

Page 15: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

11

Figure 4.2.2 – PIC Pin Schematics

Page 16: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

12

Figure 4.2.3 – Input Device Schematics

Figure 4.2.4 – I/O Schematics

Page 17: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

13

Figure 4.2.5 – Output Device Schematics

Figure 4.2.6 – Programmer Layout

Page 18: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

14

4.3 Testing Description

The first level of testing will be simulation of the layout to ensure that it meets timing and EMI susceptibility constraints. The layout will be accepted if it is able to operate without failure at a maximum speed of 20MHz, at the required temperature extremes, and at a reasonable level of EMI as might be found in any normal operating environment. Device testing will occur on a component-level basis. Each subsystem will prototyped on solder-less breadboard and tested at the bench to ensure it meets timing, temperature, humidity, and EMI constraints. Several devices will also need to meet additional specific requirements. For example, the infrared transceiver must be able to transmit and receive signals at a range of ten feet. Only after each device has been determined to meet these requirements will it be added to the final product. After all devices have been properly tested, they will be added to the fabricated PCB. The board will then be thoroughly tested to ensure that it meets the final operating constraints of timing, temperature, humidity, and EMI susceptibility. In addition, each device on the board will be tested once again to ensure that all requirements are still met. Finally, all sample code that is written will be tested to ensure that it functions properly. The code and documentation will also be user-tested by people outside of the design team to improve on the usability of the resources that are developed.

Figure 4.2.6 – Power System Schematics

Page 19: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

15

Figure 4.2.2 – PIC Programmer Schematic

Page 20: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

16

4.4 Risks and Risk Management Several risks exist in this project. Loss of a team member is quite high on the list; it is not anticipated, but possible. To manage this, all duties will be delegated as evenly as possible, but a backup plan will be retained in the event that one member cannot fulfill his duty for a time. Due to the existence of several very different peripheral devices on the same board, the possibility of a device failure is quite high. To counteract the damage possible by this risk, all devices will be placed on the final product in a socket-like device, allowing a damaged chip to be easily replaced. Another possible risk is that our board will suffer from problems with noise, crosstalk, and other types of electromagnetic interference. These problems could even render the board inoperable. Dr. Weber, one of the faculty advisors for this project, has a great deal of expertise in this area. He has reviewed the layout of the board and made suggestions to minimize the risk of EMI.

4.5 Recommendations for Continued Work This project should be fully realizable as described in this design report. This project is intended to be completed as designed within the upcoming semester.

Figure 4.2.3 – Power Supply Schematic

Page 21: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

17

5. Budgets

5.1 Financial Budget

Table 5.1 – Financial Budget Item Original Estimated Cost Revised Estimated Cost Electronic Components $30 $30 Serial Character LCD Display $30 $30 Dual-Layer PCB $70 $70 Power Supply $6 $6 PIC Microcontrollers $20 $20 Poster $15 $80 Ethernet Module $0 $70 Total $171 $306

Component companies’ sample programs will help keep the cost of components low. Plans have also been made to pursue possible donations to further reduce the price of the project. If the project proves useful to the ECPE department, plans on pursuing the possibility of additional funds to produce more, or perhaps simply better boards will be undertaken. Costs for the poster were paid for out of pocket.

5.2 Personal Budget

Table 5.2 – Personal Effort Budget Team Member Team Layout Programming Total Effort Chad Berg 64 20 45 129 Hours Luke Bishop 80 20 40 140 Hours Tyson Stichka 64 40 22 126 Hours Nicholas Veys 64 30 40 134 Hours Totals 272 104 147 529 Hours

Each team member will contribute significantly to all parts of the project. However, certain phases of development and planning will be assigned to those with more experience in that particular area.

5.3 Project Schedule The project schedule has been broken down into two Gantt charts, one for each semester. The original predicted schedule and revised project schedules have been included. All major milestones and deliverables are included on the charts. In addition, dependencies among items have been included.

Page 22: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

18

Figure 5.3.1 – Original Gantt Chart, Spring 2002 Semester

Page 23: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

19

Figure 5.3.2 – Revised Gantt Chart, Spring 2002 Semester

Page 24: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

20

Figure 5.3.3 – Original Gantt Chart, Fall 2002 Semester

Page 25: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

21

Figure 5.3.4 – Revised Gantt Chart, Fall 2002 Semester

Page 26: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

22

6. Closure Material

6.1 Project Team Information Team Members:

Table 6.1.1 – Team Members Chad Berg 4912 Mortensen Road, Apt. 1112 Ames, Iowa 50014 Phone: 515-268-4327 Email: [email protected] Computer Engineering

Luke Bishop 4912 Mortensen Road, Apt. 1112 Ames, Iowa 50014 Phone: 515-268-4327 Email: [email protected] Computer Engineering

Tyson Stichka 311 Ash Avenue Ames, Iowa 50014 Phone: 515-292-3917 Email: [email protected] Electrical Engineering

Nicholas Veys 2206 Friley Pearson Ames, Iowa 50012 Phone: 515-572-5231 Email: [email protected] Computer Engineering/Science

Faculty Advisors:

Table 6.1.2 – Faculty Advisors Robert Weber 301 Durham Ames, Iowa 50011-2252 Phone: 515-294-8723 Fax: 515-294-1152 Email: [email protected] Electrical & Computer Engineering

Diane Rover 2215 Coover Ames, Iowa 50011-3060 Phone: 515-294-7454 Email: [email protected] Electrical & Computer Engineering

Client: ECPE Senior Design

6.2 Summary Providing the Electrical and Computer Engineering Department at Iowa State University with a flexible and competent PIC development solution is important for future senior design students. It will allow them to focus on developing more complex systems, which will help prepare them for future careers. Including a flexible interface as well as multiple devices will allow this implementation of the PIC evaluation/development board to serve the needs of many students in years to come.

Page 27: PIC Evaluation/Development Board Implementationseniord.ece.iastate.edu/projects/archive/dec0212/design...interfacing, a matrix keypad, a piezo buzzer, several push buttons, an infrared

23

6.3 References The following websites included information which was used in the development of the project plan: Planet Microchip http://www.microchip.com Maxim Integrated Products http://www.maxim-ic.com Fairchild Semiconductor http://www.fairchildsemi.com National Semiconductor http://www.national.com Philips Electronics http://www.philips.com ON Semiconductor http://www.onsemi.com P16PRO & PICALL PIC Programmer http://www.picallw.com

6.4 Appendices The following datasheets have been attached for reference purposes: • Microchip PIC16F87X Feature Reference Sheet • Microchip PIC16F62X Feature Reference Sheet