Studio5 User Guide
Studio5 User Guide
Studio5 User Guide
Download Circuit
A KicChip is easily connected to your Personal Computer via a cable connected to either your
serial or USB socket.
Parts:
10K Resistor
22K Resistor
Microphone Socket
Download Cable
If you are planning on downloading any code or using the In Circuit Debug features, the
KicChip you select in KicStudio should match your physical KicChip.
Select a KicChip from the drop down box at the top of the screen.
If you are not sure what model of KicChip you are connected to, use the KicCheck button to
find out.
You are shown details of the pin size and the current firmware.
System Configuration
1. Allocates RAM space according to the controllers specifications and updates the visual
RAM window.
2. Clears all RAM locations to 0.
3. Allocates EEPROM space according to controllers specifications and updates the visual
EEPROM window. Does NOT clear EEPROM locations.
4. Builds a pin module according to the controllers specifications.
5. Sets all pins to their reset state.
6. Does NOT clear previous watches, unavailable variables will have a value of
'Unavailable'.
7. Clears the symbol explorer.
8. Clears the label/breakpoint explorer.
Editing Your Program
Edit Mode is the initial mode of KicStudio, or can be activated by pressing the Edit Mode Button
or F3.
Edit mode must be selected in order to modify the program source code (and perform other
file related tasks). When enabled, the editor has a white background and the text can be
modified.
· New File
· Open File
· Select micro controller
· Clear EEPROM
· Select Build Mode
· Set animation speed
Auto Complete
Compiling & Simulating
Select Build Mode by clicking the Build Mode button or by pressing F4.
However, these options can become enabled and disabled according to a specific task. The
Pause button for example only becomes enabled after the program starts. Build Mode also
disables the source code editor.
Note: The opposite of Build Mode is Edit Mode.
Animation
Animation can be selected in Build Mode by pressing the animate button, or F5.
Use animation to see the program source code being executed with a controlled delay between
each line.
Animation speed is controlled by the animation control bar.
The main difference between running and animation is that animation highlights each line in
the source code as it executes and the speed of animation can be controlled. Both running and
animation currently update all screen views such as watches, pins and memory (RAM &
EEPROM).
Stepping
Step can be selected in Build Mode by pressing the step button or by pressing/holding F6.
Step can be selected in Build Mode by pressing the step button or by pressing/holding F6.
Use stepping to see a single line of the source code being executed.
Stepping updates all screen views such as watches, pins and memory (Ram & Eeprom).
Use animate to step multiple lines, run to execute at a fast rate.
Running
Run can be selected in Build Mode by pressing the Run button, or F8.
Pressing Run causes the processor to execute code without updating the current line position
in the editor. This reduces screen flicker and executes code much more quickly.
To see the source line highlighted as it is executed, use animation instead.
Both running and animation currently update all screen views such as watches, pins and
memory (RAM & EEPROM).
Virtual Devices
Virtual devices are created automatically after your program is compiled:
LED
Button
Analogue Slider
Pulsout
Pulsin
Serial
Breakpoints
Set/remove a breakpoint in the editor using the breakpoint button. Breakpoints are shown as
large red dots on the breakpoint line.
Breakpoints cause program execution to stop on a line before it is executed. They affect
running, stepping and animation of the code.
The Breakpoint Window contains the properties of each breakpoint in the editor.
Disable Breakpoint
Disable a breakpoint by clicking the check box in the breakpoint window, the breakpoint will
still be visible as a grey circle but will not stop program execution.
Pass Count
Setting a breakpoints pass count, causes the processor to ignore the breakpoint for a fixed
number of times. Set a pass count by clicking the breakpoint properties and setting the pass
count number.
Debugger Windows
Label Window
The Labels window displays a summary of all labels used in your BASIC program, and is a
convenient method of jumping quickly to a line of code.
The window shows the label name and the line on which it is declared.
Symbol Window
The Symbol Window displays a summary of all symbols used in your BASIC program, and is a
convenient method of jumping quickly to a line of code.
The window shows the symbol name and the line on which it is declared.
Watch Window
The watch window displays the current value of variables (including pin variables) in several
common formats.
Users can add a new watch (at any time) by clicking the new watch button. However, the use
of watches slows the execution of the processor since time is taken to retreive current values
and display them in various formats. Deleting all watches will speed up execution.
Variables can be modified during both edit-mode and debug-mode via the Modify Watch
Window.
Modified pin related variables e.g. pins, dirs, pin1 etc are reflected in the Pin Window
immediately. For example, setting "Pins" to $FF will set all pins high in the pins window.
Likewise, clicking on pins in the pin window will will cause the "Pins" variable to change in the
watch window. See pin window help for examples.
Variables that are used in a program can automatically be added by selecting the Auto Watch
button. Auto watches are added when users switch over to Build Mode.
The diagram above shows the cells as they would be prior to the first line being executed in
the demo. The contents of the cells can be seen changing when the program executes a WRITE
command.
Switching to Build Mode causes the simulator to scan for DATA and EEPROM commands and
updates the EEPROM window accordingly. EEPROM can only be reset by switching to Edit Mode
and clicking Reset EEPROM
Pin Window
The pin window shows the functionality and status of the micro controllers pins.
The layout of the micro controllers pins is adjusted as soon as a specific type of controller is
selected:
KicChip8
KicChip18
KicChip28
KicChip40
The content of the pin window is updated as the program is executed (i.e. by HIGH/LOW
commands). The pin window is also interactive so pins can be "Pressed" (see scenario below)
during edit-mode or debug-mode.
Finally the pins possible port letters and functions are displayed, clicking this region changes
the pins connection status/region (i.e. similar to pressing switches connected to a real
controller).
Call Stack Window
The Call Stack Window shows the current stack of GOSUB commands.
This is useful for debugging applications that make extensive use of GOSUB and RETURN
commands.
Each entry in the call stack window shows the point at which an outstanding GOSUB was
called.
As the simulator executes a RETURN command, the call stack is reduced (popped).
Downloading To KicChip
Code downloading can be selected by pressing the download button, or F9.
Code download puts your compiled BASIC program into the connected KicChip.
Managing Your Code History
KicStudio has a built code history viewer that allows you to track changes made to your code
over time.
simply select the 2 file dates that you want to compare, the code difference window displays
Modified , Added and Deleted lines: