Go Down

Topic: Interfacing Serial (I2C/SPI) to RS232 (Read 378 times) previous topic - next topic

lakshmi123

Hi,
I have an application where output from the Sensor (MAX6675) should communicate with the PLC using RS232 Interface.
I could not find any IC on the Digikey which converts I2C/SPI to RS232.
Any suggestion on this?

septillion

Use a microcontroller to do the data conversion (after all, you posted it on the microcontrollers-board ;) ) and a MAX232 for the level shifting.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

lakshmi123

Can you be specific to which microcontroller and UART output from the uC and level shift to 24V?

septillion

Any that has UART, SPI and I2C. So, because it's an Arduino forum, an Arduino Nano or Uno will do.

As for the 24V, how? RS232 is max +-15V...

And a note, it's not trivial to convert I2C to Serial because I2C contains start and stop bits and addresses which you have to decide how to do on Serial. And for SPI you probably have a CS line which you might want to incorporate in the Serial messages. Aka, conversion isn't trivial.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

lakshmi123

Even for RS485 Is it the same using UART(Tx and Rx)?
Thanks.

septillion

RS485 is only signal levels, so yeah, if you use a MAX485 or so you can use the UART.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed


Go Up