Not that this will help you in the present instance, but this sort of thing is part of why I suggested a while back that you consider using the 16-bit PICs (dsPICs & PIC24F): the instruction set is much more capable, and makes assembly language programming a lot less painful.I just found out that the simple instruction of dividing an 8 bit register by another, with an integer result and a remainder does not exist in the PCI16F1823...![]()
I don't want to risk derailing the thread, so I'll shut up now.

