mikroBasic PRO for dsPIC
™
Manual
Compiler
MikroElektronika
mikroBasic PRO for dsPIC30/33 and PIC24 is a full-featured Basic
compiler for dsPIC30, dsPIC33 and PIC24 MCUs from Microchip. It
is designed for developing, building and debugging dsPIC30/33 and
PIC24-based embedded applications. This development environment
has a wide range of features such as: easy-to-use IDE, very compact and
efficient code, many hardware and software libraries, comprehensive
documentation, software simulator, COFF file generation, SSA
optimization (up to 30% code reduction) and many more. Numerous
ready-to-use and well-explained examples will give a good start for
your embedded project.
mikoBasic PRO for dsPIC30/33 and PIC24
Table of Contents
CHAPTER 1
INTRODUCTION
Introduction to mikroBasic PRO for dsPIC30/33 and PIC24
What’s new in mikroBasic PRO for dsPIC30/33 and PIC24
Software License Agreement
Compiler Changes
IDE Changes
Features
Where to Start
30
30
31
32
33
31
31
32
32
Technical Support
How to Register
mikroElektronika Associates License Statement and Limited Warranty
IMPORTANT - READ CAREFULLY
LIMITED WARRANTY
HIGH RISK ACTIVITIES
GENERAL PROVISIONS
CHAPTER 2
mikroBasic PRO for dsPIC30/33 and PIC24 Environment
Main Menu Options
File
Edit
File Menu Options
Edit Menu Options
Find Text
Replace Text
Find In Files
Go To Line
Regular expressions option
View Menu Options
Project Menu Options
Build Menu Options
Run Menu Options
Tools Menu Options
Who Gets the License Key
How to Get License Key
After Receving the License Key
35
35
33
33
33
34
34
39
39
40
41
42
35
35
37
41
42
43
43
44
44
44
45
47
48
49
50
View
45
47
48
49
50
Project
Build
Run
Tools
MikroElektronika
2
mikroBasic PRO for dsPIC30/33 and PIC24
Help
Help Menu Options
IDE Overview
51
52
53
mikroBasic PRO for dsPIC30/33 and PIC24 IDE
Code Editor
Editor Settings
Auto Save
Highlighter
Spelling
Comment Style
Code Folding
Code Assistant
Parameter Assistant
Bookmarks
Go to Line
Column Select Mode
Editor Colors
Auto Correct
Auto Complete (Code Templates)
Routine List
51
52
53
54
54
54
54
54
55
55
55
55
56
56
57
58
61
Code Explorer
60
61
63
64
66
66
Project Manager
Project Settings
Library Manager
Routine List
Statistics
Managing libraries using Package Manager
65
Messages Window
Quick Converter
Macro Editor
Image Preview
Toolbars
Memory Usage Windows
RAM Memory Usage
Used RAM Locations
SFR Locations
ROM Memory Usage
ROM Memory Constants
Functions
Functions Sorted By Name Chart
Functions Sorted By Size Chart
Functions Sorted By Addresses
Function Tree
Memory Summary
73
74
74
75
77
66
67
67
68
68
69
69
70
70
71
71
72
3
MikroElektronika
mikoBasic PRO for dsPIC30/33 and PIC24
File Toolbar
Edit Toolbar
Advanced Edit Toolbar
Find/Replace Toolbar
Project Toolbar
Build Toolbar
Debug Toolbar
Styles Toolbar
Tools Toolbar
View Toolbar
Layout Toolbar
Help Toolbar
Docking Windows
Saving Layout
Auto Hide
Code editor
Tools
Output settings
Active Comments Editor
ASCII Chart
EEPROM Editor
Filter Designer
Graphic Lcd Bitmap Editor
HID Terminal
Lcd Custom Character
Seven Segment Editor
UDP Terminal
USART Terminal
New Active Comment
Renaming Active Comment
Deleting Active Comment
78
78
79
79
80
80
81
81
82
82
83
83
84
85
85
86
86
87
89
90
91
91
92
93
94
95
95
96
Customizing IDE Layout
84
Options
86
Integrated Tools
89
Active Comments
Export Project
Jump To Interrupt
Regular Expressions
Introduction
Simple matches
Escape sequences
Character classes
Metacharacters
106
107
108
97
104
105
97
Metacharacters - Line separators
Metacharacters - Predefined classes
108
108
108
108
109
109
110
MikroElektronika
4
mikroBasic PRO for dsPIC30/33 and PIC24
Metacharacters - Word boundaries
Metacharacters - Iterators
Metacharacters - Alternatives
Metacharacters - Subexpressions
Metacharacters - Backreferences
110
110
111
111
111
Keyboard Shortcuts
CHAPTER 3
mikroBasic PRO for dsPIC30/33 and PIC24 Command Line Options
CHAPTER 4
mikroICD (In-Circuit Debugger)
Introduction
mikroICD Debugger Options
mikroICD Debugger Example
mikroICD Debugger Windows
Debug Windows
Breakpoints Window
Watch Values Window
RAM Window
Stopwatch Window
EEPROM Watch Window
Code Watch Window
Debugger Options
112
114
114
116
116
116
118
119
123
118
CHAPTER 5
Software Simulator Overview
Software Simulator
Software Simulator Debug Windows
Debug Windows
Breakpoints Window
Watch Values Window
RAM Window
Stopwatch Window
EEPROM Watch Window
Code Watch Window
Debugger Options
128
128
129
130
123
123
123
125
125
126
127
Software Simulator Debugger Options
CHAPTER 6
mikroBasic PRO for dsPIC30/33 and PIC24 Specifics
Basic Standard Issues
GOTO Table
Divergence from the Basic Standard
C Language Extensions
Predefined project level defines
135
136
136
138
139
130
130
130
132
132
133
134
135
137
138
138
139
Predefined Globals and Constants
5
MikroElektronika