Hello,

I'm writing some code for a couple of 16F628's on a RS485 network..

I'm using the serin command ;
Code:
databyte      VAR    BYTE    ' Recieved command/request
ADRESS        VAR    BYTE    ' Adres selected by dip switches

serin PortB.1,t9600,[WAIT (ADRESS),databyte]
The adress is selected by an 8 bit dipswitch on the slave pcb.
The only way a slave can be adressed is by its unique adress.

I now want to implement a broadcast adress to..

I was wondering if there is a way so that the slave only completes the serin command if the "adress" statement OR the "broadcast adress" is forfilled ?

I've tried ;
Code:
databyte      VAR    BYTE      ' Recieved command/request
ADRESS        VAR    BYTE      ' Adres selected by dip switches
BROADCAST     CON    %11111111 ' Broadcast adress

serin PortB.1,t9600,[WAIT (ADRESS OR BROADCAST),databyte]
But i knew this would be to easy..

Any help would be greatly appreciated.

Regards Donat