Calculator

Top  Previous  Next

 

A prime purpose of  the embedded calculator is to evaluate expressions and to convert values from one radix to another. You can copy the calculated value to the clipboard.

 

 

Element of dialog

Description

Expression

The text box for entering an expression or number.

Copy As

Specifies the format of results that will be copied to the clipboard.

Signed Values

If this box is checked the result of a calculation will be interpreted and displayed as a signed value (for the decimal format only).

Display Leading Zeroes

If this box is checked, binary and hexadecimal values retain leading zeroes.

Copy

Copies the result to the clipboard in the format set by the Copy As radio button.

Clr

Clears the Expression text box.

Bs

Deletes one character (digit) to the left of the insertion point (Backspace).

0x

Inserts "0x".

>>

Shifts the expression result to the right by the specified number of bits.

<<

Shifts the expression result to the left by the specified number of bits.

Mod

Calculates the remainder of division by the specified number.

While you are typing the expression in the Expression drop-down list box ChipProgUSB tries to evaluate the expression and immediately displays the result in different formats in the Result area. Statuses of the Copy As radio button and two check boxes in this area control the result format.

You can assign values to program variables and SFRs by typing an expression that contains the assignment. For example, you may type SP = 66h and the value of 66h will be assigned to SP.

Examples of expressions:

0x1234

-126

main + 33h

(float)(*ptr + R0)

101100b & 0xF