Look at register with HP299.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Taurus
Flowcode V4 User
Posts: 46
Joined: Tue Feb 23, 2010 3:58 pm
Has thanked: 3 times

Look at register with HP299.

Post by Taurus »

I like to buy the HP299-71 debugger but I have a question about this.
Can I also read the registers in the PIC processor like a status register and others.
Taurus

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Look at register with HP299.

Post by Steve »

Not yet, but it is something that we intend to add to Flowcode (it is a software-only modification, so you would not need to update your FlowKit hardware).

However, you can use temporary holding variables in Flowcode to allow this - and then use a C icon to read from (or even write to) a register in the microcontroller at the points in your program where you want to inspect these values.

Taurus
Flowcode V4 User
Posts: 46
Joined: Tue Feb 23, 2010 3:58 pm
Has thanked: 3 times

Re: Look at register with HP299.

Post by Taurus »

Hello,

Some questions and suggestions

 How much extra program memory is required in the PIC when I want to use Flow-kit (HP-299- 30-1)?.

 Before I can use the flow-kit I first must enable the ICD option in flowcode and compile the program before I can apply. Is this correct?.

 When I stop the ICD debugger, then also stops the program in the PIC.
This is very clumsy and for the following reason;
Usually you want to debug when something goes wrong. It would be more comfortable at that moment that you can mount the debugger and retrieve data.
Is it possible:
- to set the debug option on/off in the PIC with macro or variable, for the moment that I like to debug or not.
- or to enable / disable the ICD option in flow-code.
If the software is completely bug free then the PIC can be compiled without ICD debug options. What do you think about this.

 Steve has indicated that it is possible to retrieve registers via a C macro.
How do I do that, do you have an example.

 I have an EB-006-06 board, must I use Portb B6, B7 for debugging or can I select also port E with the PIC 16f877a?

 Is it possible to watch continuous variable (monitoring) in real-time mode.

What does it mean all these Hex values (see FigHex)?
Where can I find the link to the ICD troubleshooting with this problem?

Please, could you answer of all my questions.

Thanks
Attachments
FigHex.PNG
(8.12 KiB) Downloaded 1486 times
Taurus

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times

Re: Look at register with HP299.

Post by Sean »

The ICD code adds slightly less than 1000 bytes to the program memory of a typical Flowcode program. Optimization might reduce this figure for some programs.

FlowKit ICD functionality is enabled when a Flowcode program is compiled with ICD Mode selected in the Project Options menu. This causes the target ICD handler functions to be included in the compiled code.

De-selecting ICD Mode allows a debugged program to be compiled with no ICD support overheads.

When ICD Mode is selected, programs can be run normally from the simulation controls. There is a slight overhead caused by a call to the main ICD handler on completion of each Flowcode block, but this returns almost immediately if no action is required.

If application programs are trapping errors, it should be possible to use break-points in the error traps to prevent the ICD from affecting the program during normal operation.

Variable watch windows are updated each time the target is stopped. This will be on completion of each Flowcode block when one of the single-step controls is being used.

Flowcode can share variable with the underlying C code. As an example, a global Flowcode variable 'Status' will be declared as FCV_STATUS in C.
A Flowcode C block could contain the instruction:

FCV_STATUS = STATUS;

This will copy the target STATUS register into the Flowcode variable 'Status' which can be included in the variable watch window.

The following command in a separate C block would allow the same register to be modified and written from the watch window:

STATUS = FCV_STATUS;

FlowKit can be connected to any normal I/O lines. Port and pin settings can be freely allocated in the Project Options menu if the 'Override ICD pins' option is selected. There is an advantage to using pins 6 and 7 of the selected port, as the default wiring supports this configuration. Alternative configurations can be achieved using the wire-link headers provided on FlowKit.

The hex values displayed in the ICD message window are shown if FlowKit fails to establish communications with the target device. The top row of values is the response expected from the target target device during initialisation. The bottom row is the response received.
In some cases it is possible to use this information to locate connection problems.

Post Reply