Git Product home page Git Product logo

rusty_attiny13a's Introduction

mit

[rusty_attiny13a]

(A weekend experiment using the Rust programming language on small attiny13a microcontrollers.)

Description:

Our package provides a minimal but functional SDK for use on ultra-small microcontrollers such as the ATTiny13A. The package implements a variety of software buses, including UART and I2C, which provides the ability to connect and interact with various peripheral devices. The library also includes experimental ultra-lightweight support for output to SSD1306.

Project Goal:

The aim of our experimental project is to showcase the use of the Rust programming language on ultra-small microcontrollers like ATTiny13A. We aim to demonstrate that even on such constrained devices, Rust can be an effective and flexible development tool.

Specifications:

name value
mcu attiny13a
cpu 9.6Mhz (internal, +osccal(pre-recorded in eeprom))
mem 64bytes
flash 1kb
eeprom 64bytes
pio PB0-TX, PB1-RX, PB4-SDA, PB3-SCL

UART:

  1. Supports I/O at a specified speed using a parity bit (write-only bit).

  2. Delays are implemented only in software (the timer is not used).

  3. Supports recording to multiple I/O ports simultaneously.

  4. Support for burst or single-byte reads.

examples: uart, uart_rw, uart_rw_debug, uart_rw_onebyte

env:

env_name def_env_value possible_env_value description
UART_BAUD 115200 460800, 230400, 115200, 57600, 9600, 4800, <CUSTOM_BAUD> Sets UART BAUD to default.
UART_PARITY EVEN Even: (1, EVEN, even), Odd: (2, ODD, odd), Skip: (0, SKIP, skip) Specifies the requirement to set the parity bit when writing.

Launch example:

UART_BAUD=115200 UART_PARITY=0 cargo run --release --example uart

I2C:

  1. Support for the I2C bus with setting the desired frequency (it was not possible to set the exact frequency due to flash memory limitations, for example, at a frequency of 400 kHz we get +-355 kHz at the output). (100khz/400khz/800khz/... also supported.)

  2. Support for the ACK bit, and with it the ability to determine the success of a transmission.

i2c_scan:

A classic example of i2c bus scanning.

UART_BAUD=115200 cargo run --release --example i2c_scan

Additional support:

SSD1306:

print_logo, print_u16counter, flip:

print_logo, print_u16counter, flip

cargo run --release --example ssd1306_x32_counter

License:

This project has a dual license according to (LICENSE-MIT) and (LICENSE-APACHE-2-0).

uproject  Copyright (c) 2021-2024 #UlinProject

 (Denis Kotlyarov).


Apache License:

apache2  Licensed under the Apache License, Version 2.0.



MIT License:

mit  Licensed under the MIT License.



Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.