Rs232 devices

it is possible to use Industrino to control rs232 devices to collect data or sent commands? Thanks, Alberto 

Alberto Zapico
Alberto Zapico
24
| 2 1 2
Asked on 4/29/18, 11:14 AM
0
vote
2935 Views

Yes, there are 3 serial ports configured for immediate use. See specifications for proto D21G.

  1. 1 at screw terminals
  2. 1 at IDC connector
  3. 1 thru micro USB

All I/O pins, including the serial lines are 3.3V / 5V tolerant. To increase drive voltage to 5v, use a pull-up resistor (size around 2ma drive limit). If you need rs232 spec. drv/rcv, use a max232 chip to interface to the above serial pins.

Note: The samd21 micro actually has 6 internal sercom modules that may be configured. Here are some links to review:

https://www.arduino.cc/en/Tutorial/SamdSercom

https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/overview

Regards...

MikeGroz
MikeGroz
42
| 3 1 1
Answered on 4/29/18, 1:11 PM
1
vote

 

Related your answer:

Hi Alberto,

I assume you're talking about the INDIO (D21G) platform, with the built-in RS485 port. This one is connected to D0/D1 ("Serial") by default, please review the documentation at https://github.com/Industruino/libraries#rs485  If you want to use D0/D1 for other purposes, it is available on the IDC, but remember to use the switch on the baseboard to disconnect it from the RS485.

There is one more hardware serial available on the IDC: D10/D5 ("Serial1") for other purposes. We have a GSM/GPRS module that includes an RS232 port: https://industruino.com/shop/product/gsm-gprs-expansion-module-65?category=2  and can be configured to use this Serial1, so Serial can be used at the same time for RS485.

we need to connect at the same time devices using modbus rtc protocol and we would like to use the built-in RS485 port and a RS232 device, so according your answer we would use the hardware serial port availabe on the IDC D10/D5 pines. We would build a new module for this purporse because we don't need GSM/GPRS comms, so it's very expensive to use this module only to connect a rs232 device. 

Are there any restrictions related to connect diferent devices to the industrino d21g? Where can I see the correspondance between the terminal blocks and the pines?

Best regards, Alberto

 

 

Alberto Zapico
Alberto Zapico
24
| 2 1 2
Answered on 4/29/18, 5:21 PM
0
vote

You can use both serial ports at the same time, no problem. In code, you will be reading/writing to the ports. Note: Keep in mind, rs485 is NOT rs232. To implement something like that, you would need a max232 part mentioned above and then run it into a differential converter. See below but there may be others that interface directly to 0-5v logic levels (then you can drop the max part). http://www.usconverters.com/downloads/xs202/xs202.pdf Regards...

MikeGroz
on 4/29/18, 6:05 PM

Oops, that was for 422. Here is the one for rs485. http://www.usconverters.com/downloads/xs201a/xs201a.pdf

MikeGroz
on 4/29/18, 6:08 PM

Hi Alberto,

I assume you're talking about the INDIO (D21G) platform, with the built-in RS485 port. This one is connected to D0/D1 ("Serial") by default, please review the documentation at https://github.com/Industruino/libraries#rs485  If you want to use D0/D1 for other purposes, it is available on the IDC, but remember to use the switch on the baseboard to disconnect it from the RS485.

There is one more hardware serial available on the IDC: D10/D5 ("Serial1") for other purposes. We have a GSM/GPRS module that includes an RS232 port: https://industruino.com/shop/product/gsm-gprs-expansion-module-65?category=2  and can be configured to use this Serial1, so Serial can be used at the same time for RS485.

Tom
Tom
5675
| 1 1 3
Answered on 4/30/18, 12:44 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

43 follower(s)

Stats

Asked: 4/29/18, 11:14 AM
Seen: 2935 times
Last updated: 4/30/18, 6:13 PM