PIC
               Ŀ
                The integrated development environment for 
                     Microchip PIC microcontrollers        
               
                           community-effort

The PIC development environment whose help system you are currently using
will let you write assembly language programs for the Microchip PIC
microcontrollers, and by single - well to tell you the truth
CTRL and anF#-key - you will be able to:

  a)assemble your program using Microchip's MPASM macro assembler,
  b)inspect various files such as the error log or listing file,
  c) start up Microchip'ssimulator to simulate your program,
  d)burn your program immediately into a PIC 16C84 processors, and
  e)run your program on the PIC 16C84 without unplugging any cables.

For d) and e) you will need Michael Kalus' miniprommer which will
be connected to your PC's printer port. You will need to set up
yourparallel-port-number . The environment is a system of separate
components from different sources. Get started with the a simpleexample
program which flashes IO port pins.


F#-key                  Function Keys
                         

As "factory setting" we put the following commands on the CTRL-function
keys. If you edit the fileZZ.CFG you can customize your own commands.

             Ŀ
                Key         Function                
             Ĵ
             Ctrl-F1   Examine messages            
             Ctrl-F2   Examine simulator init file 
             Ctrl-F3   Assemble program (wait)     
             Ctrl-F4   Edit ZZ config file         
             Ctrl-F5   Assemble program (nowait)   
             Ctrl-F7   Burn program to 16C84       
             Ctrl-F8   Examine Listing             
             Ctrl-F9   Start program on 16C84      
             Ctrl-F10  Simulate program            
             


assemble
Ctrl-F5
Assemble Program
Ctrl-F3
To assemble the file currently in the editor using MicrochipsMPASM , you
just press:

CTRL-F3, if you want to see the assembler output and press a key afterwards to
         return to NEWZ, or you press

CTRL-F5, if you want to assemble without pressing a key afterwards.

If your program contains any errors, then you will see an error message
at the bottom line and you can jump from error to error by pressing
SHIFT-F5 and then cursor up and down. You can again edit the text by pressing
ESC first.












inspect
Ctrl-F1
Ctrl-F2
Ctrl-F4
Inspect Variouse Files
Ctrl-F8
To inspect the various related files to the one you just edit, press

CTRL-F1 for the  .ERR File which contains the assembler error messages
CTRL-F2 for the  .INI File which is used as the simulator startup file
CTRL-F4 for the  ZZ.CFG File, which contains the CTRL-F# key assignments
CTRL-F8 for the  .LST File whis is the assembler listing file














simulator
Simulate Program
Ctrl-F10
To run Microchip's MPSIM, you press CTRL-F10. This will start the
simulator with an initialization file named like the one you are editing
but with extension .INI. You will have to prepare a simulator .INI file
for each assemble source file you are going to simulate.


















burn
Burn Program (Programmer connected to Parallel Port required)
Ctrl-F7
Pressing CTRL-F7 will burn the generated HEX-File into a PIC 16C84.
To use this function Michael Kalus' Picprommer must be connected to
the PC parallel port. The programming software is based on David Tait's
work for his PIC 16C84 programmer. The adapted version can be found in
the filepicprog.c . The binary included was generated with Borland C++.
picprog
Picprog is called the following way:

Usage: picprog [ -lxhrswpc238! ]  objfile1  [ objfile2 ]

       objfile1 = Program data, objfile2 = EEPROM data

       Fuses:    l = LP,   x = XT,    h = HS,  r = RC
                 w = WDTE, p = PWRTE, c = !CP (i.e. protect)
       Port:     2 = LPT2, 3 = LPT3
       Hex:      8 = INHX8M
       Misc:     ! = no wait, s=start PIC, don't program

       Defaults: LP, !WDTE, !PWRTE, CP, LPT1, INHX16, wait, !start

You have to set up the parallel port number you are using, the fuses and
input format for picprog on line 8 in the filezz.cfg which gets
activated if you press CTRL-F7.

















run
Start Program in PIC (Programmer connected to Parallel Port Required)
Ctrl-F9
To run a program just burned into a PIC 16C84 with the CTRL-F7 command,
you just press CTRL-F9. This will usepicprog with the -s option to reset
the PIC in Michael Kalus' PICprommer and thus restart the program.

You have to set up the parallel port number you are using for picprog
on line 10 in the filezz.cfg which gets activated if you press CTRL-F9.













community-effort
This work would not have been possible without the help of the following
people:
        - Tom Zimmer (tz@zlink.com) because he developped NEWZ,
          the hypertext editor and ZZ the integrator that form
          the core of the development system.

        - The programmers and management people at Microchip, who
          decided to make their development tools publicly available.

        - Michael Kalus (mka@malente.forth-ev.de) for his hefty task
          designing and developing a cheap yet robust PIC 16C84 programmer
          and combined incircuit emulator.

        - Dieter Peter for lots of hints and fruitful discussions.

        - David Tait for a PIC 16C84 prototype programmer and its programming
          software.

        - Ulrich Hoffmann (uho@pizzicato.forth-ev.de) for the overall
          integration work.


The PIC development environmen is combined from different components
components
- Microchip's PIC macro assemblerMPASM
- Microchip's PIC simulatorMPSIM
- David Tait's PIC programmer softwarepicprog.c
- Tom Zimmer'sZZ-Integrator
- Tom Zimmer'sNEWZ-Editor
- Michael Kalus' PICprommer














You must set up your parallel port number to make the prommer work!
parallel-port-number

Michael Kalus' PICprommer can be used on either LPT1, LPT2 or LPT3.

The environment is preconfigured to be used on LPT1.

You can configure the parallel port number you are using, the fuses and
the input format for picprog on line 8 in the filezz.cfg which gets
activated if you press CTRL-F7 (burn).

You can set up the parallel port number you are using for picprog
on line 10 in the filezz.cfg which gets activated if you press CTRL-F9 (run).












example
Example Program

The example program in the fileflash.asm can be used as a first step
test program. It flashes the IO pins of port A exactly at 1 hz, if you use
a 4 Mhz processor clock.

We advice you to connect a LED at one of the port A pins (don't forget a
resistor of resonable size) and then - once you have built the mini promer -
burn (CTRL-F7 ) the flash program as a first test. If all works fine,
you then pressCTRL-F9 and the program will run and make the LED flash.

Note the use of macroCYCLES inflash.asm .
CYCLES n will waste exactly n cycles.


















