I am researching for the project which I need to communicate with multiple(4) device through serial cables. And I only need to send command to the device but no need to receive information.
So far what I understood is I need driver in the middle sort of max232/max3232? because arduino's logic level(5v) is different from RS232 serial(+-12v).
But I am a bit confused again because it seems Arduino has it's allocated serial ports(pin14/15) and I don't get it. If I only need to send byte(ex:10101010) outward as TX, couldn't I arrange any digital pin as output? Is there any reason specifically 14/15 is arranged as serial ports? As my situation require only transmit the data, I thought it would be enough to make logic with one digital pin.
I am waiting for my Arduino and other parts, I could only prepare my logic in advance. Also checking for any additional parts required for the project..
Could anyone correct me if I think something wrong?
The four UARTs in the chip connect to specific pins so if you wish to use the UART functionality, you must use those specified pins. AFAIK, enabling the UART means both Tx and Rx are allocated even if you only want to generate output.
You can use software serial code to generate serial data on any pins, but you generally don't want so much trouble.
So...I understood,,
If I want to use 'real' serial communication through UARTs, I need to use those specific pins. What I mean 'real' that I can transmit and receive on synchronized clock level. I found UARTs synchronize each other's clock, but my devices are quite primitive ones which use unsynchronized communication..I find some clues on your last words so I may try to generate and send it through max232.
(I misunderstood UARTs/RS232, proper explanation below.
Also my one concern was the way to communicate through one pair of TX/RX pins to multiple devices. Is there any way to control multiple channels by on pair of serial ports? Any advice would be appreciated, thank you.
Paul__B:
Presumably a Mega 2560?
Yes you need a MAX(3)232.
The four UARTs in the chip connect to specific pins so if you wish to use the UART functionality, you must use those specified pins. AFAIK, enabling the UART means both Tx and Rx are allocated even if you only want to generate output.
You can use software serial code to generate serial data on any pins, but you generally don't want so much trouble.
Obviously if you want to send precisely the same data at the same baudrate to multiple devices, you just use the same output pin to drive multiple MAX232s in parallel.
If you needed to receive from multiple devices it would be another matter, you could use an AND gate to combine the signals if you knew they would not attempt to transmit simultaneously.