Navigation

This section reviews the navigation details of the PCW/PCWH/PCWHD IDE.

Menu/Toolbar

File Operations

Project Operations

Output Messages

Right Click Pop-up

Slide out windows

Debugging windows

Editor tabs & tiling

Status Bar

Desktop Arrangement

Help


Menu/Toolbar

The new menu/toolbar has the Office 2007 style ribbons. To access a menu, click on the menu item and the sub menu items would appear as icons in the tab bar under it. Each icon has a description text as well a mouse over tool tip. The favourites bar is a floating toolbar that contains the user favourite icons. It can be customized to add/remove icons from the various menu bars. The user menu is a custom menu bar that can also be customized according to user preference. Both theses menu bars can be customized using the options right click pop-up menu in the favourites toolbar and choosing the standard or user toolbars and using the customize button.


Slide Out Windows

The IDE provides 3 slide out windows/tabs on the left. These windows can be docked/undocked on the IDE using the dock/undock button on the right. The windows can be closed using the close button on the top right of the window. All the tabs are by default visible. The visibility can be controlled by checking/unchecking the appropriate checkboxes in the Options|Windows menu. They tabs are reviewed in the following sections


File Operations

Access this slide out window by clicking the Files tab. The window displays all the input and output files in the current project. The toolbar provides the options for opening,adding, removing units, adding documentation,building the project and expanding and collapsing the project tree.


Project Operations

Access this slide out window by clicking the Projects tab. The window displays all the recent projects. The toolbar provides the options for opening a project,adding/removing files to the project,moving the project up/down the list etc.


Identifiers Operations

Access this slide out window by clicking the Identifiers tab. The window displays all the identifiers like functions, variables, types and defines in the current project.


Output Messages

This window displays the compiler output messages like error/warnings. Double click the message or right click and choose find source line to find the source line associated with the message. Choose the help on this error on the right click pop-up menu to get help on this error. The window can be docked/undocked by dragging on the title bar.


Debugging Windows

The debugger windows are enabled by clicking on enable debugger under the Debug menu. Each of the windows can be docked/undocked on the IDE. The debug windows drop down menu under the Debug menu can also be used to display/hide/reset the debug windows.


Editor Tabs & Tiling

Each new file is opened in a new tab in the current editor window. Choose the right click dock option to dock/undock the editor window to the main IDE window. The right click new edit window will open a new editor window enabling to view different files simultaneously.


Status Bar

The status bar on the bottom of the editor window displays the current line and column number of the cursor, editor mode: insert/overwrite,the project name , main source file name, and the current file name with the full path.


Desktop Arrangement

The current desktop setup can be saved/deleted by using the Desktop drop down menu in the Options menu. It provides options to save the current desktop, delete and set the debug desktop.


Help

Click on the drop down menu of the help icon on the top right of the IDE to access the help menu items.


Editor contents

Editor

This section reviews some of the PCW editor features.

Color highlighting

Line numbers

Code folding

Brace matching

Context Sensitive Help


Color Highlighting

The editor provides color syntax highlighting for compiler keywords,comments, preprocessors, string, numbers,symbols,block matches and more. Different colors can be used for the elements. The colors can be chosen by using the options under the Color tab of the editor properties option under the Options drop down menu in the Options menu bar. It can be turned off by unchecking the syntax highlighting checkbox in the General tab of the editor properties option under the Options drop down menu in the Options menu bar.

The PCW editor also allows user defined tokens to be added for color syntax highlighting by putting them in a file names TOKENS.TXT in the PICC directory with one keyword per line.


Line Numbers

The line numbers can be displayed under the left margin by checking the show line numbers checkbox in the Display tab of the editor properties option under the Options drop down menu in the Options menu bar.


Code Folding

The code aware editor also allows the new code folding feature for functions to reduce them to just one line to improve readability of code. It can be turned off by unchecking the use code folding checkbox in the General tab of the editor properties option under the Options drop down menu in the Options menu bar.


Brace Matching

The editor also features brace matching. Place the cursor on one of the brace [{ or )] and the editor will count the braces and highlight the matching one. It can be turned off by unchecking the Auto highlight brackets checkbox in the General tab of the editor properties option under the Options drop down menu in the Options menu bar. The auto positioning checkbox under the same tab can be used to auto-position the brackets according to coding standards.


Context Sensitive Help

The IDE offers context sensitive help. Highlight the item and press F1(help) to bring the help for the selected item


Add breakpoint

Add a breakpoint on the line at the current cursor location. Only active when debugger is enabled.


Remove breakpoint

Removes the breakpoint on the line at the current cursor location. Only active when debugger is enabled.


(Editor)Cut...

Cut- Moves the selected text from the file to the clipboard.

Copy- Copies the selected text to the clipboard.

Paste- Copies the clipboard contents to the cursor location.

Toggle Bookmark- Sets/Removes a bookmark (0-9) at the cursor location.

Go To Bookmark- Move the cursor to the specified bookmark (0-9).

Find next "text"- Finds the next occurrence of the highlighted word.

Find ... in project- Finds all occurrences of the selected word in the project.

View Data Sheet- Brings the view datasheet window with the current device selected if the project is compiled.

Make File Project- Make the current file as the project to be compiled.

New Edit Window- Opens a new edit window that can be tiled to view files side by side.


Format Source

Formats the source file according to coding standards like indenting etc.


Close

Save- Save the changes in the current file.

Close- Closes the currently selcted file.


(Editor)Compile

Compile

Compiles the currently selected file.


Editor Keys

Cursor Movement
Left Arrow | Move cursor one character to the left
Right Arrow | Move cursor one character to the right
Up Arrow | Move cursor one line up
Down Arrow | Move cursor one line down
Ctrl Left Arrow | Highlights the word to the left instead of moving the cursor
Ctrl Right Arrow | Highlights the word to the right instead of just moving the cursor
Home | Move cursor to start of line
End | Move cursor to end of line
Ctrl PgUp | Move cursor to top of window
Ctrl PgDn | Move cursor to bottom of window
PgUp | Move cursor to previous page
PgDn | Move cursor to next page
Ctrl Home | Move cursor to beginning of file
Ctrl End | Move cursor to end of file
Ctrl S | Saves the active file
Ctrl A | Select all
Ctrl F | Find
Ctrl R | Replace
Shift ~ | Where ~ is any of the above: Extend selected area as cursor moves

Editing Commands
F4 | Select next text with matching () or {}
Ctrl # | Goto bookmark # 0-9
Shift Ctrl # | Set bookmark # 0-9
Ctrl Z | Undo
Del | Delete the following character
BkSp | Delete the previous character
Shift BkSp | Delete the previous character
Ins | Toggle Insert/Overwrite mode
Ctrl Z | ** Undo last operation
Shift Ctrl Z | Redo last undo
Alt BkSp | Restore to original contents
Shift Del | Cut selected text from file
Ctrl Ins | Copy selected text
Shift Ins |
Tab | Insert tab or spaces
Ctrl Tab | Insert tab or spaces
Ctrl P ~ | Print
Ctrl G | Go to line
Ctrl Y | Delete line
Ctrl Q Y | Delete to end of line
Ctrl X | ** Cut selected text from file
Ctrl C | ** Copy selected text
Ctrl V | Paste
Ctrl-F | ** Find text
Ctrl-R | ** Replace text
F3 | Repeat last find/replace

* Only when WordStar mode selected

** Only when WordStar mode is not selected


(File)New...

New

Creates a new file (click on this item to get the submenu). Options include:

Source File | Creates a new source file (.c or .h file)
Project Wizard | The wizard will allow the user to specify project parameters and when complete a .C, .H and .PJT file are created. Standard source code and constants are generated based on the specified project parameters.
Project Manual | Creates a new project manually. Only a .PJT file is created to hold basic project information. An existing .C main file may be specified or an empty one may be created.
RTF File | Opens the RTF Editor program which is a fully featured RTF editor to make a new RTF file.
Flow Chart | Open the flow chart editor program included with PCW for quick and easy charting to make a new flow chart.

Open

Opens a file into the editor. If there are no other files open then the project name is set to this files nam

Any File | Opens a file of any type into the editor.
Source File | Opens a source file(.c or .h) into the editor.
Project | Opens a project file(.PJT) into the editor
Output File | Opens an output file(.hex,.err,.lst,.sym,.cod,.cof,.tre,.sta) in the appropriate editor.
RTF File | Opens an RTF file into the RTF editor program.
Flow Chart | Opens a flow chart file in the flow chart editor program.
As hex file | Opens a file in the hex editor.
As text file | Opens a file as a text file.

Open All Files

Opens all source files of the last compiled project or the currently open proect. In order for this function to work the program must have been compiled in order for the include files to become known.

Close

Closes the file currently open for editing. Note that while a file is open in PCW for editing no other program may access the file.

Close All

Closes all the currently open files in the editor.

Save

Saves the file currently selected for editing.

Save As

Prompts for a filename to save the currently selected file.

Save All

All open files are saved to disk.

Exit

Terminates the IDE.


Encrypt

Creates an encrypted include file. The standard compiler #include directive will accept files with this extension and decrypt them as they are read. This allows include files to be distributed without releasing the source code.


Print

Prints the currently selected file.


Project

A .PJT file is specified and the main source file is loaded. click on the arrow to list all the most recently used projects and select one to open it.


PIC Wizard

This command will bring up a number of fill-in-the-blank forms about your new project. RS232 I/O and i2C characteristics, timer options, interrupts used, A/D options, drivers needed and pin names all may be specified in the forms. When drivers are selected, the tool selects pins required and pins that can be combined will be. The user may edit the final pins selections. After all selections are made the initial .C, .H, and .PJT files are created with #defines, #includes and initialization commands required for your project. This is a fast way to start a new project. Once the files are created you cannot return to the menus to make further changes.


Manual Create

Manual Create
Creates a new project manually. Only a .pjt file is created to hold the basic project information. An existing .C main file may be specified or an empty one may be created. The manual create utility has the following options.

Target
Select the target chip from the drop down menu.

File
This will allow you to select the file which you wish to add to your project. You can add a new source file by clicking on '+Add'. To delete a file, simply select the file you wish to delete and then click on '- Remove'.

Include Files
This will allow you to select the included directories for your project. The default directories are -

C:\Program Files\PICC\Devices

C:\Program Files\PICC\Drivers

Global Defines
This will allow you to load a file with global definitions.

Output Files
The output files generated by the compiler can be specified by checking on the desired boxes. For example, if you want to see the opcodes in the list file, then you can click on the 'With opcodes ' radio button then click on 'Apply'. The default is CCS basic.


(Project)New...

Open All Files | Opens all source files of the last compiles project or the currently open project. In order for this function to work the program must have been compiled in order for the include files to become known.
Close Project | Closes all files associated with the current project.
Find text in project | Searches all files in a project for a given text string.


Undo

Undo | Undoes the last editing action.
Redo | Redoes the last editing action.
Cut | Moves the selected text from the file to the clipboard.
Copy | Copies the selected text to the clipboard.
Paste | Copies the clipboard contents to the cursor location.
Unindent Selection | The selected area of code will be unindented.
Select All | Highlights all the text.
Copy from file | Copies the contents of a file to the cursor location.
Paste to file | Pastes the selected text to a file.
Indent Selection | The selected area of code will be properly indented.


Record

Playback | Plays back the last recorded or loaded macro.
Record | Starts recording the keystrokes to be played backed or saved and loaded later.
Stop | Stops recording the keystrokes to be played back or saved and loaded later.
Load | Loads the saved macro to be played back.
Save | Saves the recorded macro to be loaded and played back later.


(Search)Find

Find

Searches for the next occurrence of a specified string in the file opened according to the selected search criteria. Click on the down arrow to specify the most recently used strings.


(Search)Find Next

Find Next | Searches for the next occurrence of a specified string in the file opened according to the selected search criteria.
Ignore Case | Ignores the case when searching if checked.
Search Forward | Searches forward in the file
Search Backward | Searches backward in the file
Search Entire File | Searches the entire file


(Search)Find text in Project1

Find text in project

Opens the find in files window that lets the user specify the string and search criteria. Ignore Case ignores the case when searching. If project is selected it will search all the files in the current or last compiled project. If include directories is selected, it will search all the files in the include directories. If given directory is selected, it will search all the files in the current directory. If CCS Examples is selected, it will search all files in the examples directory.


(Search)Replace

Replace

Opens the replace window with the find and replace options. Match whole word only will find the occurrence as a whole word only (not part of another word). Match Case finds the occurrence that matches case only.


Find next "word"

Searches for the next occurrence of a word at cursor in the file opened.


Goto Line...

The user can specify the line number and the cursor moves to the specified line.


Toggle

Toggle | Sets a bookmark (0-9) at the cursor location.
Goto | Move the cursor to the specified bookmark (0-9).


(Options)Project

Project Options

Opens the project options dialog. This allows changes to settings including Files, Include Directories, Global Defines, and output file options.

The project options window has 4 tabs namely Files, Include Files, Global Defines and Output Files.

The files tab lists the target chip and all the source files of the current project. Use the add or remove button to add or remove files to the project. Check the multiple compilation units if the project is using multiple compiled units. Check the separate linker option to use the linker. These options can be made default by checking the make these setting default for new projects box at the bottom of the tab. Hit the apply button to save the changes.

The include files tab allows the specification of each directory to be used to search for include files for just this project. This information is saved in the PJT file. Use the browse button to browse to the folder and then use the add button to add to the list. Use move up, move down or delete buttons to move the item up, down or delete from the list. Use the default button to use the default include directory settings. These options can be made default by checking the make these setting default for new projects box at the bottom of the tab. Hit the apply button to save the changes.

Global Defines allow the settings of #defines to be used in compiling. This is the same as having some #defines at the top of your program. This may be used for example to set debugging defines without changing the code. These defines apply only to PCW compiles when enabled is checked. They do not apply to MPLAB compiles.

Output Files allow selections of the output file formats:

Standard COD - Standard PICmicro® MCU cod debug file

Expanded COD - COD file with advanced debug info

COFF File - Microchip COFF file with debug info

List File Options

CCS Basic - The CCS format list file

With Opcodes - The standard format with machine code

Old Standard - Older MPASM format

Symbolic - Includes C symbols within the assembly

Object File Options

8 bit HEX - 8 Bit Intel HEX file

16 bit HEX - 16 bit Intel HEX file

Binary - Straight binary (No fuse info)

Error File Options

Original - Older Microchip standard

Standard - Current Microchip standard

Multi-lines - Shows all error messages and or warnings depending on the show all errors or show

all warnings checkbox selection.

Other File Options - The call tree file, statistics file and scratch files are created if the appropriate boxes are selected.


Editor Properties

Editor

Properties

When clicked the editor brings up a new Editor Properties Window which gives the user a number of options for setting up the editor properties. The Editor Properties Window has three tabs which are explained below:

General

Syntax Highlighting - When checked the editor highlights in color C keywords and comments.

Auto Highlight brackets - When checked the editor highlights the matching brackets automatically when the cursor is placed on one.

Auto Indent - When selected and the ENTER is pressed the cursor moves to the next line under the first character in the previous line. When not selected the ENTER always moves to the beginning of the next line.

Show Active Line - When selected the cursor is shown on the active line.

Auto positioning the "{" - When selected this will highlight the matching { or ). The editor will start counting the open and closed braces and highlight the closing or opening item when they match. Simply place the cursor on one of the items and the matching one will be highlighted.

Use Code Folding - When selected the code aware editor also allows the new code folding feature for functions to reduce them to just one line to improve readability of code.

Order Open Files - Arranges the file tabs alphabetically

Recall Open Files - When selected PCW will always start with the same files open as were open when it last shut down. When not selected PCW always starts with no files open.

Tab size determines the number of characters between tab positions. Tabs allow you to set the number of spaces equated by a tab and whether or not the tabs are converted to spaces or left as tabs.

The Window Settings option allows the user to select the scroll bars for the editor (horizontal and vertical).

Display

Visible left Margin - When selected the left margin of the editor becomes visible.

Visible Right Margin - When selected the right margin of the editor becomes visible.

Show Line Numbers - When selected the line numbers are shown in the editor.

Left Margin Width - Width of the left margin.

Right Margin Width - Position of the right margin.

Editor Font - Selects the font of the editor.

Font Size - Size of the editor font.

Font Style - Style of the editor font (Italic/Bold/Underline).

Color Scheme - Selects the toolbar style (Blue/Silver/Olive/XP)

The sample box displays a sample of the selected option

Color

This tab allows the user to select the color for syntax highlighting the element and use the foreground and background color to select the colors. Use the color speed setting to select the background color for the editor.


Configure Tools

Tools

Allows the user to set where external tools are located such as ICD, Mach X, MPLAB or any other program. Specify the name, location and command line option for each tool.


File Associations

Sets up file associations with CCS programs. Choose the extension and program to setup association.


Software Update Properties

Controls how often the update utility will check for updates and what action to take if updates are found.


Printer Setup

Opens the printer setup dialog box to change the printer settings.


Toolbar Setup

This window has two tabs namely the Toolbars tab and the Keyboard tab which are explained below:

Toolbars

This tab gives a list of icons that can be added to the tool bar for speedy access of functionalities of the IDE. Selections can be made for the standard and the user toolbar

Use Large Icons - If selected large icons are used in the IDE.

User Toolbar Name - Use this box to specify a name for the user toolbar.

Keyboard

This tab lists the keyboard shortcuts for commands under different menu categories and lets the user change it if necessary. Use the assign, remove or reset all buttons to assign the new shortcut, remove it or reset to all default shortcuts.


Save Desktop

Use the save, delete or set debug icons to save, delete or set the current desktop as debug desktop.

Save Desktop | Saves the current desktop layout
Delete Desktop | Removes a desktop from the list of saved desktops
Set Debug Desktop | Sets the desktop that will be loaded when entering debug mode

When the Specific to User checkbox is selected the PCW will save a different set of settings for each user.


(Main Menu)Compile

Compile

Compiles the current project (name is in status bar) using the current compiler (name is on the toolbar).

Compile Window
The compile window appears when you Compile an active project using F9 or clicking on the 'Compile' icon in the Compile ribbon. This window shows compiler version information and registration information.

Project
This displays the main project file that is currently being compiled.

Compile
This displays all the files used by the project as they are being added to the project.

Outputs
This window will display various output messages if the compile is complete with no errors.

Ram and ROM
The RAM and ROM usage is displayed as a percentage of the total available on the target chip.

Output Files
The files generated or modified by the compiler while compiling the project are displayed.

Miscellaneous Information

Files – Number of files used in the project, only .C and .H

Statements – Number of C statements in your project.

Lines – Number of lines in your project. This includes the C Statements and all comments.

Time – Time required to compile the project.

Build

Build project, only compiles units that have changed since last build.

Build All

Compiles all units and builds the current project, (name is in lower right) using the current compiler.

Clean

Deletes the output files for the current project.

Microchip 12 bit

Selects the 12 bit compiler(pcb) for the 12 bit PIC microcontrollers.

Microchip 14 bit

Selects the 14 bit compiler(pcm) for the 14 bit PIC microcontrollers.

Microchip 16 bit

Selects the 16 bit compiler(pch) for the 16 bit PIC microcontrollers.

Microchip 24 bit

Selects the 24 bit compiler(pcd) for the 16 bit PIC microcontrollers.


Program Chip

Program Chip | Click on the button to use the tools setup under this option to program targets using the selected tools.
Debug | Click on the button to use the tools setup under this option to debug targets using the selected tools.


C/ASM

Opens the listing file in read only mode. The file must have been compiled to view the list file. If open, this file will be updated after each compile. The listing file shows each C source line and the associated assembly code generated for the line.

For Example:

……………delay_ms(3);

0F2: MOVLW 05

0F3: MOVWF 08

0F4: DESCZ 08,F

0F5: GOTO 0F4

…………….while input(pin_0));

0F6: BSF 0B,3


Symbol Map

Opens the symbol file in read only mode. The file must have been compiled to view the symbol file. If open, this file will be updated after each compile. The symbol map shows each register location and what program variables are saved in each location.

Displays the RAM memory map for the program last compiled. The map indicates the usage of each RAM location. Some locations have multiple definitions since RAM is reused depending on the current procedure being executed.

For Example:

08 @SCRATCH

09 @SCRATCH

0A TRIS_A

0B TRIS_B

0C MAIN.SCALE

0D MAIN.TIME

0E GET_SCALE.SCALE

0E PUTHEX.N

0E MAIN.@SCRATCH


Call Tree

Opens the tree file in read only mode. The file must have been compiled to view the tree file. If open, this file will be updated after each compile. The call tree shows each function and what functions it calls along with the ROM and RAM usage for each.

A (inline) will appear after inline procedures that begin with @. After the procedure name is a number of the form s/n where s is the page number of the procedure and n is the number is locations of code storage is required. If s is ?, then this was the last procedure attempted when the compiler ran out of ROM space. RAM=xx indicates the total RAM required for the function.

For Example:

Main 0/30

INIT 0/6

WAIT_FOR_HOST 0/23 (Inline)

DELAY_US 0/12

SEND_DATA 0/65


Statistics

Opens the stats file in read only mode. The file must have been compiled to view the stats file. If open, this file will be updated after each compile. The statistics file shows each function, the ROM and RAM usage by file, segment and name.

Advanced Help on Statistics


Debug File

Opens the current debug file selected (extended cod or cof) in the appropriate viewer in read only mode. The file is shown in an interpreted form .


Valid Interrupts

This tool displays all the valid keywords for the #INT_XXXX directive and the enable/disable_interrupt function for this device. Select the chip from the drop down menu to view a list of all the valid Interrupt sources for that particular chip.

Interrupts
The first column displays the list of all the valid interrupts. The nomenclature used here is based on the manufacturer's data sheet. An Interrupt Service Routine can specified for any of the valid interrupts using the #INT_XXXX directive. For example, to specify a Timer1 Interrupt, use:

#INT_Timer1// Preprocessor Directive

void Timer1_subroutine() // Function that follows the directive will automatically become your ISR.

{

output_toggle(Pin_B3);

}

Description
The second column contains a brief description about the corresponding Interrupt.


Valid Fuses

This tool displays all the valid keywords for the #FUSES directive associated with the device that is currently being used. Select the chip from the drop down menu to view the configuration word setting for that particular chip.

Configuration Word Number
The first column displays the configuration word number and the starting bit number associated with a particular group of fuses. For example on the PIC16F877A chip, bits 0 and 1 of the configuration word 1 are associated with the Clock settings, so the first four rows of column 1 read - 1.00. These bits are arranged in ascending order-

1.00 – LP

1.01 – XT

1.10 – HS

1.11 – RC

Configuration Word
The second column displays the names of the configuration words. The nomenclature used here is based on the Manufacturer's data sheet.

Description
The third column contains a brief description about the corresponding FUSE from that row.


Data Sheet

This tool can be used to view the Manufacturer data sheet for all the Microchip parts supported by the Compiler. The data sheets will open up in Acrobat Reader. If data sheets were not copied to the disk, then insert the CCS CD ROM or a manufacturer CD ROM.

Select the Microchip Device from the drop down menu whose data sheet you wish to view. Specify the location of the Data sheets. The default location is C:\Program Files\PICC\Data Sheets\

Click on 'View' to open the data sheet in the Acrobat Reader. This will open the data sheet that is associated with that particular chip. Multiple chips can have the same data sheet, for example all chips from the PIC18XX2 family have the data sheet – 39564B.pdf. Selecting any of the chips will open the same data sheet.


Special Registers

Opens the Special Registers viewer (included in device editor) for viewing of all SFR's for a given part and has the ability to generate custom .h files with the register and bit definitions for specific functions.


Part Errata

Opens the errata viewer (included in device editor) that allows to view the errata database to see what errata is associated with a part and if the compiler has compensated for the problem.


Project Files

Output

If selected this window displays the compiler output messages like error/warnings. Double click the message or right click and choose find source line to find the source line associated with the message. Choose the help on this error on the right click pop-up menu to get help on this error. The window can be docked/undocked by dragging on the title bar.

Identifier List

When selected the Identifiers slide out tab is displayed. It lists all the identifiers like functions, variables, types and defines in the selected project.

Project Files

When selected the Files slide out tab is displayed. The files slide out tab displays all the input and output files of the current project. The menu provides the following options:

Open unit | Select a unit and click on open unit to open the file in a new editor window.
Add unit | Allows to add a new unit to the project.
Remove unit | Select a unit and click on remove unit to remove the file from the project.
Add document | Allows adding the document file to the project.
Expand | Expands the project tree.
Collapse | Collapses the project tree.

Right Click pop-up:

Add unit | Allows to add a new unit to the project.
Add document | Allows to add the document file to the project.
Remove file | Select a unit and click on remove unit to remove the file from the project.
Delete output files | Deletes all the output files of the project.
Print all source | Prints all the source files of the project.
Open all source | Opens all the source files of the project.
Properties | List the last compiled time.

Project List

When selected the Projects slide out tab is displayed. The project slide out tab displays all the recent project files.

The menu provides the following options:

Open | Opens the selected project.
Add project | Adds a project to the list.
Remove project | Removes the project from the list.
Move up | Moves the selected project one position up the list.
Move down | Moves the selected project one position down the list.

Right click pop-up:

Open | Opens the selected project.
Remove | Removes the project from the list.
Properties | List the last compiled time.


(Edit)Undo...

New Edit Window | Will open a new edit window which can be tiled to view files side by side.
Dock Editor Window | Will dock the editor window into the IDE.


Device Editor

This tool edits a database used by the compiler to control the compilation. CCS maintains this database (Devices.dat) however users may want to add new devices or change the entries for a device for a special application. Be aware if the database is changed and then the software is updated, the changes will be lost. Save your DEVICES.DAT file during an update to prevent this.

MCU parts

This section includes all the PIC and DSPIC micro controllers.

Click on the chip name to open the chip details.

To add a new chip find a similar chip and then click on the copy button and specify the new chip name.

Use the delete button to delete the selected chip from the database.

Use the rename button to specify a new chipname.

Use the save button to save the changes to the database.

The details of the chip fields are explained below:

Opcode

Specifies the chip family type. Choose 12 bit, 14 bit, pic18, dspic or SX family type accordingly.

IO ports

This specifies the available i/o ports and pins on the device. Check the Ports section of the data sheet and modify the port fields accordingly. A '1' represents the pin is available and '0' vice versa.

RAM
Specifies what RAM locations are available as general purpose registers on the chip. For PIC16 chips, the registers can be selected by BYTE and for PIC18 they are selected by the bank. For PIC16 chips, a '0' means that the location is not available and ff means the location can be used by the compiler as general purpose registers. For PIC18 chips, a check mark in the bank number denotes that the particular bank is implemented and is available for the compiler.

Identification
This section specifies the different ids used to identify the chip.

C device id
CCS ID for the chip.

MPLAB ID
ID assigned by Microchip and used by MPLAB to identify the chip.

HW device ID
The unique device id stored in the device id location of the chip used to identify the chip. This information is available in the device id section of the programming specification of the chip. Chips with no device id specified as '0'.

HW Mask
The mask used with the device id that allows specification of hardware revs. The actual read id is masked with this value to get the device id.

Data Sheet PDF
The pdf file name for the chip data sheet.

Package
This section has information about the pin out of the through hole (DIP/SDIP) package of the chip if available.

DIP pins
Number of pins in the DIP/SDIP version.

Pin out
The matching pin out number for the MACH X programmer.

Tools
This section contains information regarding the tools associated with the device like an ICD or emulator.

Emulator
Emulator type for the device.

ICD
Debugger associated with the device if any.

Needs ICD chip
Specifies if the debugging support is provided in the regular version or just the special ICD header version (ex 10f20x, 12f50x,1650x,12f6xx,16f6xx chips etc). Check the ICD debugging support section in special features of the device data sheet for details.

ICD needs NOSTVREN
Some new pic18 chips needs the nostvren fuse when debugging. Set this to TRUE if the FUSE needs to be set to enable debugging.

Programming
This specifies the Programming algorithm type used by CCS ICD/MACH X for programming the chip.

3V programming
Specifies if the chip supports 3v erase/programming algorithms.

Tested
Specifies if the ICD support for the chip has been fully tested or is in beta.

ICD can't calibrate
Specifies if the ICD/MACH X can automatically calibrate the internal oscillator of some special chips that can be calibrated.

Memory
This section provides details about program, data eeprom memory of the device

Program(words)
Specifies the program memory size in terms of number of instructions.

Data EE(bytes)
Number of bytes of Data EEprom memory in the device.

Data EE type
Specifies the data eeprom memory type. Some chips have special types like 16f8x, 16f62x etc which use a different algorithm to access the memory.

Data EE Start
Specifies the start location of data eeprom in the program memory. For PIC16 chips it is located at (0x2100) and for PIC18 chips, it is located at (0xf00000).

Stack
Number of stack locations available.

SFR in 100-1FF
Specifies if SFRs are mapped to RAM locations 100-1ff. This is only true for some PIC16 chips.

70-7f in all ram bank
Specifies if the last 16 locations in all banks are mapped to bank 0 or not. This applies only to the PIC16 chips.

C scratch RAM
The first RAM location available as GPR for the compiler.

Last access loc
Specifies the last access memory locations.

Flash Access
Specifies the Flash program memory program/erase type. For example – the PIC18F452 chip has Flash Access specification as PIC18 8/64 which means it can allow a write of 8 bytes at a time and an erase of 64 bytes at a time.

Support External memory
Specifies if the chip supports external memory.

ID location
Specifies the id location for the chip.

Timers
This section provides details about on-chip timers.

Timer1:Specifies if timer1 is available on the chip.

Timer2,Timer3,Timer4,Timer5,:Similar to timer1

Timer0 is available on all chips.

UART
Provides details about hardware UART if available on the chip.

9 bit
True if the chip uses 9 bit.

ESCI
Specifies if the chip has enhanced SCI and also specifies the different types specified by registers used or register addresses.

Xmit#1:transmit pin of the first hardware uart.

Rcv#1:receive pin of the first hardware uart.

Xmit#2:transmit pin of the second hardware uart.

Rcv#2:receive pin of the second hardware uart.

ADC
This section specifies the a/d converter peripheral.

ADC channels
Number of adc channels available on the chip.

Go/Done bit
Position of the go/done bit in the ADCON register.

Clock Select
ADC Clock select bits present in the ADCON1 register.

Result Format
Result format bit position in the ADCON1 register.

Channel LSB
Position of the channel select lsb in ADCON0.

Pins select
Position of port configuration control bits in the ADCON1 register.

ADC Regs: Address of the adc registers in the SFR in the following order – ADCON0, ADCON1, ADCON2, ADRESL, ADRESH.

ADC bits: ADC resolution.

Continuous loop

Specifies if continuous looping option is available.

For all field options, c0 represent ADCON0, c1 represent ADCON1, c2 represent ADCON2,S represent ANSEL.

SSP
This section specifies the SSP options.

Has SPI
Specifies if hardware SPI is available.

Has Adv SPI
Specifies if advance SPI is available.

I2c Slave
Specifies if i2c slave hardware unit is available.

I2c Master
Specifies if i2c master hardware unit is available.

SSP pins
Specifies the SSP pins used in the order SCK, SDI,SDO,SS.

CCP/PWM
Specifies the CCP/PWM unit details.

CCP unit: Number of CCP units.

CCP pins: CCP Pins used in the order ccp1,ccp2 etc.

ECCP: Specifies if enhanced ccp is available.

PWM shutdown: Specifies if PWM shutdown feature is available.

Power PWM: Specifies if Power PWM feature is available.

Internal Clock: Details of internal clock.

OSCCAL location: Provides details regarding the calibration value location if available.

OSCCON format: Osccon register format.

Other features

TRIS
Specifies if TRIS instruction is available.

POR
Specifies if POR feature is available.

Peripheral Interrupts
Specifies if peripheral interrupts are available.

WDT Control
Specifies if WDT control feature is available.

IOC/WPU
Specifies if IOC(Interrupt on change)/WPU(Weak pull-up) feature is available.

PSP
Specifies if PSP port is available.

LCD
Specifies if LCD feature is available.

Voltage Ref
Specifies if voltage reference unit type is available.

CAN Bus
Specifies if CAN feature is available.

USB Bus
Specifies if USB feature is available.

RF unit
Specifies if RF feature is available.

Voltage Detect
Specifies if LVD/HLVD feature is available and which type.

Comparator
Specifies the type of the analog comparator present, if available.

Fuses
Specifies the fuses available for the chip. The mask, value and the config word number that it

belongs to is specified for each fuse.

Errata
List the various erratas and checks the applicable ones.

Interrupts
Lists all the peripheral interrupts available for the chip. The name, position of the flag and position

of the enable bit is specified. The priority bit is also specified for PIC18 chips.

ICD Interfaces

This feature lets the user add/edit/delete a debugger for a chip.

Click on the chip name to open the chip details.

To add a new chip find a similar chip and then click on the copy button and specify the new chip name.

Use the delete button to delete the selected chip from the database.

Use the rename button to specify a new chip name.

Use the save button to save the changes to the database.

The details of the chip fields are explained below:

Debugger
Debugger ROM details.

Start Address
Starting ROM address of the debugger.

Size
Size of the debugger in bytes/words. Click on load from hex file to load the new debugger into the device file.

Last load
Specifies the date,time and size of the last loaded file.

Reserved
Details about the reserved resources.

ROM Start: Starting location of ROM.

ROM End: Ending location of ROM.

RAM: Reserved RAM locations.

Read Algorithm
Specifies the read algorithm for the RAM locations. The choices are:

Read ICD - Regular ICD ram read

Use address - 80h - Values same as address-80

Use adr-100h.

Blackout - Either unimplemented or reserved.

Use pcl - Use the pcl alias read.

Use alias - Specify the alias location.

W
Specify the alias location for the W register.

Forced Fuses
Lists the fuses that are required for debugging. These are forced when compiled with the preprocessor directive #device ICD=TRUE

Chips
Chips that use this debugger. These are automatically listed when the current debugger is chosen.

Memory parts
Details of memory chips. Currently only mcp250xx chips.

Identification
This sections specifies the different ids used to identify the chip.

HW device ID
The unique device ID stored in the device ID location of the chip is used to identify the chip. Information can be found in the device ID section of the programming specification of the chip. Some chips do not have a device ID. Enter them as zero.

HW Mask
The mask used with the device ID that allows specification of hardware revs. The actual read ID is masked with this value to get the device ID.

Data Sheet PDF
The pdf file name for the chip's data sheet.

Package
This section has info about the pin out of the through hole(DIP/SDIP) package of the chip if available.

DIP pins
Number of pins in the DIP version.

Pin out
The matching pin out number for the MACHX programmer.

Memory
Total memory locations available.

Algorithm
Programming algorithm.

Obsolete
Specifies if the chip is obsolete.

Selection tool
This tool can be used to select chips according to various criteria. The following criteria can be specified to select the chip:

Flash memory
Select the chip depending on your Flash memory requirements.

I/O pins
Select the chip based on hardware requirements.

Data EEPROM memory available
Select the chip based on your Data EE requirements.

ROM requirements
Select the chip depending on your ROM requirements.

ICD debugging available
Select chips that have debugging support.

External Memory available
Select chips that support external memory.

Other hardware criteria are
UART, A/D Converter, USB, CAN, LCD , Comparator, and Power pwm.

Compiler type(12/14/16 bit,24,dspic) etc. This selects the type of the compiler you wish to use.

Once the criteria is selected the chips that satisfy the specified criteria are listed with details.

Memory Parts

Details of memory chips. Currently only mcp250xx chips.

Identification
This sections specifies the different ids used to identify the chip.

HW device ID
The unique device ID stored in the device ID location of the chip is used to identify the chip. Information can be found in the device ID section of the programming specification of the chip. Some chips do not have a device ID. Enter them as zero.

HW Mask
The mask used with the device ID that allows specification of hardware revs. The actual read ID is masked with this value to get the device ID.

Data Sheet PDF
The pdf file name for the chip's data sheet.

Package
This section has info about the pin out of the through hole(DIP/SDIP) package of the chip if available.

DIP pins
Number of pins in the DIP version.

Pin out
The matching pin out number for the MACH X programmer.

Memory
Total memory locations available.

Algorithm
Programming algorithm.

Obsolete
Specifies if the chip is obsolete.

Registers

This tool will display a lists of all the special function registers associated with the device. The various functions of this utility are listed below:

Address
By clicking on 'Addr', the registers can be viewed in ascending or descending order of its address on the chip. For example, for PIC18F452 chip, the SFR's can be viewed from 0xF80 till 0xFFF.

Byte
This displays the name that is associated with this byte. In general, the name should match the one specified in the Special Function Register Map provided by the manufacturer's data sheet. By clicking on 'Byte', the user can arrange the SFR's in ascending or descending order in an alphabetic manner.

Group
By clicking on 'Group', the user can sort the SFR's by their groups. For example, for the PIC16 chip, the group ADC will consist of the following registers – ADCON0, ADCON1, ADRESL and ADRESH.

Bits
By clicking on the individual bits, the user can derive information as to which SFR's use that particular bit. For example click on Bit5 to arrange it in ascending order, to see if a particular SFR uses this bit.

Edit
Click on 'Edit' to change a bit field. This will allow you to 'Add' a register. Click on 'Add' and enter the address at which you wish to add the register. Click on 'Change Field' to modify existing register.


Device Selector

This tool can be used to select chips according to various criteria. The following criteria can be specified to select the chip:

Flash memory
Select the chip depending on your Flash memory requirements.

I/O pins
Select the chip based on hardware requirements.

Data EEPROM memory available
Select the chip based on your Data EE requirements.

ROM requirements
Select the chip depending on your minimum ROM requirements.

RAM requirements
Select the chip depending on your minimum RAM requirements.

ICD debugging available
Select chips that have debugging support.

External Memory available
Select chips that support external memory.

Other Hardware Criterias
UART, A/D Converter, USB, CAN, LCD , Comparator, and Power pwm. Select the hardware requirement of your project – for example if the project requires PWM, UART and CAN capability, then click on 'Don't Care' to reveal the drop down menu and then select 'YES'.

Compiler type (12/14/16 bit,24,dspic)
This selects the type of the compiler you wish to use.

Once the criteria is selected the chips that satisfy the specified criteria are listed with details.


File Compare

Compares two files. When source or text file is selected, then a normal line by line compare is done. When list file is selected the compare may be set to ignore RAM and/or ROM addresses to make the comparison more meaningful. For example if an asm line was added at the beginning of the program a normal compare would flag every line as different. By ignoring ROM addresses then only the extra line is flagged as changed. Two output formats are available. One for display and one for files or printing.

Using the utility:

Select the files to compare.

File # 1 – Provide path of file name 1 to be used.

File # 2 – Provide path of file name 2 to be used.

Select the appropriate radio button for the Source/Text (.c, .txt) or listing file (.lst)

Uncheck the ignore case check box to make the comparison case sensitive.

Click on Compare. A comparison file will open in a new tab in the editor of the IDE. The portions in RED indicate the differences of file#1 with respect to file#2, and the portions in GREEN indicate the differences of file#2 with respect to file#1.


Numeric Converter

This utility is a convenient method of converting data between different formats and is useful when you want to view the same data in different formats. Enter the data in the known format. The numeric converter computes and displays the data in the other formats.

Format Selection
Use the 'View' drop down menu to select the format in which you wish to view the data. A check box indicates that the particular format is selected. You can view as many formats as you wish simultaneously by selecting them using the 'View' drop down menu.

Pin
This utility can be fixed on the screen on any of the corners by using the View>Pin function. Use Pin>None to move this utility to desired position.

Always on Top
To view this utility above all your application, use View>Always on Top.

Exit

Use Exit to quit to program.


Serial Port Monitor

An easy tool to connect to a serial port. This tool is convenient to communicate with a target program over an RS232 link. Data is shown as ASCII character and as raw hex.

File Menu Options

Load Settings

This will allow the user to load an existing .sio file which contains saved information from a previously used setting.

Save Settings

The user can save the current settings of the SIOW as a .sio file and later retrieve it using the Load Settings.

Save ASCII to File

This will allow the user to save the currently displayed characters in ASCII format to a .txt file.

Save HEX to File

This will allow the user to save the currently displayed HEX data to a .txt file.

Log to file

Logs data to the file.

Add messages to the log
This will allow user to add messages to the logs.

Open File
This will open a text file and transmit it over the RS232 link.

Download Software
Use this option to transmit an entire HEX file to the PIC. Select the HEX file you wish to download and click on 'Open'. Transmission will begin immediately. This can be used with the bootloader example provided with our compiler.

Note: The target PIC must already be in the bootloading mode before you begin transmission and the data and baud rate setting for the SIOW must match that of the target PIC.

Exit
Use this to close the SIOW program.

Edit Menu Options

Copy ASCII
This will copy all selected ASCII characters which can later be pasted in a text file.

Copy all ASCII
This will copy the entire ASCII which is in view, and this can be later pasted in a text file.

Copy HEX
This will copy all selected HEX characters which can later be pasted in a text file.

Copy all HEX
This will copy the entire HEX which is in view, and this can be later pasted in a text file. The text file will display the pasted HEX data in ASCII.

Paste and Transmit
This allows you to paste the copied data and transmit it to the target PIC.

View Menu Options

ASCII
Displays all the data arriving at the serial port in ASCII format.

ASCII Send
ASCII data (0x00 to 0xFF) can be transmitted to the target PIC by entering them in the ASCII window at the bottom and clicking on 'Send'

HEX
Displays all the data arriving at the serial port in HEX format.

HEX Send
HEX data (00h to 0Fh) can be transmitted to the target PIC by entering them in the HEX window at the bottom and clicking on 'Send'

Line Status
This displays the status of the RS232 lines. A Green indicates activity for that particular line, while a Red indicates that the line is currently inactive.

Clear Terminal – This will clear the screen. (F1 key)

Configuration Menu Options

Set Port Options
Use the Configuration tab to access the Set Port Options window. Radio buttons are provided to select the baud rate, parity, data bits and stop bits. Check boxes and drop down menu can be used to select the software and hardware flow control options.

ASCII Options
This will set the options to view the carriage return, line feed and backspace. Extended ASCII display can also be enabled.

Columns
This allows user to change the view size for ASCII and HEX data.

Display
The user can select the Font Type, Font size, foreground and background color for the ASCII and HEX data.

Invert Bytes
This will invert the displayed data byte.

Local Echo
This will cause the SIOW program to echo the bytes it received onto the terminal.

Logging Options
The user can log the data activity on the serial port using this feature. The output file path and name and its maximum size can be specified.

Control Lines Menu Options

Toggle DTR – This will toggle the Data Terminal Ready line.

Toggle RTS – This will toggle the Request to Send line.

MacroManager Options

The Macromanager utility allows the user to specify a macro that can be transmitted to the target PIC. Specify the name for the macro in the name window, for example TX_data1. In the command window, enter the HEX data you wish to transmit. If you wish to transmit this data periodically, then check the 'Repeat' box and specify the time in milliseconds. Click on Add to add this macro to the list. Now you can run this macro which will transmit data to the PIC. The macro can be modified or deleted at any time.


Disassembler

This tool will input a HEX file and output an ASM file. The ASM file may be in the form that can be used an inline ASM.

Input
Specify the path and filename of the input file which can be in HEX or binary format.

Output
Specify the path and filename for the file generated by the disassembler, for example C:\newASM.txt.

Disassemble As
Use the Radio buttons to select the type of opcode used in the input HEX file. For example PIC16 chips use 14 bit opcode.

Use other radio buttons to select the Input File type, Label Format and Numeric format.

Click on 'Disassemble', once you have specified all the options. The newly created ASM file will open in a new tab in the PCW IDE.


Binary File to C

This tool will take a HEX file as input and convert it into a C file.

Input
Use the input window to set the path and filename of your input file.

Format
Use the radio buttons to select the format of the file.

Size
Use the radio buttons to select the size of your data.

Output File
Use the output file window to specify the path and filename for the output file.

Format
Use the radio button to select the format of the output file. The output file will be stored in the form of a #ROM statement or as a 'Const'.

Scale
This will scale the data before it produces the output file.

Size
The size of the data can be specified by selecting the appropriate radio buttons.


Extract Cal Data

Extract

Cal Data

This feature can be used with PIC chips that have calibration data stored at the top of the program memory.

Reading Calibration Data from the PIC
Click on the radio button to select The ICD unit is connected to the target chip. Select the target chip from the drop down menu. Enter the path and filename for the new included file which will store the calibration data. Click on 'Read Target Device' which will extract the calibration data and insert it into the new include file as a # ROM statement.

Reading Calibration Data from a hex file
If a hex file from a PIC is already obtained, then click on the radio button 'A .hex file has already been obtained'. In the 'Filename' window, specify the path and name of the hex file which has been obtained. Select the target chip from the drop down menu and specify the 'New Include Filename'. When you click create, this will extract calibration data from the hex file and insert in into the New Include file as a #ROM statement.


Debugger Overview

The PCW IDE comes with a built in debugger. It is integrated into the compiler IDE and provides source level and assembly level in-circuit debugging support. A CCS ICD(ICD-U40 or ICD-S40) or a CCS MACH X unit is needed to use the debugging functionality. This section contains the following topics:

Enable Debugger

Disable

Reset

Run / Halt

Single Step

Step Over

Run to cursor

Snapshot

Run Script

Breaks

Configure

Data EE

Eval

Log

Monitor

Peripherals

RAM

ROM

Tasks

Watches

Stack

Show All

Hide All

Reset Debug Windows


Enable Debugger

Enable Debugger | Enables the debugger. The project should be compiled with debugging enabled (#device ICD=TRUE) or the IDE prompts to recompile. The target type is by default none and should be set properly in the Debug Configure window and press the reset button to enable the debugger. The debugger IDE would connect to the ICD or Mach X, detect the target chip, download the code and on-chip debugger and reset the target into the debugger.
Disable | Disables the debugger. Closes all the debugger windows. The current breaks are saved in the PJT file and restored when the project is debugged next.


Reset

Resets the target into the debugger. The PC is reset to the starting address. All the debug windows are updated. The PC is shown as a green arrow mark in the margin. The breakpoints are shown as red symbols in the margin.


Run /

Halt

Runs / halts the target chip. While running none of the debug windows are updated with current

information. The program stops when a break point is reached (if any) on pressing the stop button.


Single Step

Single step the code. Executes one source line if the active editor tab is the source file or one list line if the active editor tab is list file.


Step Over

Steps over the target code. Works like single step except in case of function calls when the call is executed in a single step.


Run to cursor

Runs the target code to the cursor. Place the cursor at the required position and click on this button to execute till that address.


Snapshot

Allows recording of various debugging info. Allows the user to choose what information should be recorded as well as where to record it and when to record it.

The information that can be recorded includes: current time, project name, pc, debugger status, watches, breaks, ram values, date eeprom values, rom values, next c line to be executed, peripherals status and register values, stack contents, eval results, monitor screen contents, log results, error messages and configuration settings.

The recording can be done to a printer, a new test file or appended or overwritten to an existing file.

The recording can be done at every step, on every break or at current time.

The APPEND COMMENT button lets to add a user comment to be inserted into the file.


Run Script

Opens the debugger script program that can control the PCW debugger from a C like scripting language. This allows automated tests to be generated and easily executed and re-executed at will. The scripting language allows for results to be logged to a PC disk file and/or evaluated with the script.


Debug Windows

The debugger windows are enabled by clicking on enable debugger under the Debug menu. Each of the windows can be docked/undocked on the IDE. The debug windows drop down menu under the Debug menu can also be used to display/hide/reset the debug windows.

Windows include:

Breaks

Configure

Data EE

Eval

Log

Monitor

Peripherals

RAM

ROM

Tasks

Watches

Stack

Show All

Hide All

Reset Debug Windows


Breaks

This window lists all the current breakpoints. The program memory address, file name and line number information of the breakpoint is provided. To set/remove a breakpoint move the editor cursor to a source or list file line. Then select the break tab in the debugger and click the +/- icon. You can also toggle the breakpoint by double clicking on the margin of the current PC line. It is also possible to add/remove breakpoint at the cursor by right click add breakpoint/remove breakpoint popup menu options.

Note that the breaks work differently for different hardware units. For example on a PIC16 using an ICD, you can only have one breakpoint and the processor executes the line (assembly line) the break is set on before stopping. PIC18s have the option of single hardware breakpoint or multiple software breakpoints. Software breakpoints are slower than hardware breakpoints as they are written/deleted to/from program memory every time. Enable the multiple breakpoints in the Debug Configure window and do a close/restart the debugger to enable multiple breakpoint support.


Configure

The configure tab allows a selection of what hardware the debugger connects to. Other configuration options vary depending on the hardware debugger in use.

Click on the icon to launch the ICD control program to change the connection pr program/erase settings of the ICD. The configure tab also allows manually reloading the target with your code by clicking the icon.

A debugger profile contains all the selections in all the debugger tabs such as the variables being watched, the debugger window position and size and the breakpoints set. Profiles may be saved into files and loaded from the configure tab. The last profile file saved or loaded is also saved in the projects .PJT file for use the next time the debugger is started for that project.

The configure window provides various settings as explained below:

Compile Reload: If this is true, every time the project is recompiled it is automatically reloaded to the target. True by default.

Mouse Over Eval: If this is true expressions are evaluated as mouse over events. True by default. Place the cursor over expressions to see their value.

Timeout Mouse Over: If true the mouse over values timesout, otherwise only disappears only on mouse move. True by default.

Mouse over radix: Allow to specify different formats like hex, binary, decimal etc for the mouse over eval results.

Usersteram enabled: When true pin1 of the icd jack(pin 6 on the target jack) which is connected to pin_b3 is used for userstream. If it is used for any other purposed or not connected to the icd disable this option. True by default.

Echo On Monitor: When true characters typed in are echoed in the monitor window. True by default.

Multiple Breakpoints Enabled: This functionality is only available on Pic18 targets. On pic16s is set to false and cannot be changed. It is by default set to false and so would allow only one hardware breakpoint. For multiple breakpoint functionality set this to true and close and start the debugger. Every time this functionality is changed make sure to apply, close and restart the debugger.

Monitor Font Size: Sets the font size for the monitor screen.

Target Type: Sets the target type. None by default. Set it to the appropriate option(pic18fj or Nonpic18fj) to use the correct programming mode and reset the debugger to enable debugging.

ICD F/W: Displays the firmware version of the debugger.

Processor: Displays the target microcontroller.

Port: Port number/device name of the debugger.

Baud Rate: Speed of the PC to debugger communication.

CPU Fuse Warning: Warns when the CPU fuses are set to microprocessor mode. True by default.

Low Voltage Warning: Warns when the current program/erase settings are not compatible with the target voltage(when using low vdd(3V)).

Mach X supplies VDD: This option is only available when Mach X is used to debug the target. If set to true Mach X would supply vdd to the target. It is set to false by default.


Data EE

Debugger -Data EEPROM

The debugger Data EEPROM tab shows the target Data EEPROM. Red numbers indicate locations that changed since the last time the program stopped. To change a Data EEPROM location double click the value to change. All numbers are in hex. The window is automatically refreshed when autoread is checked. Click on refresh button to manually refresh it.

Special notes for ICD users:

When using an ICD unit the CCS firmware must be installed in the ICD. To install the firmware click on “Configure Hardware” then click on the center top button to load ICD firmware.


Eval

This tab allows the evaluation of a C expression. It is similar to the watch capability except that more space is provided for the result (for large structures or arrays).The keep side effects checkbox allows the user to change the values of the variables at run time.


Log1

Log

The log capability is a combination of the break, watch and snapshot. If enabled is checked and you specify a break number and an expression to evaluate each time the break is reached. The program is restarted after the expression is evaluated and the result is logged in the log window. Multiple expressions may be specified by separating them with semi-colons. The log window may be saved to a file. Each expression result in the file is separated with a tab making it suitable for importing into a spreadsheet program. Use %Time in the expression list or check the timestamp to get a timestamp.


Monitor

The monitor window shows data from the target and allows entry of data to be sent to the target. This is done on the target like this:

#use RS232(DEBUGGER)

...

printf(“Test to run? “);

test=getc();

The B3 pin is used on the target to implement this capability by default and is connected to pin1 of the ICD jack(pin6 of the target jack). The normal ICD cable is already set up correctly for this. If using a different pin specify the same int he #use rs232(debugger, xmit=pin_xx,rcv=pin_xx) directive. Enabled by default. Disable it in the debug configure window if needed. Also set echo option to false if the characters entered need not be echoed back. Type Ctrl+F(form feed) or print("/f") to clear the monitor screen.

.

.


Peripherals

This tab shows the state of the targets special function registers. This data is organized by the peripheral function. Select a function from the drop down list and the registers associated with that function are shown. Below the registers is a listing of each field in the registers with an interpretation of what the bit pattern means.


RAM

The debugger RAM tab shows the target RAM. Red numbers indicate locations that changed since the last time the program stopped. Some locations are blacked out that either do not represent a physical register or are not available during debugging. To change a RAM location double click the value to change. All numbers are in hex. The window is automatically refreshed when autoread is checked. Click on refresh button to manually refresh it.


ROM1

ROM

The ROM tab shows the contents of the target program memory both in hex and disassembled. This data is initially from the HEX file and is not refreshed from the target.


Tasks

The task window displays the details of the RTOS tasks like current running one and cycle times etc.


Watches

Click the + icon when the watch tab is selected to enter a new expression to watch. The helper window that pops up will allow you to find identifiers in your program to watch. Normal C expressions may be watched like:

X

X+Y

BUFFER[X]

BUUFER[X].NAME

Note that where the editor cursor is in the source file at the time you enter the watch will affect how the expression is evaluated. For example consider you have two functions F1 and F2 and you simply enter I as a watch expression. The I that you get will depend on what function the cursor is in. You can proceed any variable with a function name and period to exactly specify the variable (like: F1.I). The format of the result is decimal by default. The other specifiers are:

expr, h - hexadecimal format

expr, b - binary format

expr, c - character format

expr, s - string format

expr,.x - floating with x decimal places


Stack

This tab shows the current stack. The last function called and all its parameters are shown at the top of the list.


Show All

Show All | Shows all the debugger windows
Hide All | Hides all the debugger windows.
Reset Debug Windows | Resets all the debug windows into their original position.


Format Source1

Format Source

This utility formats the source file for indenting, color syntax highlighting and other formatting options. Select the desired checkboxes from the Option and Add Space menu and click on Format.

Format Selection - The Format Selection checkbox will be active only when some part of the code is selected, otherwise this utility will format the entire sourcefile which is being viewed.

Options:

Key Words in Upper Case – This will set all key words like int, while, void to upper case.

Add blank lines between blocks – This will add a blank line between two code blocks. A blank line will be added after the ending brace of one function to separate it from the next function.

Split long lines – This will split long lines by adding a carriage return and line . Care must be taken so that single line comments do not get split into multiple lines causing the compiler to see undefined characters.

Trail Brace at end of line – This will set the trail brace appearing at the end of the code onto the next line.

Add Spaces:

This will add a space within the special characters selected.

In Parenthesis – This will add a space within any parenthesis. A space is added following every '(', and a space is added preceding every ')'.

Out of Parenthesis – This will add a space outside of a parenthesis. A space is added preceding a '('.

Comma – This will add a space after every comma ','.

Semicolon – This will add a space after every semicolon ';'.

Operators – This will add a space before and after every operator like '=', '+', '*'.

And/Or sign – This will add a space before and after every AND (& or &&) and OR (| or ||) sign.

Braces – This checkbox will be active only when the Trail Brace at end of line box in options menu is checked. This will add a space after every brace.


Generate Documentation

Generate

Documentation

Generate Documentation
This utility interfaces the compiler with the documentation generator software. It has the following options -

Template Filename
This allow the user to select the Template used to create the documentation.

Output Filename
This allows the user to set the path and file name for the output of the documentation generator. The output is store in a .RTF (Rich Text File) format.

Include declarations inside #NOLIST
The software produces documentation for code between the #LIST and #NOLIST areas if this box is checked.

Comments
Standard Comments

A comment may appear anywhere within a file except within a quoted string. Characters between /* and */ are ignored. Characters after a // up to the end of the line are ignored.

Comments for Documentation Generator

The compiler recognizes comments in the source code based on certain markups. The compiler recognizes these special types of comments that can be later exported for use in the documentation generator. The documentation generator utility uses a user selectable template to export these comments and create a formatted output document in Rich Text File Format. This utility is only available in the IDE version of the compiler. The source code markups are as follows.

Global Comments
These are named comments that appear at the top of your source code. The comment names are case sensitive and they must match the case used in the documentation template.

For example:

//*PURPOSE This program implements a Bootloader.

//*AUTHOR John Doe

A '//' followed by an * will tell the compiler that the keyword which follows it will be the named comment. The actual comment that follows it will be exported as a paragraph to the documentation generator.

Multiple line comments can be specified by adding a : after the *, so the compiler will not concatenate the comments that follow. For example:

/**:CHANGES

05/16/06 Added PWM loop

05/27.06 Fixed Flashing problem

*/

Variable Comments
A variable comment is a comment that appears immediately after a variable declaration. For example:

int seconds; // Number of seconds since last entry

long day, // Current day of the month

month, /* Current Month */

year; // Year

Function Comments
A function comment is a comment that appears just before a function declaration. For example:

// The following function initializes outputs

void function_foo()

{

init_outputs();

}

Function Named Comments

The named comments can be used for functions in a similar manner to the Global Comments. These comments appear before the function, and the names are exported as-is to the documentation generator.

For example:

//*PURPOSE This function displays data in BCD format

void display_BCD( byte n)

{

display_routine();

};

Source code markups

Documentation template


RTF Editor

Opens the RTF editor program which is a fully featured RTF editor to make integration of documentation into your project easier. The RTF editor program allows you to view and edit the files created by the documentation generator. The Rich View Format is used to edit the document. The Table drop down menu in the RTF editor can be used to add and format tables to your document. The Insert drop down menu can be used to add images and hyperlinks to your document. The output file can also be saved as plain text or in Unicode format.


Flow Chart

This opens the flowchart editor program included with the PCW for quick and easy charting. This tool can be used to generate simple graphics including schematics. The output file will be stored in .DGR format. These drawings can be either black-and-white or color. Objects can be inserted into the flowchart from standard jpg and bitmap images.

Performing Standard Functions

Draw a Line
Select the Lines tab. Left click once on the straight line image. This will select the line. Left click once in the image edit window, which will draw the line.

Change Location
To change the location of the line, left click on the line and drag it to the desired location.

Change Size/Orientation
To change the size and orientation of the line, left click at either of its end points and drag it to the desired size and orientation.

Change Line Thickness
Select the line to be edited. Click on the line width edit image located above the tabs. Select desired thickness from the drop down menu.

Line Type
Select the line to be edited. Click on the Dash-Dot edit image located above the tabs and select the desired line type – Solid, Dot, Dash, Dash-Dot and Dash-Dot-Dot.

Line Color
Select the line to be edited. Use the drop down menu Options > Line Color to edit the line color.

Delete the Line
Select the Line using the mouse arrow tool in the Misc tab and then click on X in the Misc tab to delete the line.

Draw ZigZag lines

Select the zigzag line using the mouse, and left click on the image edit window to start the zigzag line. Left click any number of times to get a zigzag patter. Double click te left button to end the line.

Draw a curved line
Select the curved line from the Lines tab and draw the line on the image edit window. Drag the midpoint of the curved line to adjust the curve.

Drawing Arrows
Select the arrows tab. Left click to select the desired arrow. Left click again to place it onto the image edit window.

Change Location
To change the location of the arrow, left click on the arrow and drag it to the desired location.

Change Size
To change the size the arrow, left click at any of its end points and drag it to the desired size.

Rotate Arrow
Click on the small circle inside the image of the arrow and drag to change the orientation. The circle is located near the midpoint of the right edge of each image.

Arrow Color
Select the arrow to be edited. Use the drop down menu Options > Shape Color to edit the arrow color.

Flow Chart
Select the Flowchart tab and choose the desired shape. Left click once to select the shape,and left click again to place the shape on the image edit window.

Change Location
To change the location of the shape, left click on the arrow and drag it to the desired location.

Change Size
To change the size the shape, left click at any of its end points and drag it to the desired size.

Rotate Shape
Click on the small circle inside the image of the shape and drag to change the orientation. The circle is located near the midpoint of the right edge of each image.

Shape Color
Select the shape to be edited. Use the drop down menu Options > Shape Color to edit the shape color.

Adding Text
Select the flowchart shape to which you want to add text. Go to the 'All Objects' tab and select Text. 'A'

Left click again inside the flowchart at the location where you want to place the text. A text box will appear with the default text 'Text Block'. Use the F2 key to edit the text. Font and size of the text can be changed using the drop down menu, or by right clicking on the text box to choose options for Font and Edit text.

Adding Color to Text
Left click to select the text box and F2 key to edit the text. Select the text to be edited either by using mouse-over or by using Shift+Arrow Keys. Left click the text color edit image and select the desired color from the color palette.

Drawing Electrical Components
Select the Electric tab. Choose the component you wish to draw using a single left click of the mouse. Place the component on the image edit window at the desired location.

Change Location
To change the location of the component, left click on it and drag it to the desired location.

Change Size
To change the size the component, left click at any of its end points and drag it to the desired size.

Rotate Component
Click on the small circle inside the image of the component and drag to change the orientation. The circle is located near the midpoint of the right edge of each image.

Gradient Settings
A blank image can be filled with vertical or horizontal lines or a grid. Select a blank image from the 'All Objects' tab. Use the Options > Gradient Settings to select the gradient.

Shadow Settings
Select the object to which you want to add a shadow. Click on the shadow edit image and select from the shadow options.

Import an Image

For importing an image, you need to have a image/object open and selected in your edit window. If you are beginning your diagram, then select the Blank Image from the 'All Objects' tab. Resize this blank image so that your image will fit inside it, or else the image resizes itself. Select the blank image by using left click. Use the drop down menu – Options > Picture to load an image onto your existing blank workspace. If you already have text/images in your workspace, they will superimpose the image.

An image can be imported onto any flowchart shape in the similar manner


Spell Check Quotes

Spell Check Quotes | Performs a spelling check of all constant strings in the currently opened file.
Spell Check Comments | Performs a spelling check of all commented text in the currently opened file.


Print All Files

Prints all the files in the current or last compiled project.


User Tool Bar

User can customize this tool bar to add their favorite icons


Download Manager

This software connects the user to CCS through the web and automatically checks if compiler updates are available. The latest data sheets can also be downloaded using this software.

Current Version Information
When the Download Manager is opened using the ccsdownload.exe, it will display the version of the compiler currently installed on your system. Version and date information for the ICD, IDE, Download Manager and the C Reference manual are also displayed.

Configuration
Use the Options drop down menu to set your configurations. Check the box 'When doing automatic updates limit the search to the following products' to access the products list. Use the check boxes to select the product you want to get an update on. For example - Microchip 14 bit compiler.

Saving Downloads
This utility allows you to save an archive copy of your downloads. Specify the path in the Archive Location window.

Automatically Check for Updates
Use the radio buttons in the configuration window to select your settings for monitoring the updates.

When updates are found
Use radio buttons to select the action you wish to perform when a particular update is found.

Check Account / Order Updates
Use the Options menu to access this feature. This will redirect your web browser to your Purchase History page on the CCS website.


(Main Menu)Help

Click on the [image] icon on the right side of the toolbar to get the drop down help menu.

Contents | The help file table of contents.
Index | The help file index.
Keyword at cursor | Does an index search for the keyword at the cursor location. Press F1 to use this feature.
Debugger Help |
Editor | Displays the editor help that reviews the PCW editor features.

Data Types

Shows the data types help page.

Operators

Shows the Operators help page.

Statements

Shows the Statements help page.

Preprocessor cmds

Shows the preprocessor command page.

Built in functions

Shows the built-in functions help page.

Internet

These options invoke your WWW browser with the requested CCS Internet page. Click on this option to get the submenu:

CCS Home | Opens the CCS home page (www.ccsinfo.com) in the browser.
Maintenance options | Opens the renewals page in the browser. Be sure to have your reference number ready. www.ccsinfo.com/index.php?cPath=Store_Software_Maintenance.
Data Sheets for device drivers | A list of various manufacture data sheets for devices CCS has device drivers for (such as EEPROMs, A/D converters, RTC...)
PIC web resources | Opens the PIC web resources page. Shows the renewal page for existing customers.


(Help)Technical Support

Technical Support

Window

The Technical Support process and tips for reporting problems can be viewed by selecting the corresponding bullet.

Click Next and the default email program will be launched so that an email can be sent to CCS Technical Support.

Check "request tracking number ASAP" to receive a tracking number, which can be used to follow the progress of the issue. Check "attach project files to email" to attach project files to the email which is useful when the issues may be syntactical or another code generated problem.


Check for S/W updates

Check for Software updates

Brings up the download manager program to check for software updates.


(Help)About

About

Shows the version of the IDE and each installed compiler.


(Search)FindTextinProject

HEADING

This is placeholder text for your template. To add content to the body, replace this text. To add a header or footer, click the Header or Footer button on the toolbar.

The heading in this template is a special field for topic titles, so generally you do not need to edit it.

For information about applying templates to topics, press F1.


(Search)Ignore Case

Ignore Case

Ignores the case when searching if checked.


Advanced_Statistics

Advance Help on Statistics

The Halstead Complexity and McCabe Cyclomatic number are used to derive the program metrics.

Halstead Complexity Measures:

Halstead complexity measurement was developed to measure a program module's complexity directly from the source code, with emphasis on computational complexity. It uses operators and operands in the module to determine the complexity.

Halstead measures are based on four scaler numbers derived directly from the program's source code:

n1 = The number of distinct operators

n2 = The number of distinct operands

N1 = The total number of operators

N2 = The total number of operands

Using the above numbers, the following five measures are derived:

Measure | Symbol | Formula
Program Length | N | N=N1+N2
Program Vocabulary | n | n=n1+n2
Volume | V | V=N*(LOG2n)
Difficulty | D | D=(n1/2)*(N2/n2)
Effort | E | E=D*V

McCabe Cyclomatic Complexity:

It measures the number of linearly independent paths through a program module. McCabe's Cyclomatic number v(G) shows the complexity of the flow control through a piece of code.

More simply, if D is number of decision nodes, then

v(G)=D+1

Maintainability Index:

A program's maintainability is calculated using a combination of widely-used and commonly-available measures to form a Maintainability Index (MI). The basic MI of a set of programs is a polynomial derived from the cyclomatic complexity, average Halstead volume, average line of code and average percent of lines of comments.


As Text File

Opens a file as a text file. The file is shown in HEX and ASCII.


Binary File

Opens a binary file in read only mode. The file is shown in HEX and ASCII.


Build All

Build all | Builds all the units in the project.
Build what is needed | Builds only the units that has changed after the last compile.


COD Debug File

Opens a debug file in read only mode. The file is shown in an interpreted form.


COFF Debug File

Opens a COFF debug file in read only mode. The file is shown in an interpreted form.


Documentation template

The documentation template is a Rich Text file with some special markup strings within. These markup strings are replaced with data from your source code.

The markup strings are as follows:

%PROJECTPATH% - This is the full directory path to the project file.

%PROJECTNAME% - This is the name of the project file (without the .pjt extension)

The following tags are used to identify a group that should be repeated for every function in the program.

%FOR EACH FUNCTION% - Start tag

%END FOR% - End tag

Inside the above tags, the following refer to the individual functions:

%F:FUNCTION% - The function name

%F:DESCRIPTION% - Un-named comments associated with this function.

The following special markups are lists. If they appear inside a table, then the table rows are duplicated for each item in the list. If they are outside a table then the items are listed one per line.

%S:SOURCEFILES% - This is a list of source files

%S:OUTPUTFILES% - This is a list of output files

%D:ID% - A list of #defines

%D:VALUE% - A list of #define values

%D:DESCRIPTION% - A list of #define comments

%T:ID% - A list of TYPEDEF's

%T:TYPE% - A list of TYPEDEF values

%T:DESCRIPTION% - A list of TYPEDEF comments

%G:ID% - A list of global variables

%G:TYPE% - A list of global variable types

%G:DESCRIPTION% - A list of global variable comments

%L:ID% - A list of local variables

%L:TYPE% - A list of local variables types

%L:DESCRIPTION% - A list of local variables comments

Any other string of the form %identifier% is considered as a user defined named comment. It is associated with the corresponding comment in the source code.

Note: The named comment is case sensitive.

For example: In your source code, if you wish to place the following named comment:

//*AUTHOR John Doe.

In your template you will include the following markup:

%AUTHOR%

This markup will be replaced by text in your source code – “John Doe” in this case.


Find...

Finds all occurrences of the selected word in the project.


Find Text In Project

Searches all files in a project for a given text string.


Find text in project1

Find text in project

Searches all files in a project for a given text string.


Hex File

Hex Debug File

This file opens a .HEX file in read only mode. The file is formatted using the Intel HEX file standard.


Include Dirs

Allows the specification of each directory to be used to search for include files for just this project. This information is saved in the .PJT file.


Search for text

Searches all the project files for the specified text.


SOFTWARE LICENSE AGREEMENT

By opening the software diskette package, you agree to abide by the following provisions. If you choose not to agree with these provisions promptly return the unopened package for a refund.

1. License- Custom Computer Services ("CCS") grants you a license to use the software program ("Licensed Materials") on a single-user computer. Use of the Licensed Materials on a network requires payment of additional fees.

2. Applications Software- Derivative programs you create using the Licensed Materials identified as Applications Software, are not subject to this agreement.

3. Warranty- CCS warrants the media to be free from defects in material and workmanship and that the software will substantially conform to the related documentation for a period of thirty (30) days after the date of your purchase. CCS does not warrant that the Licensed Materials will be free from error or will meet your specific requirements.

4. Limitations- CCS makes no warranty or condition, either expressed or implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose, regarding the Licensed Materials.

Neither CCS nor any applicable licensor will be liable for an incidental or consequential damages, including but not limited to lost profits.

5. Transfers- Licensee agrees not to transfer or export the Licensed Materials to any country other than it was originally shipped to by CCS.

The Licensed Materials are copyrighted

© 1994-2006 Custom Computer Services Incorporated

All Rights Reserved Worldwide

P.O. Box 2452

Brookfield, WI 53008


Source code markups

The compiler recognizes comments in the source code based on certain markups. The compiler recognizes the following types of comments that can be later exported for use in the documentation generator. They are as follows:

Global Comments – These are named comments that appear at the top of your source code. The comment names are case sensitive and they must match the case used in the documentation template.

For example:

//*PURPOSE This program implements a Bootloader.

//*AUTHOR John Doe

A '//' followed by an * will tell the compiler that the keyword which follows it will be the named comment. The actual comment that follows it will be exported as a paragraph to the documentation generator.

Multiple line comments can be specified by adding a : after the *, so the compiler will not concatenate the comments that follow. For example:

/**:CHANGES

05/16/06 Added PWM loop

05/27.06 Fixed Flashing problem

*/

Variable Comments – A variable comment is a comment that appears immediately after a variable declaration. For example:

int seconds; // Number of seconds since last entry

long day, // Current day of the month

month, /* Current Month */

year; // Year

Function Comments – A function comment is a comment that appears just before a function declaration. For example:

// The following function initializes outputs

void function_foo()

{

init_outputs();

}

Function Named Comments – The named comments can be used for functions in a similar manner to the Global Comments. These comments appear before the function, and the names are exported as-is to the documentation generator.

For example:

//*PURPOSE This function displays data in BCD format

void display_BCD( byte n)

{

display_routine();

};


Specific to User

Specific to User | When selected PCW will save a different set of settings for each user
Recall Open Files | When selected PCW will always start with the same files open as were open when it last shut down. When not selected PCW always stats with no files open
Order Open Files | Arranges the file tabs alphabetically


SX Wizard

This command will bring up a number of fill-in-the-blank forms about your new project. RS232 I/O and i2C characteristics, timer options, interrupts used, A/D options, drivers needed and pin names all may be specified in the forms. When drivers are selected, the tool selects pins required and pins that can be combined will be. The user may edit the final pins selections. After all selections are made the initial .c and .h files are created with #defines, #includes and initialization commands required for your project. This is a fast way to start a new project. Once the files are created you cannot return to the menus to make further changes.