I feel that I'm posting a really stupid message, but as the chinese would say: "You ask someone and you're a fool for five minutes. You don't ask and you're a fool for your life".
I must tell you then, that it's my first experience programming a microcontroler and so I really need some basic informations.
I understand that pyastra will translate a code written in python to the PIC 16 assembly language, and then the user would need an assembler to transform the assembly code into machine code and transfer it to the microprocessor. However how do I make pyastra work, shall I import it on my script? Shall I save my script with a specific extension? What shall I do?
Thanks for your attention
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1. Make sure that you have installed Python and GPASM.
2. Download and unpack the tarball.
$ tar -xzvf Pyastra-0.0.4.1.tar.gz
3. Change to the directory created by unpacking the tarball.
$ cd Pyastra-0.0.4.1
4. Read the README.txt and INSTALL.txt files.
5. Switch user to root.
$ su
6. Use the python "setup" script to install Pyastra to /usr/local
# python setup.py install --prefix=/usr/local.
7. Switch back to normal user (Ctrl-D).
8. Test Pyastra using one of the included test files. Eg for PIC16F84A
$ cp /usr/local/share/doc/pyastra-0.0.4.1/examples/led_blink.py /tmp
$ cd /tmp
$ pyastra -p 16f84a led_blink.py
The files produced are
/tmp/led_blink.asm /tmp/led_blink.hex
/tmp/led_blink.cod /tmp/led_blink.lst
9. Program your PIC using the .hex file.
Hope that helps.
Chris.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I feel that I'm posting a really stupid message, but as the chinese would say: "You ask someone and you're a fool for five minutes. You don't ask and you're a fool for your life".
I must tell you then, that it's my first experience programming a microcontroler and so I really need some basic informations.
I understand that pyastra will translate a code written in python to the PIC 16 assembly language, and then the user would need an assembler to transform the assembly code into machine code and transfer it to the microprocessor. However how do I make pyastra work, shall I import it on my script? Shall I save my script with a specific extension? What shall I do?
Thanks for your attention
This is how it works in Linux.
1. Make sure that you have installed Python and GPASM.
2. Download and unpack the tarball.
$ tar -xzvf Pyastra-0.0.4.1.tar.gz
3. Change to the directory created by unpacking the tarball.
$ cd Pyastra-0.0.4.1
4. Read the README.txt and INSTALL.txt files.
5. Switch user to root.
$ su
6. Use the python "setup" script to install Pyastra to /usr/local
# python setup.py install --prefix=/usr/local.
7. Switch back to normal user (Ctrl-D).
8. Test Pyastra using one of the included test files. Eg for PIC16F84A
$ cp /usr/local/share/doc/pyastra-0.0.4.1/examples/led_blink.py /tmp
$ cd /tmp
$ pyastra -p 16f84a led_blink.py
The files produced are
/tmp/led_blink.asm /tmp/led_blink.hex
/tmp/led_blink.cod /tmp/led_blink.lst
9. Program your PIC using the .hex file.
Hope that helps.
Chris.