Hi Richard,
Apart from including a list of all PICs with two MSSP modules and checking against that list I don't know a way of telling at compile time. There's probably a way to have the assembler do it but then its too late.....
However, looking at the P18F45K22.INC file, as an example, one can see that SSPBUF and SSP1BUF are both declared and pointing at the same adress so I think you should be safe using SSPBUF and SSP2BUF. Obviously one can't know if Microchip will continue to alias SSPBUF to SSP1BUF on devices with multiple MSSP modules...
/Henrik.




Bookmarks