Skip to content

A basic structure of program with detailed instructables to start from scratch.

Notifications You must be signed in to change notification settings

cima/cima-attiny85

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cima attiny85

A basic program for attiny 85 to demonstrate Aurduino-less development for this tiny board with processor.

About ATTINY85

SoC Atmel 1705 TINY85 20SU is:

Digispark Breakout board is:

  • Opensource PCB layout
  • With micro USB
  • 5V stabilization
  • 6 Breakout GPIO pins
  • 3 power in/out pins
  • TINY85's flash is preloaded with bootloader Micronucleus that makes it possible to laod main program via USB

Development

Prereqisities

1. USB drivers: Digistump.Drivers.zip

NOTE: Find the latest release at https://github.com/digistump/DigistumpArduino/releases/

  • Unzip anywhere
  • Install using Install Drivers.exe
  • Plug in your ATTINNY 85 board
  • Device in device manager

Troubleshooting: Digispark ATtiny85 Download and install

2. GCC-AVR toolchain alternatives

  1. GCC-AVR toolchain opensource 11.1.0 x64 win

    • NOTE: find the most up to date compilers at https://blog.zakkemble.net/avr-gcc-builds/

    • unzip to dedicated folder somwhere where you store your compilers
    • You will need to reference this folder multiple times in your project
  2. GCC-AVR toolchain from microchip (registration needed)

  • A tool for uploading and downloading compiled binary to TINY85 microchip

NOTE: ISP = in-system programming; a technique to upload your code

TODO Do I really need it since micronucleus provides executable to handle the upload?

an USB emaulating bootloader that has a counterpart on PC operating system allowing you to upload your program.

A good article for understanding the nucleus & Tiny85 flash life cycle

https://github.com/adigie/stm32-cmake-template/blob/example_l053/CMakeLists.txt

In root of this project execute to materialize cmake project ad have it ready for build

cmake -G Ninja -B ./build/

Ninja

https://github.com/ninja-build/ninja/releases

Ninja is a replacement of Makefile.

In order to compile this project simply go to folder build and write ninja

cd build
ninja

5. BOOST

Linking

Arduino Files - including linker script needed fro our chip/board

Upload the code

micronucleus --run build\src\CimaAttiny85.hex

Upgrading micronucleus

Pretty nice article (https://www.iot-experiments.com/micronucleus-bootloader-upgrade/) gives a good description of how to upgrade your Digispark to the latest version.

  1. Download latest HEX representation of the micronucleus firmware e.g. upgrade-t85_default.hex

  2. Unplug device

  3. Run

micronucleus.exe --run upgrade-t85_default.hex
  1. Plug in your device

  2. Upgrade tkaes a moment

    NOTE: USB in windows will constntly detect plug-in and plug-off, this can be eliminated

    1. Unplugging the device
    2. micronucleus.exe --erase-only
    3. plug in the device
  3. Done!

More on upgrading

Additional reading

About

A basic structure of program with detailed instructables to start from scratch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published