I believe it's basically the same issue as Ioannis had the other day when he tried to use HIGH/LOW on anything but a PORT register.
Any command that automatically makes the pin in question and input or output (ie clears or sets the TRIS registers for you) must to use PORTx.y
This is because the compiler uses a hardcoded "offset" to get from the PORT register to the TRIS register.
On the 18F46K22 this "offset" between any of the PORT registers and their corresponding TRIS registers is 18 so if, for example, you use LATA.0 instead of PORTA.0 as your SHIFTOUT pin the result will be that the compiler clears OSCTUNE.0 instead of TRISA.0.
/Henrik.
Bookmarks