Skip to main content
PKuma.12
Associate III
April 16, 2019
Question

hi i want to make advancement in transducer is want to add modbus and usb in that.the current design is on 8 bit STmicrocontroller. what should I do?

  • April 16, 2019
  • 4 replies
  • 654 views

..

This topic has been closed for replies.

4 replies

Pavel A.
April 16, 2019

IMHO you should not use a 8-bit ST microcontroller (STM8) at all, unless you have specific requirement for this.

STM8 does not have USB. Most important - STM32 has much better development tools and yo can find more code examples.

So to the question what should you do: consider STM32.

-- pa

PKuma.12
PKuma.12Author
Associate III
May 2, 2019

Thank you for the reply.

In that transducer I have to add MODBUS and USB by using STM32L151RBT6 controller.

should I have to do coding from scratch or can make changes in existing code of STM8.

I am very new to this field and also very new to MODBUS and USB interface.

How should I start this development?

Ozone
Principal
May 2, 2019

ST has code examples for USB, for the L151 either SPL-based or Cube based. I never used USB with this MCU.

You will not find much Modbus code with ST, and many implementation are commercial, and unwilling to share.

There are some free modbus libs for microcontrollers available in source code, just use a search engine.

You will surely need to write/rewrite the low level implementation (UART send/receive, character timeouts).

Modbus RTU is timing based, and thus a little less trivial then a simple terminal app.