2021-04-15 02:12 AM
Hi,
I have a project in which I have to connect my PC to a measurement device thanks to VBA. I would like to use a mcu in order to control a component related to the device. This component is a decoder using the mcu outputs as input signals. These signals changing with time.
I have to control the signals with the code controlling the measurement device. Indeed, they will be changing according to a variable used in this code. Therefore, I would like to know if it is possible to program a MCU such as a STM32L100RCT6 with VBA? And if not, is there any alternative that can help me control this kind of mcu via VBA?
Thank you in advance for your help,
Jay.
Solved! Go to Solution.
2021-04-15 07:55 AM
There are different steps:
Good luck!
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
/Peter
2021-04-15 05:49 AM
Programming via VBA would require a cross-interpreter, which currently does not exist.
You could define an API between VBA (PC) and MCU and send control data via e.g. a serial interface to the MCU, which provides the parameters for the MCU program.
Regards
/Peter
2021-04-15 06:07 AM
Hi,
thank you for your help. Any ideas on how I could make this API?
2021-04-15 07:45 AM
Depends what you want to do with it!
Look around at similar systems - see how they do it ...
Some examples:
AT Commands: https://en.wikipedia.org/wiki/Hayes_command_set
MIDI: https://en.wikipedia.org/wiki/MIDI
OSC; https://en.wikipedia.org/wiki/Open_Sound_Control
Firmata: http://firmata.org/wiki/Main_Page
etc, etc, ...
2021-04-15 07:55 AM
There are different steps:
Good luck!
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
/Peter
2021-04-16 01:40 AM
I was thinking about a STM32L100RCT6. Is it possible to use two different codes on the same serial port (usb) ?
2021-04-16 01:43 AM
What do you mean with two different codes?
2021-04-16 01:45 AM
One program (VBA) and another one for the MCU.
2021-04-16 01:47 AM
Yes, of course. The NUCLEO and DISCOVERY boards working exactly this way and are able to debug/program the board via USB, while having a serial communication (VCP) between the MCU and the PC at the same time.
2021-04-16 01:48 AM
Alright. Thank you for your help !