Can one view real time data with a Pickit3?

(instructions, reset, WDT, specifications...) PIC10F2xx, PIC12F5xx, PIC16F5x

Can one view real time data with a Pickit3?

Postby dirkiek » Mon Aug 08, 2016 2:27 pm

Hi,

Can one view real time/live data when debugging with a Pikit3?

I would like to monitor some of SFR's and some of my own verialbles.

I'm using a PIC18F2221, with MPLAB V3.35 and the compiler is XC8 V1.38.
Regards

Dirkie
dirkiek
 
Posts: 2
Joined: Sun Aug 07, 2016 7:59 pm
Location: Cape Town South Africa

Re: Can one view real time data with a Pickit3?

Postby AussieSusan » Tue Aug 09, 2016 3:44 am

Depends on what you mean by 'real time' in this context.
Can you watch the registers/variables change while the processor is still running - no.
Can you use a breakpoint to stop the processor and then look at the registers/variables - yes.
The way the IDE interacts with the processor for debugging is to add in a bit of code called the 'debug kernel' into your application. When you start the application going, the debug kernel is the first thing to start up and it tries to communicate with the IDE/debugger. When the debugger tells it to 'run', the debug kernel will jump to the start of your application code. Your code will then run until it hits a breakpoint when the debug kernel will again get control.
It is only when the IDE can communicate with the debug kernel that the debugger can request the values of registers etc.
Susan
AussieSusan
Verified identity
 
Posts: 52
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist

Re: Can one view real time data with a Pickit3?

Postby dirkiek » Tue Aug 09, 2016 7:31 pm

Hi Susan,

Thanks I got it going as you described and I can see the registers/variables change.

I'm having a hard time getting the i2c working on my PIC18F2221. MCC does not include the PIC18F2221 MCU so I'm battling a bit.

Kind Regards,
Dirkie
Regards

Dirkie
dirkiek
 
Posts: 2
Joined: Sun Aug 07, 2016 7:59 pm
Location: Cape Town South Africa

Re: Can one view real time data with a Pickit3?

Postby AussieSusan » Wed Aug 10, 2016 3:22 am

There are a lot of code examples for I2C around any (I'm guessing here but) many would work OK with most of the PIC18F devices as I don't think the MSSP hardware varies that much between devices in the family.
Susan
AussieSusan
Verified identity
 
Posts: 52
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist


Return to 12-Bit Core

Who is online

Users browsing this forum: No registered users and 1 guest