Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dragoncoder047/super85

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

SUPER85

You can do a lot with just 5 pins.

 .-----___-----.
 RESET ---| O |--- VCC
PB3/ADC3/~OC1B ---| TINY85 |--- PB2/ADC1/SCL/T0
PB4/ADC2/OC1B ---| |--- PB1/OC0B/OC1A
 GND ---| |--- PB0/SDA/OC0A/~OC1A/AREF
 '-------------'

This is a collection of short Arduino sketches I have written for the ATtiny85 microcontroller.

Included sketches

  • smartboost: software-configurable boost converter power supply
  • clocksync: synchronize DC motor to mains frequency to run electric clock

Notes

  • I prefer the Sparkfun Tiny AVR Programmer to program the ATtiny85s.

  • The circuit diagrams, where included, have been rendered with Schemascii.

  • Unless otherwise noted: for those sketches that use I2C communication, SDA and SCL are as indicated in the diagram above and require external pull-ups, and the protocol for communication is a standard register-based read-write method, done as follows:

    • To write a register or block of contiguous registers: write the first register's index, followed by register contents. Register pointer auto-increments, and wraps at the end. In Arduino code:
      Wire.beginTransmission(XXX);
      Wire.write(regAddress);
      Wire.write(myData, sizeof(myData));
      Wire.endTransmission();
    • To read a register or block of contiguous registers: write the first register's index, issue an I2C restart, and then read. Register pointer auto-increments, but does not wrap at the end. In Arduino code:
      Wire.beginTransmission(XXX);
      Wire.write(regAddress);
      Wire.endTransmission(false);
      Wire.requestFrom(XXX, NNN);
  • The built-in I2C slave functionality is only present in Spence Konde's ATTinyCore, please use that when compiling these sketches.

AltStyle によって変換されたページ (->オリジナル) /