Mcu category

ATtiny85 20MHz Internal Clock

Here is a new tutorial from technoblogy.com on how to run ATtiny85 with internal 20MHz clock.

The ATtiny85 is rated at a maximum clock speed of 20MHz at 4.5 – 5.5V. For some applications it would be nice to get the maximum speed without needing to buy a 20MHz crystal, or tie up two I/O lines driving the crystal. Here’s how to do it.

To test it I toggled an output at the clock frequency, and measured it with a frequency meter

The reading of 10MHz implies a clock frequency of 20MHz.

2ATtiny85 0MHz Internal Clock – [Link]

RELATED POSTS

IR Remote Wand based on ATtiny85

David Johnson-Davies published another great project. It’s an IR remote that supports the most popular control protocols.

The IR Remote Wand is a universal remote control that you can program with up to five codes to control a variety of different products:

It supports some of the most popular IR remote control protocols: Philips RC-5, NEC, Samsung, and Sony. It’s based on an ATtiny85, and the circuit goes to sleep when you’re not using it, to avoid the need for an on-off switch and to prolong the battery life. You can use my earlier IR Remote Control Detective [Updated] to discover the codes for the functions you want to support.

IR Remote Wand based on ATtiny85 – [Link]

LoRa module in DIL form

Mare writes:

Murata produces LoRa module CMWX1ZZABZ-xxx based on SX1276 transceiver and STM32L072CZ microcontroller. The soldering of the LGA module is not very hobby-friendly. I constructed small breakout PCB for this module with additional buck/boost switcher and place for SMA connector. The transceiver features the LoRa®long-range modem, providing ultra-long-range spread spectrum communication and high interference immunity, minimizing current consumption. Since CMWX1ZZABZ-091 is an “open” module, it is possible to access all STM32L072 peripherals such as ADC, 16-bit timer, LP-UART, I2C, SPI and USB 2.0 FS (supporting BCD and LPM), which are not used internally by SX1276.

LoRa module in DIL form – [Link]

CH551 is a $1.80 USB Mini Development board based on the 8-bit C51 micro-controller

WCH (Nanjing QinHeng Corp.) has recently launched a CH55x family of microcontrollers based on an 8-bit C51 core with a USB interface, and I/Os. The boards all come with different I/Os configuration depending on the selected part number.

Electro dragon, the popular online store that offers a range of electronic components is now listing one of the development boards – a tiny USB development board based on the CH551 for about $1.80.

This tiny, low-cost USB development board has 1x USB type-A port, onboard power led, LED (P3.0). One advantage peculiar to the board is that its microcontroller unit (MCU) supports USB to TTL conversion of the shell without the aid of an external converter as compared to some other development boards. For example, the official Arduino Uno doesn’t support USB to TTL conversion of the shell; it features the Atmega16U2 (Atmega8U2 up to version R2) which is programmed as a USB-to-serial converter. This feature not only makes the board smaller but also cheaper since no extra cost is spent on adding a USB to Serial driver chip.

The board can be programmed without external hardware tool using either WCHISP windows tools or open source flasher LibreCH551 plus SDK which works with both Linux and Windows. However, its own compiler has no libraries, so a suitable substitute is the SDDC compiler. The only glitch with using an SDDC compiler is that the libraries for most devices have not yet been built. Another important factor to be taken into consideration when programming with the flashing tool is that flashing or programming is limited to 200 cycles due to a bug put by the creators.

Below are some of the specifications of the board:

  • MCU – WCH CH551 8-bit C51 micro-controller
  • Speed – 24 Mhz
  • Memory – 10Kb of ROM and 512b of xRAM
  • USB – 1x USB type-A port (USB 2.0 + 1.0)
  • GPIO – 18 through holes exposing all I/Os from the MCU including GPIOs, USB, 3.3V, 5V GND
  • Others –
    • On-board power led
    • 3x Timer
    • 2x PWM
    • 1x SPI M/S
    • 6x Touch
    • 1x HS UART
  • Power – 5V through USB or I/O pin

Electro dragon will also release other versions of the family boards based on the CH552, CH554, CH558, and the CH559. The CH551 board is obviously going to be the cheapest of the product line, and the CH559 board is expected to be the most powerful board which comes with more advanced features.

The CH551 tiny development board is available for purchase on the Electrodragon site, and the CH511 chip is also being sold for 25 cents on Taobao.

AtPack: Atmel Pack parser, visualizer and fuse calculator

AtPack – Atmel Pack parser, visualizer and fuse calculator from Vagrearg:

Looking for an up-to-date fuse-calculator for the Atmel(*) AVR chips has been something of a long search. There are several online versions, but they have not been updated to the new chips (like the ATmega328PB).
When you have got an itch, you simply scratch it… Don’t you?
Well, I did, and it resulted in an analysis of the Atmel Pack format, which can be freely downloaded under an Apache 2.0 license. The AtPacks contain a master XML file with device lists and links to each device’s XML file, which in turn describes the entire chip. The format is not that hard to understand and can be easily mangled into something useful. Then, some crude jQuery hacking and many hours later… you know how that works.

AtPack: Atmel Pack parser, visualizer and fuse calculator – [Link]

IR Remote Control Detective based on ATtiny85

David Johnson-Davies published another great and detailed tutorial on how to build an IR remote control detective. He writes:

The IR Remote Control Detective decodes the signal from several common types of infrared remote control, such as audio, TV, and hobbyist remote controls. To use it you point a remote control at the receiver and press a key; it will then identify the protocol, and display the address and command corresponding to the key.

IR Remote Control Detective based on ATtiny85 – [Link]

Harmonic Function Generator using ATtiny85

David Johnson-Davies published another great and detailed project based on ATtiny85. It’s an harmonic function generator with an OLED display.

This article describes a simple function generator based on an ATtiny85 which allows you to generate a virtually unlimited number of waveforms using additive harmonic synthesis, by specifying the amplitude of each of the waveform’s harmonics.

It includes a volume control, audio amplifier, and loudspeaker so you can hear the waveforms. It’s not only a useful waveform generator, but also a good introduction to the composition of musical notes.

Harmonic Function Generator using ATtiny85 – [Link]

Program-O-Tron – SD Card Based Standalone AVR Programmer

An SD card based standalone AVR Programmer is live on kickstarter and has 24 days to go.

Here at proto-pic HQ we make kits, lots of kits, and that means lots of AVR programming. We found this a tedious task and wanted a solution to make the whole thing quick and easy. No more did we want to have to use AVRDude or Arduino as ISP to program a few hundred ATtiny85s with a bootloader.

We looked around and found a few stand-alone programmers. Great. However they cost over £100 each and could only store one file which wasn’t so great.

Program-O-Tron – SD Card Based Standalone AVR Programmer – [Link]

Tiny Graphics Library for ATtiny85 and SH1106 OLED Display

David Johnson-Davies published another great tutorial on how to use the Tiny Graphics Library to plot the outside temperature over 24 hours on a 128×64 OLED display using an ATtiny85.

This small graphics library provides point, line, and character plotting commands for use with an I2C 128×64 OLED display on an ATtiny85.

It supports processors with limited RAM by avoiding the need for a display buffer, and works with I2C OLED displays based on the SH1106 driver chip. These are available for a few dollars from a number of Chinese suppliers.

To demonstrate the graphics library I’ve written a simple application to measure the temperature every 15 minutes over a 24-hour period and display it as a live chart.

Tiny Graphics Library for ATtiny85 – [Link]

RELATED POSTS

Trill – an open-source 3G mobile phone

This is a complete GSM/3G mobile phone, based on the ioNode.

Features

128 x 64 OLED display
* 16 buttons + 5-way mini-joystick
* Microphone & earpiece
* MicroSD card slot
* MicroSIM card slot
* MP3 decoder, headphone amplifier and 3.5mm stereo jack
* Vibrator

Trill – an open-source 3G mobile phone – [Link]