I just started to work with Proteus, and currently I'm trying to find out
whether this will become a major part of my tool set. It's intriguing...

But the first experience seems odd... OTOH maybe I'm doing something wrong.
I'm using the MSSP module in SPI mode in a PIC 16F876. We tried something
like this:

do
{

WCOL = 0;
SSPBUF = gPortExpander.Output[1];
} while (WCOL);

do
{
WCOL = 0;

SSPBUF = gPortExpander.Output[0];
} while (WCOL);

However, it seems that WCOL doesn't get set properly. The way I understand
it, it should get set in the second loop (as a side effect of the
assignment to SSPBUF) until the byte left the buffer and SSPBUF accepts a
new value.

Any clues what I'm doing wrong? Or is this a bug in the Proteus MSSP
implementation?

> I just started to work with Proteus, and currently I'm trying to find out
> whether this will become a major part of my tool set. It's intriguing...

I use this every day, mostly for the schematic capture and PCB design and I
find it very good. I must say though, it does have some bugs I come across
sometimes - but doesn't every piece of software? Their support is
fantastic. If you were to send them the design, they usually fix it within
a couple of days.

> However, it seems that WCOL doesn't get set properly. The way I understand
> it, it should get set in the second loop (as a side effect of the
> assignment to SSPBUF) until the byte left the buffer and SSPBUF accepts a
> new value.

I don't think what you are trying to do is supported by the simulator. Look
in the PIC16 model help under Model Properties (Alphabetical Index) then
click on Warn If Executing I2C Code. Here it says:

Dialogue Form Field : Warn If Executing I2C Code?
Applies To Devices : Devices with an MSSP (SPI) peripheral.

When assigned Yes (the default), this property causes the model to issue
warnings for any operation that use the I2C SPI interface. This
functionality is not currently modelled.

I just started to work with Proteus, and currently I'm trying to find out
whether this will become a major part of my tool set. It's intriguing...

But the first experience seems odd... OTOH maybe I'm doing something wrong.
I'm using the MSSP module in SPI mode in a PIC 16F876. We tried something
like this:

do
{

WCOL = 0;
SSPBUF = gPortExpander.Output[1];
} while (WCOL);

do
{
WCOL = 0;

SSPBUF = gPortExpander.Output[0];
} while (WCOL);

However, it seems that WCOL doesn't get set properly. The way I understand
it, it should get set in the second loop (as a side effect of the
assignment to SSPBUF) until the byte left the buffer and SSPBUF accepts a
new value.

Any clues what I'm doing wrong? Or is this a bug in the Proteus MSSP
implementation?

Yes it does. I use the CCS 'c' compiler and it is able to single step
through the code. You are also able to set breakpoints etc. It even has a
run time dissasembler which allows you to single step the 'c' code in ASM as
well. For this your compiler needs to output a COFF file.