How can I send the value calculated by the c++ program to ATmega128A via RS232 serial communication?

Asked 2 years ago, Updated 2 years ago, 21 views

We are creating a program that sends the result value calculated using language c to ATmega128A to make ATmega128A work. The only answer is to use MFC?

c++

2022-09-20 20:52

1 Answers

The C++ language does not have the ability to perform serial communication by default. In order to perform serial communication, it is necessary to use methods such as APIs provided by OS or APIs provided by serial communication devices.

In Windows, you can use the API as shown in the example below.

On Linux, you can use the API as shown in the example below.

Or you can use a library that provides serial communication regardless of the OS.


2022-09-20 20:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.