Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 18 Online
OpenStudy (anonymous):

It is posible to use a code in python to program a microcontroler like pic16f877a?

OpenStudy (e.mccormick):

The issue is the micro controllers generally work on a version of assembly. They are a number of programming utilities that translate other languages to this, but I have not seen one for Python. I have seen basic as an option, so they do some different languages, but the script nature and JIT code of Python makes it ill suited for this.

OpenStudy (e.mccormick):

Hmm... though it looks like others have pushed this along more than I thought it would go! Python to ASM: http://projectproto.blogspot.com/2009/12/python-for-pic-mcus.html Python on a chip: http://wiki.python.org/moin/PyMite And a python based micro controller: http://www.pymcu.com/blog/ I certainly did not expect that out there! Thought I would look because I remembered there were some Python compilers, as in make stand alone, so I wondered if they might have a way to make that work. That is the first one. But the other two are things I had not thought they would do.

OpenStudy (anonymous):

http://tinyurl.com/lowvu2s

OpenStudy (anonymous):

Have you had a look at an Arduino microcontroller? Cheers Gusto

OpenStudy (anonymous):

Arduino doesn't run python code. However, have a look at the Raspberry pi, which isn't a microcontroller per se, but boards like the Arduino can be attached to it.

OpenStudy (e.mccormick):

@russelladams There are ways to program the Arduino via Python. So while the code is not running on the Arduino, it is controlling it. http://playground.arduino.cc/interfacing/python http://forum.arduino.cc/index.php/topic,8332.0.html And people are looking into making a Python subset for it... though I am not sure if there is really a great need for that.

OpenStudy (anonymous):

@e.mccormick From what I've read in the past, you can't actually program the Arduino with Python. The sketches have to be written in c. But, there is a Python wrapper that you can use with Arduino Sketches.

OpenStudy (e.mccormick):

They now have C and Assembler wrappers where it takes a special set of Python and turns it into the proper machine code for the micro controller. So it ends up being a way to use Python but not really run Python.

OpenStudy (e.mccormick):

And if you search for Python here, you will see two other interesting ones: http://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!