Thanks for the reply
Well as i'm only heving a remote slave and a local master i'm not using any
bus or adressing, so a 2 wire differential interface in halfduplex is fine
Here is what I want to do in detail
Slave site:
16F88 with 7 AN channels, I use 6 AN channels for voltage measuring 10bit
Outputs: 1 AN channel (AN6) and one PortB
Inputs: 4 input pins to read there status
Bidirectional: 1 1wire port with 1 DS1820 temperature sensor
RS422 with SP485 level converter using 3 PortB pins: TXD,RXD,TX or RX select
Master Site
RS422 with SP485 level converter using 3 PortB pins: TXD,RXD,TX or RX select
LCD
Keypad
The master polls the slave
and request 6 AN variables in 10bit, requests the status of the 4 input pins,
request the 1wire temperatur sensor raw value (2 words) or eventually a converted value
The keyboard allows to toggle both outputs which are "bits" (portb.x)
So my question is how can I handle this with serin2 at the slave side with the use of "WAIT" i guess ? and if possible with a CRC added
Can I read all variables in a row or variable by variable , and what if i want to toggle the 2 outputs ?
Do I need to use an interupt of the buildin uart ? (SP485 is connected to the hardware RXD/TXD)
Speed will be 9600 8N1
Thanks
Bookmarks