pic16f1826 error
Quote from cpexpert6 on September 13, 2026, 11:13 pmFriends, I'm trying to simulate a project using the PIC16F1827, but it throws an error upon startup. I am attaching the .c, .hex (from XC8), and .sim2 files. What could be causing the error? I'm using SimulIDE 2.0.0.
log:
NOVO CIRCUITO
Inicializando p16F1826-3443
p16F1826-3443 Inicializado
Carregando arquivo hex:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.hex
Endereço Linear Estendido: 0x10000
Palavra de Configuração Carregada em: 0x8007 valor = 0x3F84
INTOSCIO: I/O OSC1
Watchdog: Desativado
MCLR: Desativado
Palavra de Configuração Carregada em: 0x8008 valor = 0x1EFF
PLL: Desativado
Firmware carregado com sucesso
Circuito Carregado:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.sim1
Iniciando Simulação do Circuito...
Inicializando 57 eElementos
Inicializando 21 eNós
Simulação em Execução...
eMcu::stepCpu: Erro PC = 4541 Tamanho do PGM = 2048
MCU parado
Friends, I'm trying to simulate a project using the PIC16F1827, but it throws an error upon startup. I am attaching the .c, .hex (from XC8), and .sim2 files. What could be causing the error? I'm using SimulIDE 2.0.0.
log:
NOVO CIRCUITO
Inicializando p16F1826-3443
p16F1826-3443 Inicializado
Carregando arquivo hex:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.hex
Endereço Linear Estendido: 0x10000
Palavra de Configuração Carregada em: 0x8007 valor = 0x3F84
INTOSCIO: I/O OSC1
Watchdog: Desativado
MCLR: Desativado
Palavra de Configuração Carregada em: 0x8008 valor = 0x1EFF
PLL: Desativado
Firmware carregado com sucesso
Circuito Carregado:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.sim1
Iniciando Simulação do Circuito...
Inicializando 57 eElementos
Inicializando 21 eNós
Simulação em Execução...
eMcu::stepCpu: Erro PC = 4541 Tamanho do PGM = 2048
MCU parado
Quote from sorro on September 14, 2026, 3:45 pmlog:
NOVO CIRCUITO
Inicializando p16F1826-3443
p16F1826-3443 Inicializado
Carregando arquivo hex:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.hex
Endereço Linear Estendido: 0x10000
Palavra de Configuração Carregada em: 0x8007 valor = 0x3F84
INTOSCIO: I/O OSC1
Watchdog: Desativado
MCLR: Desativado
Palavra de Configuração Carregada em: 0x8008 valor = 0x1EFF
PLL: Desativado
Firmware carregado com sucesso
Circuito Carregado:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.sim1
Iniciando Simulação do Circuito...
Inicializando 57 eElementos
Inicializando 21 eNós
Simulação em Execução...
eMcu::stepCpu: Erro PC = 4541 Tamanho do PGM = 2048
MCU parado
log:
NOVO CIRCUITO
Inicializando p16F1826-3443
p16F1826-3443 Inicializado
Carregando arquivo hex:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.hex
Endereço Linear Estendido: 0x10000
Palavra de Configuração Carregada em: 0x8007 valor = 0x3F84
INTOSCIO: I/O OSC1
Watchdog: Desativado
MCLR: Desativado
Palavra de Configuração Carregada em: 0x8008 valor = 0x1EFF
PLL: Desativado
Firmware carregado com sucesso
Circuito Carregado:
F:/pic16f628a/pic16f1826_4a20ma/pic16f1826_4a20ma.sim1
Iniciando Simulação do Circuito...
Inicializando 57 eElementos
Inicializando 21 eNós
Simulação em Execução...
eMcu::stepCpu: Erro PC = 4541 Tamanho do PGM = 2048
MCU parado
Quote from nemka on September 14, 2026, 8:32 pmA pointer stored in FSR1 overwrites the RAM. Simulation stops when PCLATH is overwritten.
When the simulation stops, PCL is 0xBD, so the error caused when PCL is 0xBC. PC can be 0x00BC, 0x01BC or 0x02BC.
Disassembly listing will help you to find the error in your code.
A pointer stored in FSR1 overwrites the RAM. Simulation stops when PCLATH is overwritten.
When the simulation stops, PCL is 0xBD, so the error caused when PCL is 0xBC. PC can be 0x00BC, 0x01BC or 0x02BC.
Disassembly listing will help you to find the error in your code.
