There's only ONE difference between porting code from a 16F84 to a 16F628, and that's by default the 16F628 assigns pins from PortA to the Analog Comparators.

At the start of your code along where you have your TRIS statements (which I can't find in your code) add...

CMCON=7

(see the 16F628's Datasheet in the Comparators section to find out what that setting does).

It's worth while to have a Pause before your main loop (just after your ID=01) to allow external Hardware to settle. Something like Pause 500 should suffice.

Please also define your I/O's with TRISA and TRISB. It's bad practice to leave them out and assume the rest of your code will automatically set them for you... that omission will bite you one day.

Melanie