![]() | (anonymous IP: 216.73.216.105,401) | |||||||||||||
| ||||||||||||||
Audio (128) Datatype (18) Demo (66) Development (270) Document (70) Driver (20) Emulation (71) Game (626) Graphics (240) Library (24) Network (87) Office (24) Utility (336) Video (22) Total files: 2002 Full index file Recent index file Part of AROS World |
[Show comments] [Show snapshots] [Show videos] [Show content] [Replace file] aros-micropythonMicropython port to AROS with support for Rasberry Pi hardware peripherals (GPIO, UART, I2C, SPI, PWM). This is based on the standalone port to Rasberry Pi here : micropython-raspberrypi How to build
The build was performed with help of aros-compiler-docker This is tested on Pi400 and Rasberry Pi4 and older version should work. The Pi5 is not supported as it has a completely different architecture which is currently not well documented. How to useThe pinout of the 40 pin connector is found in the official documentation for the raspberry-pi. Be careful with the 5V pins as the GPIO pins does are only 3V3 tolerant. The pins are fragile and can only sink or supply 50mA. Using a LED or similar must therefore use a current limit resistor. The size of the resistor is dependent on the forward voltage of the particular LED. I use the "Adafruit T-Cobbler Plus" which allows the 40 pin connector to be used with a standard bread board and the pins are clearly marked. GPIO Example:
UART Example:UART has no clock signal, so the parameters needs to be matched. The RPi UART can only change the baudrate. Other parameters:
TX pin is on GPIO14 (pin 8) and RX pin is on GPIO15 (pin 10). When connecting to other device the TX/RX pair must be crossed.
I2C Example:The I2C bus is half-duplex serial type bus which can interface a lot of interresting devices like sensors and memory chips. The I2C1 support on the RPi has to be enable in the "boot.txt" by adding the following text:
I2C1 device SDA signal is on GPIO2 (pin 3) and SCL signal is on GPIO3 (pin 5). Additional I2C devices can be defined in the "boot.txt" file if needed. Pull-up resistors are automatic activated on the pins when the I2C port is enables.
SPI Example:The SPI bus is full-duplex serial type bus which use more pins the I2C, but is much faster. The SPI0 support on the RPi has to be enable in the "boot.txt" by adding the following text:
SPI0 device SCLK signal is on GPI11 (pin 23), MOSI signal is on GPI10 (pin 19) and MISO signal is on GPI9 (pin 21). In addition a CS signal is needed from a normal GPIO pin for chip select function. Additional SPI devices can be defined in the "boot.txt" file if needed.
StatusCurrently the port is working fine for the examples above and is usable for my use. Only Pi400 has been tested yet. Probably Pi4 and Pi3 devices should work without problems. TODO
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2005 - 2026 The AROS Archives All Rights Reserved |