mcu_hex_factor
mcu_instruction_bits mcu_config_bits mcu_eeprom_bits mcu_uid_bits mcu_instruction_spacing mcu_config_spacing mcu_eeprom_spacing mcu_uid_spacing mcu_erase_page_size mcu_write_row_size mcu_id mcu_can_use_method mcu_can_debug mcu_debug_cap mcu_bp_classes mcu_bp_class_first mcu_bp_class_count mcu_bp_class_cap mcu_bp_class_max_count mcu_debug_rom_reserve mcu_debug_ram_reservemcu_hex_factor
This function returns Hex factor - a ratio between Hex addresses and device addresses.
Syntax
int mcu_hex_factor(
mcu_t mcu
);
Parameters
mcu - a reference to the MCU object returned by mcu_create or mcu_get_slave_core function.
Return
The function returns the Hex factor for the MCU.
Notes
Some of the target devices have oddly sized instructions. For such target devices the addresses in the HEX file are different from device addresses. To convert device addresses to HEX addresses, you need to multiply by the Hex factor.
PIC12 and PIC16 - instruction size is 12 or 14 bits. Hence the instruction needs 2 bytes to store, but occupies only 1 byte in the device address space. Hex factor is 2.
PIC24, dsPIC30, dsPIC33 - instruction size is 24 bits. Hence the instruction needs 4 bytes to store, but occupies 2 bytes in the device address space. Hex factor is 2.
others - HEX factor is 1.
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.