Question

In my Graduation project I need to send data from computer to microcontroller to control the position of a stepper motor

Most of the examples I have seen use the legacy parallel port. unfortunately parallel port is not available anymore.

My Question is what are the alternatives that available nowadays and compare between them from the following perspectives: hardware needed, complexity, ability to use with C++ and PIC microcontroller.

I am Using C++, Windows 7, PIC microcontroller.

If you point me to any reference I will appreciate it very much

Was it helpful?

Solution 2

The alternatives to using a parallel port are RS232 Serial Port (minimum wires), and USB.

Some Systems On a Chip (SOC) include components for USB. Most all (except the very fundamental ones) include one or more UARTs for using with RS232 Serial Port. The manufacturer may also provide driver code too.

There are conversion cables that convert USB to RS232C. Be aware that some of the cables may not work correctly, depending on the H/W of your PC. I've had negative experiences with them.

Search the web for "PIC USB C++ microcontroller".

OTHER TIPS

For your graduation project, and seeing as it doesn't seem you have vast experience with microcontrollers, I would suggest you migrate to an Arduino platform.

It's very easy to use, it supports c\c++ (c++ to an extent, for example you can't use the STL, although when it comes to microcontrollers that would be a BIG no no due to memory considerations).

You can find a lot of information on their website, you can order any of the models on sparkfun or on ebay, although they're pretty cheap. Depending on the number of i\o pins you need I would recommend the Arduino Uno or Mega for an easy start.

There are also very good tutorials online, one well known series of tutorials that I've learnt the basics from myself is Jeremy Blum's tutorial series.

The only bad side to this is their IDE (which is free), that provides notepad features (and not even the ++). But you can also program Arduino in Visual Studio using the Visual Micro extension or in Eclipse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top