Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CProgrammer

Making a programm to communicate with a mikrokontroller in visual C++ any tips?

This topic is 5350 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I don''t have experience with microcontrollers but you should look for a library that meets your needs and use it. If you can''t find one, then find out how to communicate with whatever port your microcontroller is hooked up to, find out what data to send it, then send it over that port. You will most likely have to use low level programming for this.

Intro Engine

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What microcontroller are you using ? or is that the first problem ? (if you haven''t made any choices yet, it might be worth looking at the PIC series of chips)

Share this post


Link to post
Share on other sites
I could be wrong on this (never coded for microcontrollers before) but I don''t think you can just go ahead and compile code for a microcontroller, especially with MSVC. Microcontrollers usually have their own compilers (someone back me up on this?). Also note that those compilers are usually for straight C, not C++.

Then again I could be wayy off base here... can anyone provide more reinforcement?

Share this post


Link to post
Share on other sites
You are correct they have their own compilers, but I dont want to make code for the controller but code a programm that communicates with the microcontroller.
-CProgrammer

Share this post


Link to post
Share on other sites
most controller boards have a com port that you can send data with, and often have a special debugging port that you can plug a customized debugging cable into, which will allow you to control and monitor the cpu.
which controller do you have?

Share this post


Link to post
Share on other sites
you need to find out what type of board you have (then try and find an interface cable for it), or do you just have the chip? (in which case theres not much you can do with it)

Share this post


Link to post
Share on other sites
If you''re using the RS232 port in the processor to interface to the PC, just use whichever c++ serial interface library you like or you can use the raw IO port if you''re not running a unix or WinNT variant. The protocol for communication is up to you and the biggest PITA though google should turn up some existing code.

Share this post


Link to post
Share on other sites
Well i''ve never done communication with a serial(COM port) but some googling gave the possibility of using MFC and an ActiveX object here. What do you guys think?
-CProgrammer

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!