0

From the Adafruit Forums: Trinket Extravaganza! #trinket

Pasted Image 1 27 14 7 31 AM

Rob shared about his “Trinket extravaganza” on the Adafruit Forums:

It’s cool just how much you can hang off a Trinket!

I now have a 3.3v Trinket talking to:

over I2C

  • DS1307 Real Time Clock (includes 24C32 32K Bit I2C EEPROM memory which is also visible on the I2C bus)
  • HMC5883L 3 Axis Compass Magnetometer
  • PCF8574 – Remote 8-Bit I/O Expander for I2C-Bus

over SPI:

  • OLED 128×64 SSD1306
  • 23K256 SRAM Chip – 32K of lovely SPI accessible memory.

The SRAM provides a screenbuffer for the OLED module, which has no built in RAM. To draw the buffer to the display I read a ‘page’ worth of data (128 Bytes) at a time from the framebuffer and push these to the OLED, both over SPI. So a local 128 byte buffer is needed in the Trinket.

All the Trinket pins are in use so I use a small switch to disconnect #3 and #4 during proramming.

With SPI you need a separate Slave Select line for each device. These are provided by the PCF8574 which is an I2C IO Expander. I write to this first (over I2C) to select one of the output pins which act as Slave Selects for each SPI device. The outputs (I’m using 2) are then AND’ed with a single Master SS (on #3). This allows the individual SS’s to be driven low by the master SS.

Code eequires a bit of jumping between I2C mode and SPI mode and both are using the serial hardware on the ATTiny.

The display in the photo shows the time, a compass reading and a time per frame in milliseconds. So it’s running about 13fps with room for optimisation.

So all the chips you see are either I2C and SPI apart from a single 2-input AND gate, and the Cyberman….

Read more.


Featured Adafruit Product!

Adafruit Trinket – Mini Microcontroller – 3.3V Logic: Trinket may be small, but do not be fooled by its size! It’s a tiny microcontroller board, built around the Atmel ATtiny85, a little chip with a lot of power. We wanted to design a microcontroller board that was small enough to fit into any project, and low cost enough to use without hesitation. Perfect for when you don’t want to give up your expensive dev-board and you aren’t willing to take apart the project you worked so hard to design. It’s our lowest-cost arduino-IDE programmable board! (read more)


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 8,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Rethink Robotics closes shop. Long live collaborative robots #makerbusiness

Wearables — Cleaning is key

Electronics — Serial overkill

Biohacking — Biohacking Resources – Books, Talks and Podcasts

Python for Microcontrollers — CircuitPython @ Hackaday SuperCon #ICYMI @circuitpython @micropython @ThePSF #Python

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.