Skip to content

petrilakm/mtb-unis-fw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MTB-UNIS Firmware

This repository contains firmware for ATmega128 MCU for MTB-UNI v4 module. Firmware consists of main firmware & bootloader. Bootloader is placed in bootloader directory, it is a separate compilable project. To compile main fw & bootloader to single hex file, compile bootloader first and then main firmware. See build instructions below.

Build & requirements

This firmware is developed in C language, compiled via avr-gcc with help of make. You may also find tools like avrdude helpful.

Hex files are available in Releases section.

Programming

Firmware could be programmed

  1. via programming connector on MTB-UNI module (ISP),
  2. over MTBbus (if bootloader is already present).

Warning: MTB-UNI v4.0 contains bug: MISO & MOSI pins are not on programming connector, they are placed on RS485 driver's pins. For programming v4.0 modules, please remove RS485 driver and connect pins MISO & MOSI to appropriate pins. SCK, RESET, VCC & GND could be connected via programming connector.

For ISP, please remove RS485 driver as it uses same pins as are used for serial programming.

This FW uses EEPROM, however programming of EEPROM is not required. There should be just empty EEPROM on fresh devices.

Flash main application, fuses & bootloader:

$ cd bootloader
$ make
$ cd ..
$ make
$ make fuses
$ make program

Flash fuses & bootloader only:

$ make fuses
$ cd bootloader
$ make
$ make program

Author's toolkit

Text editor + make. No more, no less.

See also

License

This application is released under the Apache License v2.0 .

About

Firmware for MTB-UNIS module

Resources

License

Stars

Watchers

Forks

Languages

  • C 80.4%
  • Python 11.9%
  • Makefile 7.7%