Page 1 of 1

viewing registers

Posted: Sat Dec 14, 2013 1:55 pm
by siliconchip
hi all when slowing the simulation speed and using the variable watch box to check the status of the variables selected during simulation, is it possible to watch actual registers such as intcon etc rather than just the variables selected/created

Re: viewing registers

Posted: Sun Dec 15, 2013 2:59 am
by Kenrix2
That would certainly be my dream simulator but, I don't see how it could be done. Have you looked into a hardware version like the FlowKit in-circuit debug system? Some tools are a must have like, Digital Multimeter, Digital Recording Oscilloscope and or Logic Analyzer. The FlowKit in-circuit debug system would be a nice addition to those tools. Just a guess but, I think the Flowkit and assigning Flowcode variables to registers described here http://www.matrixmultimedia.com/mmforum ... 26&t=14096 would make it the ultimate debugging tool. Maybe someone who owns one could chime in.

Re: viewing registers

Posted: Sun Dec 15, 2013 9:51 am
by siliconchip
thanks for the reply kenrix2, yes dream simulator in deed has anyone else got any views on this please

Re: viewing registers

Posted: Sun Dec 15, 2013 12:26 pm
by medelec35
Just with Flowcode simulator and no hardware then the answer is no.

Reason is the only way of displaying registers is to assign a Flowcode Variable to a register E.g by defining just like Kenrix2 excellent flowchart that he has posted a link to.
Or
FCV_CCPRIL = ccpr1l;
for assigning a register called ccpr1l.
etc

Since both methods use C code, it is well know that Flowcode simulator does not simulate C

So if you want to view Variables the only way would be to either use hardware
E.g EB006 programming Eblock, or Flowkit (as Kenrix2 correctly said) or assign Flowcode variable to registers and send values to either LCD or RS232 output.
The latter only uses 1 pin of microcontroller, and will dispaly much more information then an LCD.
However the issue will be unable to single step, so is far from ideal, but there may be around it?

Alternatively there are two simulators that I know of that can take Flowcode generated hex file and allow you to single step and display all the registers.

They are Real pic simulator
I have posted about it here:
http://www.matrixmultimedia.com/mmforum ... 01&#p24998
Cost is about £17.79
Link and target devices:
http://digitalelectrosoft.com/pic-simulator

Or there is PIC SiM IDE:
http://www.oshonsoft.com/pic.html
They have some cheap offers some times.

Martin

Re: viewing registers

Posted: Sun Dec 15, 2013 3:23 pm
by siliconchip
hi martin thanks for the reply I will check the links out thanks

Re: viewing registers

Posted: Sun Dec 15, 2013 3:30 pm
by medelec35
No problem.

Not forgetting the free simulator within Microchips MPLAB:

http://www.microchip.com/stellent/idcpl ... t=SW007002

Re: viewing registers

Posted: Sun Dec 15, 2013 3:45 pm
by siliconchip
martin I have just looked at oshonsoft have you used this and what did you think ? I like the look of this

Re: viewing registers

Posted: Sun Dec 15, 2013 5:49 pm
by medelec35
siliconchip wrote: have you used this and what did you think ?
Yes I have, I find it very good for looking at registers, Flowcode variables, timing with inbuilt stopwatch etc.


Since I find the simulators useful I have bought the whole of the range:

Code: Select all

Full set of personal licenses 
with licenses for all products included: 
- PIC Simulator IDE personal license 
--- PIC basic compiler floating point math support NEW! 
--- PIC basic compiler 32-bit integer math support 
--- PIC basic compiler structured language support 
- PIC18 Simulator IDE personal license 
--- PIC18 basic compiler floating point math support NEW! 
--- PIC18 basic compiler 32-bit integer math support 
--- PIC18 basic compiler structured language support 
--- PIC18 basic compiler USB support 
- PIC10F Simulator IDE personal license 
- AVR Simulator IDE personal license 
--- AVR basic compiler floating point math support NEW! 
--- AVR basic compiler 32-bit integer math support 
--- AVR basic compiler structured language support 
- Z80 Simulator IDE personal license 
- 8085 Simulator IDE personal license 
- Function Grapher personal license
All for £21 and its well worth it.

A tip:
After you have assembled your code to hex, then View asm.
That will then give you all the addresses of Flowcode variables for looking on PIC Sim IDE

I also set breakpoints using special breakpoints, You can set it to break on a variable/register value or change.

Re: viewing registers

Posted: Sun Dec 15, 2013 6:50 pm
by siliconchip
as always martin a big thank you

Re: viewing registers

Posted: Sun Dec 15, 2013 7:44 pm
by medelec35
Your welcome,
So long as information is helpful :)