It's hard to guess since you haven't posted the actual code you're using, missing variable declarations etc but "it doesn't work" is THE worst problem description you can ever give - of course "it doesn't work"... You wouldn't even be posting here in the first place if it did, right?
So, What exactly doesn't work? How do expect it TO work? What have you done, except posting here, to try finding the issue?
Are the sending PIC actually running? Is it running at the correct speed (4MHz)? Is it sending anything at all? Is the receiving PIC actually running? Is IT running at the correct speed (4MHz)?
One thing, which doesn't really prevent it from "working" but may be fooling you, is that on the sending side the variable BROJ never changes, it's always zero (or perhaps there's more code that you didn't show).
/Henrik.
Bookmarks