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.

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

Set compiler options as shown below.

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

Set programmer options as shown below.

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.

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

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

Programming the PIC Chip
EPICWIN

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

In EPICWIN select Run menu, select Program

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

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.

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.

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
- Open up Windows Explorer and create the following folders
C:\LabApps\PIC\Work {this is where you may choose to save your work files}
- Open up Windows Explorer and copy from the CDROM the entire contents of the folder CDROM:\BasicCompiler to the folder C:\LabApps\PIC\BasicCompiler

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.
- You can go to www.codedesigner.com and download their free Lite version Or see following step.
- 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