Hi Majid, SPI is designed for centimeters, I don't think it can work reliably over 20 meters.
RS232 at 9600 baud is ok for 150 meters, if you're using real RS232 drivers and receivers like from the MAX232 series. The PIC controller does not have RS232, it has a usart which handles the NRZ protocol. This protocol is best known as being used by the RS232 interface. Therefore the protocol itself is commonly (but wrongly) referred to as "RS232" RS232 uses negative voltages as a symbolic "1" and positive voltages for "0". At the receiving side, the voltage must at least go higher than +3V for "0" and lower than -3V for "1". At the sending side, voltages from up to +15V and down to -15V are used. So, to answer your question in two simple sentences: RS232 is ok for the job. But RS232 is not what comes out of the controller. Greets, Kiste Am Dienstag, 20. April 2021, 21:56:34 MESZ hat majid ebru <[email protected]> Folgendes geschrieben: can i ask another question?? if it is 20 meter distance between PICs , i should use RS232 or SPI? so sorry and thanks a lot majid ebru در تاریخ سهشنبه ۲۰ آوریل ۲۰۲۱ ساعت -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/1697687282.4677348.1618979276333%40mail.yahoo.com.
