![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) | ||
| OK all I thought I would spread the wealth and let a few ppl here know abt somethin gI have come across Progamming PIC's in Python!!! If you do not know what python is, it is a fantastic language (described as a self-commented language). It is extreamly good and fast in writing something. Some argue that since it is an interpreted language (ie a script-language) it is slow. This isn't really true since the majority of the back-end to PYTHON is written in C, thus you could concider PYTHON to be more of a wrapper language Anyway enough of the sales blurb http://pyastra.sourceforge.net/ EXAMPLE Quote:
Quote:
Sure you can write for PIC's in C but C isn't really a nice language (yes alot better then ASSEMBLER) but it is prone to coding errors and length (PYTHON isnt) Also you can generate Verilog (and to some extent VHDL) using python http://myhdl.jandecaluwe.com/doku.php/tovhdl PYTHON is general is extreamly useful to me (Gentoo user as well as using it to replace MATLAB) but since I code in VHDL in between using a soldering iron the myHDL looks very interesting, but I can across the PIC thing since a board a collegue is working on will have a PIC so I am going to hi-jack it | |||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | ||
| Quote:
Yer interpreted languages are slower then compiled but my point with python is it is no where near as slow as VB or Matlab and in the age of 3GHz processors you wont even notice it I like it, thought I would pass on | |||
| |
| | (permalink) | ||
| Quote:
Quote:
| |||
| |
| | (permalink) | |||
| Quote:
my fault grouping a general-python with python-PIC Python-PIC. Yes this is showing compiled BUT the intermediate language is python. If you wanted you could write for PIC in HEX, but it is more convinient to write in C (and compile it down). PYTHON is doing just that in this case PYTHON in gerneral PYTHON is an interpreted language and as a result has a performance hit (in terms of speed) over compiled languages (like C,C++,...) but in this day and age of fast computers such a performance hit (outside of CORE-OS systems and number-crunching programs) is negligable. Thus interpreted languages (JAVA,.NET,MONO,PYTHON) have come into existance offering a higher-than-C langage to make producing programs easy and fast. The fluidness of the PYTHON-language has been taken advantage of in the Python-PIC and Python-HDL such that you can manage your code in a user-friendly language (a restricted version of python) and when you are ready "compile" it down to HEX (for PIC) or VERILOG (for FPGA) | ||||
| |
| | (permalink) |
| It is interesting to note how many: bcf Status,RP0 in the compiled example above.
__________________ L.Chung | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
It's using very poor memory paging, setting the page every line, rather than as needed. | ||
| |
| | (permalink) |
| DANG (not the word I said).. They fit PYTHON in a PIC.. Looks like I might have to switch back from Atmel to the MicroChip (hehehe). Looks like ASM to me.. Pyton compiler to PIC ASM would be worth a look. I think Unix is great, but hate python and perl type languages, would rather use ASM. But that is cool. Python to PICasm. | |
| |
| | (permalink) |
| No, nbobody fit Python on a PIC, this is just a PC program for compiling Python to assembly. It's not like a Python interpreter is running on the PIC | |
| |
| | (permalink) |
| Sorry Peepsalot.. I was joking, it is a Python to PICASM program. You would have put and OS and Python on the PIC's little memory space for it to run Python. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |