viewing registers
Moderator: Benj
-
siliconchip
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 25 times
viewing registers
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
-
Kenrix2
- Flowcode v5 User
- Posts: 211
- Joined: Tue Feb 19, 2013 9:51 pm
- Has thanked: 72 times
- Been thanked: 177 times
Re: viewing registers
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.
-
siliconchip
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 25 times
Re: viewing registers
thanks for the reply kenrix2, yes dream simulator in deed has anyone else got any views on this please
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: viewing registers
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
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
Martin
-
siliconchip
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 25 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: viewing registers
No problem.
Not forgetting the free simulator within Microchips MPLAB:
http://www.microchip.com/stellent/idcpl ... t=SW007002
Not forgetting the free simulator within Microchips MPLAB:
http://www.microchip.com/stellent/idcpl ... t=SW007002
Martin
-
siliconchip
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 25 times
Re: viewing registers
martin I have just looked at oshonsoft have you used this and what did you think ? I like the look of this
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: viewing registers
Yes I have, I find it very good for looking at registers, Flowcode variables, timing with inbuilt stopwatch etc.siliconchip wrote: have you used this and what did you think ?
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 licenseA 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.
Martin
-
siliconchip
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 25 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times