Forum breadcrumbs - You are here:ForumGeneral: Report BugsPIC14 issues
You need to log in to create posts and topics.

PIC14 issues

Hello,

some instruction bugs:
- missing clrw instruction
- moviw does not affect WREG

Simulide version: 1.1.0-SR1

The asm and hex files in the zip are from MPLAB v8.92. In MPLAB SIM this demonstration code works as expected.

and a configuration bug:

I tried to add PIC16F1828. 20 pin package (like 16F685).
PORTB has the upper four bits with pull ups and analog inputs.
If I configure ANSELB and WPUB, SIMULIDE crashes.
The working configuration:
<port name="PORTB" pins="8" outreg="PORTB,LATB" dirreg="!TRISB" pinmask="11110000">
<interrupt name="IOC" mask="11110000"/>
</port>
but I need this:
<port name="PORTB" pins="8" outreg="PORTB,LATB" dirreg="!TRISB" pinmask="11110000"
 configregsA="ANSELB"
 pullups="WPUB">
<interrupt name="IOC" mask="11110000"/>
</port>

Thanks for your work. SIMULIDE is a great tool.

Uploaded files:

Hi and thanks for reporting.

I think CLRW, MOVIW, MOVWI are fixed now.
Keep an eye on the next tester build.

About PIC16F1828 I don't know what is needed to add it, I will have a look.

Hi,

I tested it with SimulIDE_1.1.0-260127_test.zip and both CLRW and MOVIW worked well.

Thank you.

I’m not sure if this is the right place—or if I’m even allowed to do this—but I created and edited the files for the PIC16F1828. If you’d like to test it out, just unzip the contents into the SimulIDE folder; it will create and overwrite the necessary files. Make sure to back up your data first.

Let me know if it works or not.
Uploaded files:
Quote from cpexpert6 on August 9, 2026, 8:02 pm

I’m not sure if this is the right place—or if I’m even allowed to do this—but I created and edited the files for the PIC16F1828. If you’d like to test it out, just unzip the contents into the SimulIDE folder; it will create and overwrite the necessary files. Make sure to back up your data first.

Let me know if it works or not.

Hi.

Actually you should create a new topic (Same for your other post).

About pic16f1828:
Thanks for sharing.
A few issues I can see:
- Using the same registers, interrupts, etc. for both MCUs.
- Memory map is also different in some banks.
-1828 has more Timers.

Sorry, I thought it was part of the topic; I'll be more careful.

Quote from cpexpert6 on August 9, 2026, 8:02 pm

I’m not sure if this is the right place—or if I’m even allowed to do this—but I created and edited the files for the PIC16F1828. If you’d like to test it out, just unzip the contents into the SimulIDE folder; it will create and overwrite the necessary files. Make sure to back up your data first.

Let me know if it works or not.

Hi,

here's my files for 16F1828 and 16F1824.

These MCUs have more peripherals, more interrupts and more RAM than 16F1826, not just different packages.

Uploaded files:

These MCUs have more peripherals, more interrupts and more RAM than 16F1826, not just different packages.

Yes, indeed there are still a few things missing or unimplemented. For example:

- Banks 9-31 missing.
- Bank 31 contains shadow registers for context saving (also need implementation in the code).
- Banks 3 to 6 contains some GPRs with a note(2) not explained in the datasheet (at the purest Microchip style).

In any case it could be some issues addressing banks > 15, I will have a look.

 

- I2C and SPI missing.
I had a look and it seems to me that MSSP is pretty similar to the existing implementation used by the "not enhanced".
Most probably it can be added (using the proper registers and PINs):

  <msspunit name="MSSP" type="00" configregsA="SSPCON" >
                        
    <twi name="TWI"  configregsA="SSPCON" configregsB="SSPCON2" 
                     dataregs="SSPBUF" 
                     addressreg="SSPADD"
                     statusreg="SSPSTAT" 
                     interrupt="SSP"
                     prescalers=""
                     pins="PORTC4,PORTC3" /><!-- "SDA,SCL" -->

    <spi name="SPI"  configregsA="SSPCON" 
                     dataregs="SSPBUF" 
                     statusreg="SSPSTAT"
                     interrupt="SSP" 
                     prescalers="4,16,64,0"
                     pins="PORTC5,PORTC4,PORTC3,PORTA5"/><!-- "SD0,SDI,SCK,SS" -->
  </msspunit>