Modifications

Sauter à la navigation Sauter à la recherche
998 octets ajoutés ,  24 janvier 2015 à 16:49
Ligne 90 : Ligne 90 :     
== Pour les friands de détails ==
 
== Pour les friands de détails ==
 +
===
 
The Micro Python implementation is a complete rewrite of Python specifically designed to be run on a microcontroller with minimal flash storage and minimal RAM.  When design decisions were made, the first priority was to minimise RAM usage, then minimise code size, and, finally, to execute quickly.  Some of the important features of the implementation are listed below.
 
The Micro Python implementation is a complete rewrite of Python specifically designed to be run on a microcontroller with minimal flash storage and minimal RAM.  When design decisions were made, the first priority was to minimise RAM usage, then minimise code size, and, finally, to execute quickly.  Some of the important features of the implementation are listed below.
   Ligne 106 : Ligne 107 :  
* A function (byte code, native or inline assembler) can be called on an interrupt long as it does not allocate heap memory (since it can be called while a garbage collection is taking place).  In practice this is not a big restriction, as you can do a lot of things using only memory on the stack.  For example, you can make loops with while/for, do integer arithmetic and bitwise operations (but no bignums), call other functions and access and overwrite elements of collections like bytearrays (but not create new ones).
 
* A function (byte code, native or inline assembler) can be called on an interrupt long as it does not allocate heap memory (since it can be called while a garbage collection is taking place).  In practice this is not a big restriction, as you can do a lot of things using only memory on the stack.  For example, you can make loops with while/for, do integer arithmetic and bitwise operations (but no bignums), call other functions and access and overwrite elements of collections like bytearrays (but not create new ones).
    +
=== MicroPython sur PC ===
 
The Micro Python language can also run on a PC (it was developed under Linux on a 64-bit machine) and can be used as a lean version of Python where low memory usage is important.  The PC version of Micro Python (compiling to byte code) actually runs faster than CPython for the various benchmarks I have tested, and the native compilation option makes Micro Python run significantly faster than CPython.
 
The Micro Python language can also run on a PC (it was developed under Linux on a 64-bit machine) and can be used as a lean version of Python where low memory usage is important.  The PC version of Micro Python (compiling to byte code) actually runs faster than CPython for the various benchmarks I have tested, and the native compilation option makes Micro Python run significantly faster than CPython.
   −
 
+
=== Mini système d'exploitation Python ===
 
You can think of Micro Python as a "mini Python operating system", and the boot-up process proceeds as follows:
 
You can think of Micro Python as a "mini Python operating system", and the boot-up process proceeds as follows:
 
* Power on, or hard reset.  If the DFU (device firmware upgrade) header is enabled (across BOOT0 and 3.3V pin) then the device enters DFU mode, allowing you to upgrade the Micro Python binary, or download your own C/C++ program.
 
* Power on, or hard reset.  If the DFU (device firmware upgrade) header is enabled (across BOOT0 and 3.3V pin) then the device enters DFU mode, allowing you to upgrade the Micro Python binary, or download your own C/C++ program.
Ligne 119 : Ligne 121 :  
* The main Python script is run if it exists.  Default is /src/main.py.  This is your main Python program and it can do whatever you like!
 
* The main Python script is run if it exists.  Default is /src/main.py.  This is your main Python program and it can do whatever you like!
 
* If the main script doesn't exist, or exits, REPL (read-evaluate-print-loop) mode is entered.  This gives you a standard Python interpreter prompt over the USB serial device.  Exiting from this will soft-reset the board.
 
* If the main script doesn't exist, or exits, REPL (read-evaluate-print-loop) mode is entered.  This gives you a standard Python interpreter prompt over the USB serial device.  Exiting from this will soft-reset the board.
 +
 +
=== Carte MicroPython (sous le capot) ===
 +
 +
* STM32F405RG microcontroller.
 +
* 168 MHz Cortex-M4 CPU with 32-bit hardware floating point.
 +
* 1 MiB flash storage, 192 KiB RAM.
 +
* Micro-B USB connector, with software support for USB serial, USB mass storage, and USB HID (mouse, keyboard).
 +
* Micro SD slot.
 +
* MMA7660 3-axis accelerometer, up to 64 6-bit samples per second per axis.
 +
* 4 LEDs, 1 reset switch, 1 user switch.
 +
* 3.3V LDO regulator at 300mA, power from USB or external voltage source between 3.6V and 10V.
 +
* Real-time clock with date and time.
 +
* 30 general purpose I/O lines, 28 are 5V tolerant (unless in ADC mode).
 +
* Communication: 2x SPI, 2x CAN, 2x I2C, 5x USART.
 +
* 14x 12-bit ADC pins (analog signal in).
 +
* 2x DAC pins (analog signal out).
 +
* Board dimensions: 33mm by 40mm.
 +
* Board weight: 6 grams.
 +
* Board I/O connectors: 46 holes, standard 0.1 inch separation.
 +
 +
=== Brochage ===
 +
[[Fichier:pybv10-pinout.jpg]]
29 917

modifications

Menu de navigation