Thank you!

I thought the differences in the .inc were also about the registers ,
so i had to verify that aaaaaall the registers of the 12F1840 are in same addresses as the 16F1828.

Or maybe is it you are using a simple TRISA/PORTA? (em, with also ANSELA,WPUA and OSCON )