background image

Easy

PIC

for dsPIC30

®

v7

page 14

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 
chip 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 12 and 13.

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 Window and monitor their values. Complete 
guide to using mikroICD

 with your compiler is provided with the 

EasyPIC

 v7 for dsPIC30

®

 package.

How do I use the debugger?

Figure 5-3: mikroC PRO for dsPIC

®

 compiler in debugging view, with SFR registers in Watch Window

Figure 5-2: mikroICD

 manual 

explains debugging thoroughly

mikro

ICD

in-circuit debugger

Содержание EasyPIC v7

Страница 1: ...pports 3 3V and 5V devices Dual Power Supply Easily add extra boards mikroBUS sockets Four connectors for each port Amazing Connectivity 14 microcontrollers supported dsPIC30 in DIP package Fast USB 2...

Страница 2: ...In its each and tiniest piece we had put all of our energy creativity and sense of what s best for an engineer Today we present you the 7th generation of our boards which brings us some exciting new...

Страница 3: ...to know Piezo Buzzer Input Output Group Programming software ADC inputs On board programmer Dual power supply Supported microcontrollers Touch panel controller Additional GNDs Introduction Power Supp...

Страница 4: ...0 development Team EasyPIC v7 for dsPIC30 is all about connectivity Having three different connectors for each port you can connect accessory boards sensors and your custom electronics easier then eve...

Страница 5: ...for dsPIC30 It has 30 MIPS operation 48K bytes of program memory 2048 bytes of SRAM memory 1024 bytes of EEPROM memory It has 24 bit wide instructions and 16 bit wide data path It s loaded with great...

Страница 6: ...you are using 5V or 3 3V power supply Upon providing the power using either external adapter or USB power source you can turn on power supply by using SWITCH 1 Figure 3 1 Power LED Green ON will indic...

Страница 7: ...w terminals place jumper J8 in EXT position and place jumper J16 in 5V or 3 3V 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...

Страница 8: ...VCC MCU C32 100nF VCC MCU C30 100nF VCC MCU C38 100nF VCC MCU C39 100nF VCC MCU C35 100nF VCC MCU C26 100nF VCC MCU C27 100nF VCC MCU C19 100nF VCC MCU MCU VPP MCU VPP MCU VPP MCU VPP MCU VPP MCU VPP...

Страница 9: ...slowly down until all the pins match the socket as shown in Figure 4 4 Check again if everything is placed correctly and press the microcontroller until it is completely plugged into the socket as sho...

Страница 10: ...in the programmer USB cable LINK LED should light up DIP40B DIP28C DIP40A DIP28A DIP28B Why so many LEDs Three LEDs indicate specific programmer operation Link LED lights up when USB link is establis...

Страница 11: ...VCC BRD VCC MCU J3 J1 J2 MCU PGC MCU PGD RF2 RF3 RB6 RB7 RF7 RF8 RB4 RB5 RF2 PGC RF7 PGC RB5 PGC RB6 PGC RF3 PGD RB7 PGD RF8 PGD RB4 PGD DATA BUS T43 VCC BRD MCLR R13 10K R14 1K C8 100nF Figure 5 1 mi...

Страница 12: ...nding on which operating system you use choose adequate folder and open it Installing programmer drivers In the opened folder you should be able to locate the driver setup file Double click on setup f...

Страница 13: ...kroProg programmer requires special programming software called mikroProg Suite for PIC This software is used for programming all of Microchip microcontrollerfamilies includingPIC10 PIC12 PIC16 PIC18...

Страница 14: ...essional 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 m...

Страница 15: ...nstruction 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...

Страница 16: ...unication voltage levels are different than microcontroller logic levels it is necessary to use a RS 232 Transceiver circuit such as MAX3232 as shown on Figure 6 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...

Страница 17: ...selection is done using DIP switches SW8 and SW9 1 2 3 4 5 6 7 8 O N SW8 RC14 RF2 RF4 RF7 RE6 RB5 J20 RX FTDI RX 232 RX 1 2 3 4 5 6 7 8 O N SW9 RC13 RF3 RF5 RF8 RE7 RB4 J21 TX FTDI TX 232 TX 1 2 3 4 5...

Страница 18: ...ith the necessary physical interface for CAN communication Make sure to correctly connect negative and positive differential communication lines before using this module 5 6 7 8 C10 100nF R47 10 CN11...

Страница 19: ...communication pins SPI UART and I2 C communication There are also single pins for PWM Interrupt Analog input Reset and Chip Select Pinout contains two power groups 5V and GND on one header and 3 3V a...

Страница 20: ...0 accessory boards is now enriched by an additional set of mikroBUS compatible Click Boards Almost each month several new Click boards are released It is our intention to provide the community with as...

Страница 21: ...your Click board up and running We provided the examples for mikroC mikroBasic and mikroPascal compilers on our Libstock community web site Just download them and you are ready to start http www libst...

Страница 22: ...pment easier and the entire EasyPIC v7 for dsPIC30 cleaner and well organized We have also provided an additional PORT headers on the left side of the board so you can access any pin you want from bot...

Страница 23: ...ike CN3 on Figure 10 4 and one 1x10 row of connection pads like CN5 on Figure 10 4 There is one more IDC10 header available on the left side of the board next to the section with displays These header...

Страница 24: ...ed in 4 bit data mode so lower half of the data byte interface is connected to GND D4 D7 Upper half of the data byte LED Connection with the back light LED anode LED Connection with the back light LED...

Страница 25: ...e ports are used by 2x16 character LCD display you cannot use both displays simultaneously You can control the display contrast using dedicated potentiometer P2 Full brightness display back light can...

Страница 26: ...inside Figure 13 3 Now place GLCD with Touch panel into GLCD socket 1 2 3 Figure 13 5 Turn on switches 5 through 8 on SW11 to enable Touch panel controller Touch panel is enabled using SW11 5 SW11 6...

Страница 27: ...RC13 RC14 RF4 and RF5 lines on the microcontroller sockets To enable digit select lines for the 4 digit 7 segment display you have to turn on SW11 1 SW11 2 SW11 3 and SW11 4 switches Digit select lin...

Страница 28: ...device to easily identify all devices sharing the same interface Board provides a separate socket TS1 for the DS1820 Communication line with the microcontroller is connected via jumper J9 EasyPIC v7...

Страница 29: ...sor in TO 92 plastic packaging Readings are done with microcontroller using single analog input line which is selected with jumper J13 Jumper connects the sensor with either PB8 or PB10 microcontrolle...

Страница 30: ...bits which converted to integer is 212 4096 This means that supported voltage range for example from 0 5V can be divided into 4096 discrete steps of about 1 22mV We gave you the possibility to set mi...

Страница 31: ...place J14 SCL and J15 SDA jumpers in appropriate position 1k pull up resistors necessary for I2 C communication are already provided on SDA and SCL lines Prior to using EEPROM in your application mak...

Страница 32: ...to either RD0 or RA11 microcontroller pin Buzzerstarts singing whenyouprovide PWM signal from the microcontroller to the buzzer driver The pitch of the sound is determined by the frequency and amplit...

Страница 33: ...on microcontroller pins or signals of on board modules GND is located between RS 232 UART module and SW8 DIP switch GND is located on the left side of the PORTF I O group GND is located on the left si...

Страница 34: ...system of users Welcome Projects If you want to find answers to your questions on many interesting topics we invite you to visit our forum at http www mikroe com forum and browse through more than 150...

Страница 35: ...this manual 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 witho...

Страница 36: ...www mikroe com If you are experiencing some problems with any of our products or just need additional information please place your ticket at www mikroe com support If you have any questions comments...

Страница 37: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Mikroe MIKROE 1153...

Отзывы: