Seattle University
  • Calendar
  • Site Index
  • Directories
  • Contact
  • Support SU
More Options
  • Report a Problem
  • Give Us Feedback
  • Search SU
  • Where do you need to go?
    • Academic Affairs
    • Professional and Continuing Education
    • Catalog
    • Diversity Statement
    • Global Learning
    • Core Curriculum
    • Health and Personal Wellness
    • Mission and Ministry
    • Nondiscrimination Policy
    • Summer Programs
    • Visit Campus
    • Facilities Services
    • Schools and Colleges
    • Albers School of Business and Economics
    • College of Arts and Sciences
    • College of Education
    • College of Nursing
    • College of Science and Engineering
    • Matteo Ricci College
    • School of Law
    • School of Theology and Ministry
    • Departments
    • Alumni
    • Athletics
    • Bookstore
    • Conference and Event Services
    • Housing and Residence Life
    • Human Resources
    • Information Technology
    • Lemieux Library
    • Marketing Communications
    • Office of Research Services
    • Public Safety
    • Recreational Sports
    • Registrar
    • Student Financial Services
    • Online Services
    • SUOnline
    • Email
    • Angel
    • MySU

Site Map | Contact | Directory

College of Science and Engineering
  • About the College
  • Areas of Study
  • Advising
  • Transfer Students
  • Project Center
  • Outreach
  • Donate Now

Department of Electrical & Computer Engineering

  • About
  • Electrical Engineering with Computer Engineering Specialization
  • Electrical Engineering
  • Senior Design
  • Transfers
  • Student Clubs
  • Laboratory
  • YouTube Channel
  • Careers/Recruitment
  • Research Opportunities

 

70yearssuee-shad

 

 

  YT-1   FB-1    LI-1

 

Announcements

New Student Retreat 
An opportunity for first year and transfer students to get away for a weekend in order to meet new students, reflect on how the year is going so far, and spend time in the beautiful Pacific Northwest. Get future dates

  

Society of Hispanic Professional Engineers 
Join SHPE and take advantage of its Career Fair.
Officers 

  

The electrical engineering program is accredited by the Engineering Accreditation Commission of ABET http://www.abet.org/ 

Student Software

  • Microsoft DreamSpark
  • e-academy.com  
  • Design Software  
  • School World  
  • Cadence Acknowledgement 

SU Campus Video

 

MyCampusVideo-1

 

US News Best Colleges

 
Electrical & Computer Engineering Department 
Seattle University
901 12th Ave. Bannan 209
Seattle, WA 98122-1090

TEL: 206.296.5970
FAX: 206.296.5962

 

College of Science and Engineering > Electrical & Computer Engineering > Laboratory

Get Started with your first PIC program

MOST ERRORS ARE CAUSED BY NOT FOLLOWING THESE INSTRUCTIONS. SLOW DOWN AND BE EXACT IN SETTING THE PATHNAMES AND FILE NAME OPTIONS!

Open CodeDesigner and set compiler & programmer options.

PIC

 

Compiler Options

A compiler is a computer program that transforms source code (what you will be writing) written in a computer language (PICBasic) into another computer language (the target language, in this case Assembly Language). Assembly languages are a family of low-level languages  for programming computers, microprocessors, and microcontrollers. Assembly languages implement a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture. Machine code may be regarded as a primitive (and cumbersome) programming language or as the lowest-level representation. The most common reason for wanting to transform (compile) source code is to create an executable program. 

An easier way of explaining all this is that microprocessors work in 1s and 0s at the most basic level. This low level language is very difficult to write complicated code. Higher level languages, such as PICBasic, C++, Java and others make it easy to write and read code. A compiler translates the higher level language into machine codes (1s and 0s). 

Open Compiler Options as shown below

PICco

Set compiler options as shown below.

piccofix

 

Programmer Options

The programmer software will take the programming file (excutable file) generated from the compiler and move it into the chip.

Open Programmer Options as shown below

PICpo

Set programmer options as shown below.

PICpo2

Erase Command Line Options field from default “-dPIC{DeviceName} "{HexFileWinPath}" to no options as pictured above. Experienced users may wish to configure this option, see PIC Microcontroller Project Book available for checkout room BAN 218.

 

Your First PIC program

If a blank work page is not already opened in CodeDesigner from the File menu select File New.

Paste or type the program below into work page.

----Begin Cut Here----
Loop: High 0
Low 1
Pause 500
Low 0
High 1
Pause 500
GoTo loop
End
----End Cut Here----

Save As work page to: C:\ECE_Share\Work_Folder\wink.bas Be sure to change the Save as type to a .bas –see picture below.

PIC2b

 

Compile Your Program

From the Compile menu select Compile.

If no error occurred you should find the programming file was created C:\ECE_Share\Work_Folder\wink.hex

clip_image001

Setup Programming Hardware

Connect the EPIC programmer to the PC. This includes the Parallel Cable, 16VDC Power Supply, and install the PIC Chip.

Launch EPICWin Programmer Software

From CodeDesigner Programmer menu select Launch Programmer. This will start EPICWIN

PICpm

Programming the PIC Chip

EPICWIN
PICpepic

In EPICWIN, open the HEX programming file created by the CodeDesigner compiler:

File menu select Open and select C:\ECE_Share\Work_Folder\wink.hex

PICp

In EPICWIN select Run menu, select Program

PICpr

You should see the message that the programming was completed and verified -Your first chip is programmed!

PICp2

 

Your chip is programmed and ready to be used on your breadboard. The End.


 

A PIC Microcontroller Project Book and take home programmer is available for checkout from room BAN218. First come first serve.

electrical_engineering_pic_book

Continue with the PIC Microcontroller Project Book Second Edition Chapter 4 page 36 (or First Edition Chapter 2 page 18)

NOTE: There are two Serial LCD Modules available for checkout on a first come first serve.

Helpful References

PIC16F84A Datasheet

BPI-216 Serial LCD Module

Search the net for many useful PIC projects or utilities.

http://en.wikipedia.org/wiki/PIC_microcontroller

http://www.melabs.com

http://www.codedesigner.com

http://www.seetron.com/bpk216_1.htm LCD Module


Errors

EPIC Programmer not found.

PICperror

Suggestions: Check power supply and PC cabling.


Installation of PIC Software onto a new PC

Compiler Environment

PicBasic Compiler 1.43

www.melabs.com

To install the Micro Engineering Labs PIC Basic Compiler

  1. Open up Windows Explorer and create the following folders
    C:\LabApps\PIC\Work {this is where you may choose to save your work files}
  2. Open up Windows Explorer and copy from the CDROM the entire contents of the folder CDROM:\BasicCompiler to the folder C:\LabApps\PIC\BasicCompiler

clip_image002

Programming Environment

EPICWIN 2.46

www.melabs.com

To install the Micro Engineering Labs Programming Environment for the EPIC™ Plus Programmer

  • Open up Windows Explorer and copy from the CDROM the entire contents of the folder CDROM:\EPICProgrammer to the folder C:\LabApps\PIC\EPICProgrammer
  • Option: If you wish to run the programmer outside of the development environment (see next section) you can create a shortcut to the C:\LabApps\PIC\EPICProgrammer\EPICWIN.EXE

Development Environment

CodeDesigner 1.71

www.codedesigner.com.

  1. You can go to www.codedesigner.com and download their free Lite version Or see following step.
  2. Open up Windows Explorer and in the folder CDROM:\CodeDesigner double-click the file cdlite171.EXE to install the Code Designer Lite Development Environment.

Set the installation path to C:\LabApps\PIC\CDLite

 

 

 

CONTACT | PUBLIC SAFETY | CAREERS | RSS

Copyright 2008 - College of Science and Engineering, Seattle University.

Seattle University

College of
Science and Engineering

901 12th Ave, P.O. Box 222000
Seattle WA 98122
206.296.5500
sedean@seattleu.edu