Page 1 of 1

Can one view real time data with a Pickit3?

PostPosted: Mon Aug 08, 2016 2:27 pm
by dirkiek
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.

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

PostPosted: Tue Aug 09, 2016 3:44 am
by AussieSusan
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

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

PostPosted: Tue Aug 09, 2016 7:31 pm
by dirkiek
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

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

PostPosted: Wed Aug 10, 2016 3:22 am
by AussieSusan
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