Thursday, 8 December 2016

serial - Capacitor in RS232 level shifter. Data is strictly half-duplex


enter image description here


I have created a level shifter very similar to the schematic at: http://picprojects.org.uk/projects/simpleSIO/ssio.htm except for the capacitor I use 47nF because the page claims:



at high bit rates the 100nF capacitor may cause the signal to be distorted to such an extent that it can't be received correctly, in which case try changing the 100nF capacitor to a 47nF or even 22nF. If communication is strictly half-duplex you may not need the capacitor at all.




But there's no mention as to what capacitor value is best or why.


Then I see this:



If the host transmits a lot of zero (null) data in a stream, the capacitor will discharge because in RS232 zero bits are sent as a positive voltage and ones as a negative voltage. Since the circuit needs the negative voltage to charge the capacitor, this will also cause problems when transmitting data back to the host.



This suggests that I need a bigger capacitor that many other circuits use.


I ideally want to exchange data in a half-duplex fashion at 115200bps because later I'll use radio modules which restrict my data to half-duplex.


What should I do? Should I remove the capacitor? change its value? or lower my baud rate? and no I don't want to throw my entire circuit in the garbage can only to redo it to the max232 chip. I don't have any of those and they are not cheap.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...