Skip to content

Embedded Rust AVR project featuring ATmega328P, diving into Proteus simulation and flashing the Arduino Uno.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

achreftel1/embedded_rust

Repository files navigation

Embedded Rust Project for ATmega328P and Arduino Uno

This project released by Rayen SELMI and Achref TELLILI demonstrates the use of Rust to program an ATmega328P microcontroller for analog data acquisition and UART communication. It includes both simulation in Proteus and hardware implementation on the Arduino Uno.

Features

  • Analog data acquisition from a potentiometer using ADC.
  • Data conversion and serial communication via UART.
  • Interrupt management with Timer1_OVF and semaphores.
  • Deployment and testing on Proteus simulation and hardware using Hercules Virtual Terminal.

Build Instructions

  1. Install prerequisites as described in the [avr-hal README] (avr-gcc, avr-libc, avrdude, [ravedude]).

  2. Clone this repository:

git clone https://github.com/achreftel1/embedded_rust.git
cd embedded_rust
  1. Build the firmware:
cargo build
  1. Run the bash script to convert the ELF file to a HEX file, which will be used for the ATmega328P simulation in Proteus.
cd embedded_rust/target/avr-atmega328p/release
./elf2hex.sh
  1. Open the simulation of proteus [Rust.pdsprj].

  2. Hardware implementation using the Arduino Uno and flashing the firmware:

cd embedded_rust/target/avr-atmega328p/debug
wc -c first.elf
avrdude -p m328p -c arduino -P /dev/ttyACM0 -b 115200 -U flash:w:first.elf

License

Licensed under either of

at your option.

Contribution

Contributions are welcome and will be dual-licensed under the above terms unless explicitly stated otherwise.

About

Embedded Rust AVR project featuring ATmega328P, diving into Proteus simulation and flashing the Arduino Uno.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages