background image

page 22

pr

ogr

amming

mikroICD

 - In Circuit Debugger

What is Debugging?

Every developer comes to a point where he has to monitor the 
code  execution  in  order  to  find  errors  in  the  code,  or  simply 
to see if everything is going as planed. This hunt for bugs or 
errors  in  the  code  is  called 

debugging

.  There  are  two  ways 

to  do  this:  one  is 

the  software  simulation

,  which  enables 

you  to  simulate  what  is  supposed  to  be  happening  on  the 
microcontroller as your code lines are executed and the other, 
most  reliable  one,  is  monitoring  the  code  execution  on  the 
MCU itself. And this latter one is called 

In-Circuit debugging

.  

"In-Circuit" means that it is the real deal - code executes right 
on the target device.

What is mikroICD

?

The on-board 

mikroProg

 programmer supports 

mikroICD

 - a 

highly effective tool for a 

Real-Time debugging

 on hardware 

level.  The  mikroICD

  debugger  enables  you  to  execute  your 

program  on  the  host  PIC  microcontroller  and  view  variable 
values,  Special  Function  Registers  (SFR),  RAM,  CODE  and 
EEPROM  memory  along  with  the  mikroICD

  code  execution 

on  hardware.  Whether  you  are  a  beginner,  or  a  professional, 
this  powerful  tool,  with  intuitive  interface  and  convenient 
set of commands will enable you to track down bugs quickly. 
mikroICD

 is one of the fastest, and most reliable debugging 

tools on the market. 

Supported Compilers

All  MikroElektronika  compilers, 

mikroC

mikroBasic

  and 

mikroPascal

  for  PIC®,  dsPIC®  and  PIC32®  natively  support 

mikroICD

. Specialized mikroICD DLL module allows compilers to 

exploit the full potential of fast hardware debugging. Along with 
compilers,  make  sure  to  install  the  appropriate 

programmer 

drivers

 and 

mikroProg Suite for PIC®

 programming software, 

as described on 

pages 20

 and 

21.

When  you  build  your  project  for  debugging,  and  program 
the  microcontroller  with  this  HEX  file,  you  can  start  the 
debugger using 

[F9]

 command. Compiler will change layout 

to  debugging  view,  and  a  blue  line  will  mark  where  code 
execution  is  currently  paused.  Use 

debugging  toolbar

  in 

the 

Watch Window

 to guide the program execution, and stop 

anytime. Add the desired variables to Watch and monitor their 
values. Complete guide to using mikroICD

 with your compiler 

is provided within the mikromedia

 workStation v7 package.

How do I use the debugger?

Figure 5-4: mikroC PRO for PIC32® compiler in debugging view, with SFR registers in Watch Window

Figure 5-3: mikroICD

 manual 

explains debugging thoroughly

mikro

ICD

in-circuit debugger

Summary of Contents for multimedia workStation v7

Page 1: ...v7 Many on board modules Multimedia peripherals Easy add extra boards mikroBUS sockets Four connectors for each port Amazing Connectivity Fast USB 2 0 programmer and In Circuit Debugger mikromedia 6...

Page 2: ...hy we wanted to take things to the next level mikromedia workStation v7 is unlike anything you have seen before With custom pin markings it will revolutionize the way people look at different architec...

Page 3: ...DC inputs DS1820 Digital Temperature Sensor Piezo Buzzer LM35 Analog Temperature Sensor Additional GNDs Breadboard area 34 32 35 33 36 37 UART via RS 232 UART via USB Navigation switch Audio module Co...

Page 4: ...evelopment Team This is a perfect tool for education Since board supports mikromedia boards for PIC18 dsPIC PIC24 and PIC32 you can easily switch to one you need in your development Workstation helps...

Page 5: ...of this DVD prohibited 20122011 www mikroe com It s good to know Package contains introduction System Specifications power supply 7 23V AC or 9 32V DC or via USB cable 5V DC board dimensions 266 x 220...

Page 6: ...ains switching power supply that creates stable voltage and current levels necessary for powering each part of the board Power supply section contains specialized MC33269DT3 3 power regulator which cr...

Page 7: ...als place jumper J1 in EXT position You can then screw on the cables in the screw terminals as shown on images 5 and 6 and turn the power switch ON Board power supply creates stable 3 3V necessary for...

Page 8: ...s shown on Figure 4 2 page 8 1 2 3 4 5 6 mikromedia workStation v7 contains four female headers that together form a socket for specialized small development boards with a microcontroller and on chip...

Page 9: ...SDA 3 3V GND ANALOG INT PWM 3 3V GND PGD PGC NC RST 3 3V GND PGD PGC RST MM1 G0 0 G0 1 G0 2 G0 3 G0 4 G0 5 G0 6 G0 7 G1 0 G1 1 G1 2 G1 3 G1 4 G1 5 G1 6 G1 7 G2 0 G2 1 G2 2 G2 3 A0 A1 G2 4 G2 5 G2 6 G...

Page 10: ...t the mikromedia board slowly down until all the pins match the socket make sure you don t push the screen Check again if everything is placed correctly and press the mikromedia board until it is comp...

Page 11: ...or headphones resistive TFT 320x240 touch screen display with 262 144 different colors battery charger accelerometer microSD cardslotand8Mbitflashmemory mikromedia boardalso contains a MINI B USB conn...

Page 12: ...16 kB Operating MCU Voltage 2 3 6 V USB DEVICE Yes USB UART No Consumption back light is ON 56 2 mA Back light current 42mA Max I2 C speed 400 kHz Max microSD SPI speed 16 MHz Max Flash memory SPI spe...

Page 13: ...Hz Max Audio codec SPI speed 3 33 MHz Architecture 16 bit CPU speed 40 MIPS Flash memory 256 kB RAM memory 30 kB Operating MCU Voltage 3 3 6 V USB DEVICE No USB UART Yes Consumption back light is ON 5...

Page 14: ...ple I O functions BSP package also provides you a simple way of using ADC I2C SPI and UART libraries without knowing for example if it is UART1 or UART2 module connected to mikromedia side pads Before...

Page 15: ...T G2 4 G2 5 G2 6 G2 7 G3 0 G3 1 G3 2 G3 3 G3 4 G3 5 G3 6 G3 7 G4 0 G4 1 G4 2 G4 3 G4 4 G4 5 G4 6 G4 7 3 3V GND 5V GND A0 A1 G0 0 G0 1 G0 2 G0 3 G0 4 G0 5 G0 6 G0 7 G1 0 G1 1 G1 2 G1 3 G1 4 G1 5 G1 6 G...

Page 16: ...on other computers Packages can contain other valuable information such as Library files Help files and Examples To begin first locate the installation archive on the Product DVD After downloading ex...

Page 17: ...e libraries help files and examples Information section shows the list of supported microcontrollers appropriate controller is automatically marked Install package button to install package All you ne...

Page 18: ...at the same time Insert your ICD programmer cable into connector CN7 as shown in images 1 and 2 1 2 Programming with ICD2 ICD3 Figure 5 1 mikroProg is well protected under metal casing Why so many LED...

Page 19: ...D USB VCC 3 3V LED ACT LINK R9 2K2 R10 4K7 R11 6K8 LD2 LD3 LD4 VCC USB USBDN CON USBDP CON FP1 C5 100nF 1 2 3 4 VCC GND D D CN5 USB VCC 3 3V MCU PGC MCU PGD 3 4 5 6 1 2 CN7 ICD C6 100nF VCC 3 3V MCLR...

Page 20: ...the opened folder you should be able to locate the driver setup file Double click on setup file to begin installation of the programmer drivers Welcome screen of the installation Just click on Next b...

Page 21: ...IC16 PIC18 dsPIC30 33 PIC24 and PIC32 Software has intuitive interface and SingleClick programming technology To begin first locate the installation archive on the Product DVD After downloading extrac...

Page 22: ...powerful tool with intuitive interface and convenient set of commands will enable you to track down bugs quickly mikroICD is one of the fastest and most reliable debugging tools on the market Supporte...

Page 23: ...within it Step Over F8 Executes the current program line then halts If the executed program line calls another routine the debugger will not step into it The whole routine will be executed and the deb...

Page 24: ...resistor in pull down state to the selected PORT pin Figure 6 1 I O group contains PORT headers tri state pull up down DIP switch buttons and LEDs all in one place VCC GND BUTTON R6 220 R7 220 VCC 3 3...

Page 25: ...can disable pin protection 220ohm resistors by placing jumpers J5 and J6 which will connect your push buttons directly to VCC or GND Be aware that doing so you may accidentally damage MCU in case of w...

Page 26: ...eers have come up with a simple but brilliant pinout with lines that most of today s accessory boards require which almost completely eliminates the need of additional hardware settings We called this...

Page 27: ...onth several new Click boards are released It is our intention to provide the community with as much of these boards as possible so you will be able to expand your mikromedia workStation v7 board with...

Page 28: ...nectorandthesamepinson the target microcontroller using DIP switches Since RS 232 communication voltage levels are different than microcontroller logic levels it is necessary to use a RS 232 Transceiv...

Page 29: ...VCC 3 3V TXD DTR RTS VCCIO RXD RI GND NC DSR DCD CTS CBUS4 CBUS2 CBUS3 CBUS0 CBUS1 OSCO OSCI TEST AGND NC GND GND VCC RESET 3V3OUT USBDM USBDP FT232RL U2 FT232RL VCC 5V C13 100nF LD7 LD8 RX LED1 TX L...

Page 30: ...ocontroller pins G0 6 G1 0 G0 5 G0 7 G4 1 respectively After pressing the navigation switch in desired direction associated microcontroller pins are connected to GND which can be detected in user soft...

Page 31: ...ard directly from the mikromedia board socket via two connection pins LOUT and ROUT left and right stereo signals You can disconnect each off the amplifiers from the mikromedia socket LOUT and ROUT pi...

Page 32: ...parate so cket TS1 for the DS1820 Communica tion line with the microcontroller is selected with a J3 jumper DS1820 Digital Temperature Sensor DATA BUS R4 G1 7 G2 0 VCC 3 3V mikromedia workStation v7 e...

Page 33: ...kaging Readings are done with microcontroller using single analog input line which is selected with a J4 jumper DATA BUS R5 1K C3 100nF G0 0 G0 3 Figure 13 5 LM35 connected to G0 0 pin mikromedia work...

Page 34: ...ted in maximum number of bits that resulting number occupies For example if microcontroller has 10 bit resolution meaning that maximum value of conversion can be represented with 10 bits which convert...

Page 35: ...mulates the desired signal waveform Supported sound frequencies Piezo buzzer s resonant frequency where you can expect it s best performance is 3 8kHz but you can also use it to create sound in the ra...

Page 36: ...ation v7 board contains two GND pins located in different sections of the board which allow you to easily connect oscilloscope GND reference when you monitor signals on microcontroller pins or signals...

Page 37: ...as resistors LED diodes motors DIP IC s etc on availableBreadboardarea Thereare63 vertical lines on both halves of the Breadboard area Each line consists out of 5 female connectors connected together...

Page 38: ...system of users Welcome Compiler Projects DVD download eng software compilers Development Systems If you want to find answers to your questions on many interesting topics we invite you to visit our fo...

Page 39: ...al or product even if MikroElektronika has been advised of the possibility of such damages MikroElektronika reserves the right to change information contained in this manual at any time without prior...

Page 40: ...experiencing some problems with any of our products or just need additional information please place your ticket at www mikroe com esupport If you have any questions comments or business proposals do...

Page 41: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information MikroElektronika MIKROE 1189...

Reviews: