-
Ttl - Rs232
Hello All
In my programm i not use the MAX232 inverter for serial communication to the PC, i use a 1k for tx and 22k resistor for rx Pic pin and the code like this
bmode con 16780'
''''serin2' 16780 = 2400 inverted (without max232)
instruction like this
SERIN2 dinp,bmode,3000,main,[wait ("C"),HEX2 esp0,HEX2 esp1]
now i need to connect my board to other board from a customer that communicate serial with TTL level
My question is, must i change anything in my code to communicate in TTL level?
Thanks for help
Kind regards
Pedro
-
You are using TTL levels. You might have to change polarity. RS232 is usually inverted but the other board may be non-inverted.
-
Hello
The next questions is:
Must i remove the 1k and 22k resistors from the circuit, i mean direct connecting the two processors?
Thanks
regards
Pedro
-
Sorry - I didn't see this earlier.
The resistors are there to limit the current sourced or sunk by the PIC pins to a safe level. Assuming 5V logic, the 1K resistor limits the current to 5/1000=5mA. RS232 levels can be as high as 25V so the 22K resistor limits that current to 25/22000=~1mA. You can leave them as they are or you can replace the 22K with 1K. If there's any chance you'll connect it to RS232 levels, keeping the 22K is safest.
Check the PIC datasheet to see the maximum current limits for each pin.