Tag Archives: ATMEL

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]

Adafruit Metro 328 – An Arduino Uno Compatible Development Board

The Adafruit Metro 328 development board is an alternative to the Arduino Uno with an equivalent and compatible board design. It’s designed and manufactured by Adafruit. The Metro 328 just like other Arduino Uno clones is also based on the famous Atmega 328P that has been used in various development boards and projects.

Adafruit Metro 328

The Metro 328 offers an ATmega328 microcontroller with Optiboot (UNO) Bootloader and a ton of other features you won’t find on the Arduino Uno board. The Metro board is equipped with 19 GPIO pins unlike the Arduino Uno 14, analog inputs, UART, SPI, I2C, timers, and PWM. Six of its GPIO pins are for Analog input with two reserved for the USB to Serial Converter. Just like the standard Arduino Uno, it also includes 6 PWM pins on 2x 8bit timers and 1x 16bit timers.

Another significant distinction between the Metro and the Arduino Uno is the USB to Serial converter. The Arduino Uno is based on the Atmega USB-UART bridge (ATMEGA16U2), but the Metro 328 is based on the FTDI FT231X that provides excellent driver support in all operating systems with a more reliable data transfer unlike the former. It comes with four indicator LEDs, on the front edge of the PCB, for easy debugging. One green power LED, two RX/TX LEDs for the UART, and a red LED connected to pin PB5.

The Metro board has an on and off switch for the DC jack so you can turn off your setup easily. It also uses the conventional micro USB connector found around. Even though the Logic level of the Metro is 5V, it can be converted to 3.3v logic by cutting and soldering a closed jumper.

The following are the Metro 328P specifications:

  • ATmega328 microcontroller with Optiboot (UNO) Bootloader
  • USB Programming and debugging via the well-supported genuine FTDI FT231X
  • Input voltage: 7-9V (a 9VDC power supply is recommended)
  • 5V regulator can supply peak ~800mA as long as the die temp of the regulator does not exceed 150*C
  • 3.3V regulator can supply peak ~150mA as long as the die temp of the regulator does not exceed 150*C
  • 5V logic with 3.3V compatible inputs can be converted to 3.3V logic operation
  • 20 Digital I/O Pins: 6 are also PWM outputs, and 6 are also Analog Inputs
  • 6-pin ICSP Header for reprogramming
  • 32KB Flash Memory – 0.5K for bootloader, 31.5KB available after bootloading
  • 16MHz Clock Speed
  • Compatible with “Classic” and “R3” Shields
  • Adafruit Black PCB with gold plate on pads
  • 53mm x 71mm / 2.1″ x 2.8″
  • Height (w/ barrel jack): 13mm / 0.5″
  • Weight: 19g

The Metro 328 board is now available with headers already in place for $19.50 directly from the online Adafruit store. If you don’t want a Metro with the headers attached for super-slimness, check out the Metro without Headers.

FemtoUSB Board (Atmel ARM Cortex M0+)

Arduino compatible, Atmel SAM D21 chip, open source!

This is one of the smallest ARM powered boards in the world. If you are ready to transition away from AVR 8-bit hardware to the very powerful ARM 32-bit stuff, this is the way to learn! The board design, schematic, and parts lists are completely open-source.

FemtoUSB Board (Atmel ARM Cortex M0+) – [Link]

AT88CK490, A New Atmel CryptoAuthentication USB Dongle Evaluation Kit

Atmel had produced a new USB evaluation kit “AT88CK490” to evaluate the performance and applicability of the Atmel Family of CryptoAuthentication devices. The kit contains three devices; ATSHA204, ATAES132, and ATECC108.

AT88CK490 Kit devices are based on Atmel AT90USB1287 microcontroller which provides a convenient USB 2.0 interface allowing users to understand and experiment with the CryptoAuthentication devices. Developers can use the provided 5-pin interface at the end of the board and can be used to monitor the I2C protocol.

This kit gives engineers, developers, and decision makers a tool to understand the device architecture and its usages for product authentication, confidential file protection, performing two-factor logons, or preventing software piracy.

CryptoAuthentication USB Dongle Kit Features

  • Atmel ATAES132A CryptoAuthentication IC: I2C Address (0xA0)
  • Atmel ATSHA204A CryptoAuthentication IC: I
  • 2C Address (0xC8)
  • Atmel ATECC108A CryptoAuthentication IC: I2C Address (0xC0) – AT88CK490 Only
  • Atmel ATECC508A CryptoAuthentication IC: I
  • 2C Address (0xC0) – AT88CK590 Only
  • Atmel AT90USB1287AVR
    • 128KB of In-system Programmable Flash
    • 4KB EEPROM
    • 8KB Internal SRAM
  • USB 2.0 Full Speed Device
  • Power LED (Red)
  • Three Status LEDs (Blue)

Atmel CryptoAuthentication is a crypto element device family with ultra-secure hardware-based key storage. It is used to ensure that the product and its accessories are original and are not counterfeited. CryptoAuthentication devices support modern cryptographic standards. They are cost-effective, require only a single GPIO, use very little power, operate over a wide voltage range, and work with any MCU.

The AT88CK490 evaluation kit has been designed to work with the Atmel CryptoAuthentication Evaluation Studio (ACES) configuration environment GUI. The complete source code for the Atmel AVR® is available, along with a schematic, a bill of materials, and Gerber files.

ATtiny Dev Board / Tinyduino

This is an ATtiny Dev Board. Designed for the ATtiny line of microcontollers from atmel. Its made to be small, simple to build and easy to use.

ATtiny Dev Board / Tinyduino – [Link]

Turn Arduino into an AVR TPI Programmer

Elliot Williams @ hackaday.com show us how to use your Arduino to program AVR TPI enabled microcontrollers.

Turning an Arduino of virtually any sort into a simple AVR 6-pin ISP programmer is old hat. But when Atmel came out with a series of really tiny AVR chips, the ATtiny10 and friends with only six pins total, they needed a new programming standard. Enter TPI (tiny programming interface), and exit all of your previously useful DIY AVR programmers.

Turn Arduino into an AVR TPI Programmer – [Link]

Temperature alarm for boiling milk

image2

Domen Ipavec shares his temperature alarm for boiling milk. Temperature alarm uses an Atmel attiny841 microcontroller, DS18B20 high temperature waterproof temperature sensor from adafruit, 2×16 HD44780 LCD and a buzzer to do its job.

Anyone who has ever boiled milk on the stove knows, that it has a nasty habit of overflowing. That is why I created the temperature alarm for boiling milk to be used my mother. It continuously measures the temperature of the milk and sounds an alarm when the temperature is over the preset alarm value.

Temperature alarm for boiling milk – [Link]

Badgerboard, LoRa Future IoT Development Board

The LoRa Alliance™ is an open, non-profit association of members who believe that the Internet of Things era is now, its LoRaWAN is a Low Power Wide Area Network with features that support low-cost, mobile, and secure bidirectional communication for Internet of Things (IoT), machine-to-machine (M2M), smart city, and industrial applications. LoRaWAN is optimized for low power consumption and is designed to support large networks with millions and millions of devices. Innovative features of LoRaWAN include support for redundant operation, geolocation, low-cost, and low-power – devices can even run on energy harvesting technologies enabling the mobility and ease of use of Internet of Things.

Check this video to learn more about LoRa and its protocol:

Badgerboard is an Arduino compatible LoRaWAN™ open source development kit, that can be easily extended to a prototype or even a small batch product. Development board has a battery charger and antenna connector on board.

Using as small as the battery you have in your watch, you can power your Badgerboard to send and receive radio waves, that can reach from 1km to 3km in the urban area up to 10+ km in the rural areas

94e86e7d258145170df83e310866865b_original

The communication is powered by widely used Microchip LoRaWAN module. There are two editions of the module one using  RN2483-I/RM101 for the 433/868 frequency bands and the other is using RN2903-I/RM095 for the 915 MHz band and its sub-bands. The LoRaWAN stack is already part of the module and all needed libraries for LoRa functionality are included.

Here are the features of the module:

306d6b0953444211c0519770c96c47da_original

Check Badgerboard in action and the possibilities that can be done using it:

Badgerboard is now live on a Kickstarter campaign, you can pre-order the early bird board for $45 here. You can check their website to keep involved with the latest updates www.badgerboard.io

Atmel ATtiny417/814/816/817 Include Core Independent Peripherals (CIPs)

Atmel tinyAVR microcontrollers are optimized for applications that require performance, power efficiency and ease of use in a small package. All tinyAVR devices are based on the same architecture with other AVR devices. The integrated ADC, DAC, EEPROM memory and brown-out detector let you build applications without adding external components. The tinyAVR also offers Flash Memory for fast, secure and cost-effective in-circuit upgrades that significantly cuts your time to market.

The latest tinyAVR devices (ATtiny417/814/816/817) by Atmel combine AVR core with CIPs (Core Independent Peripherals). PIC microcontrollers with Core Independent Peripherals (CIPs) already raised the performance of 8-Bit-MCUs to a new level. Since the acquisition of Atmel by Microchip, this is the first time the company leverages features from both MCU families.

So, now the question is:

What Is CIP?

In fact, the term CIP or Core Independent Peripherals is pretty much self-explanatory. Microchip’s description of CIP is:

CIPs allow the peripherals to operate independently of the core, including serial communication and analog peripherals. Together with the Event System, that allows peripherals to communicate without using the CPU, applications can be optimized at a system level. This lowers power consumption and increases throughput and system reliability.

Core Independent Peripherals or CIPs are designed to handle their tasks with no code or supervision from the CPU to maintain their operations. As a result, they simplify the implementation of complex logic control systems and give designers the flexibility to innovate.

ATtiny417/814/816/817 with Core Independent Peripherals block diagram
ATtiny417/814/816/817 with Core Independent Peripherals block diagram

ATtiny Models With CIPs:

  • 8-bit Atmel AVR microcontroller with 4KB Flash, 256 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Custom Logic, 10-bytes unique ID, and 24 pins.
  • ATtiny814 :
  • 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 14 pins.
  • ATtiny816 :
  • 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 20 pins.
  • ATtiny817 :
  • 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 24 pins.
ATtiny417/814/816/817 With Core Independent Peripheral flash size and Pin count
ATtiny417/814/816/817 With Core Independent Peripheral flash size and Pin count

The new 8-bit tinyAVR MCUs are available in QFN and SOIC packages with pricing starting at $0.43 for 10K units. Visit Atmel tinyAVR product page for full technical details about the new MCUs.

Build Your Own I2C Sensor

Since Raspberry Pi doesn’t have a built-in ADC (Analog to Digital converter) to read the voltage off from most of sensors, the best solution is to add I2C ADC chips and modules to your project.

Paweł Spychalski faced this problem while building his own weather station that is based on Raspberry Pi. It collects various data and displays them on dedicated web page and Android app. Every few months he tries to add a new sensor to it. Last time it was a daylight sensor. He added this sensor to his system by using ATtiny85 and it was connected via I2C bus.

ATtiny85 is a member of Atmel tinyAVR series which has 8-bit core and fewer features, fewer I/O pins, and less memory than other AVR series.

The Inter-integrated Circuit (I2C) Protocol is a protocol intended to allow multiple “slave” digital integrated circuits (“chips”) to communicate with one or more “master” chips. Like the Serial Peripheral Interface (SPI), it is only intended for short distance communications within a single device. Like Asynchronous Serial Interfaces (such as RS-232 or UARTs), it only requires two signal wires to exchange information.

I2C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted.

425px-i2c-svg
Sample Inter-Integrated Circuit (I²C) schematic with one master (a microcontroller) and three slave nodes

Most of developers use I2C to connect to sensors with the help of the Arduino “Wire” library or “i2c-tools” on the Pi, but it is rare to see someone that is actually building the I2C slave device. Paweł’s project uses TinyWireS library, a slave-mode SPI and I2C library for AVR ATtiny Arduino projects.

This diagram shows how to build analog to digital converter using ATtiny85 and connect it to any device (Raspberry Pi, Arduino) using I2C bus. Here photoresistor has been used, but any analog meter will be fine: temperature, potentiometer, moisture…

ATtiny85 directly connected to Raspberry Pi via I2C, photoresistor with 10kOhm pull down connected to ATtiny85 and signal LED.

attiny_photoresistor_i2c
ATtiny85 directly connected to Raspberry Pi via I2C, photoresistor with 10kOhm pull down connected to ATtiny85 and signal LED.

For reading data you can use this code. ATtiny sends current measurement as two 8 bit value. First older bits, then younger 8 bits.

Wire.requestFrom(0x13, 2);    // request 2 bytes from slave device #0x13

int i =0;
unsigned int readout = 0;

while (Wire.available()) { // slave may send less than requested
 byte c = Wire.read(); // receive a byte as character

 if (i == 0) {
  readout = c;
 } else {
  readout = readout << 8;
  readout = readout + c;
 }

 i++;
}

Serial.print(readout);

To do this project you need to use Arduino IDE 1.6.6., TinyWireS library,ATtiny45/85 board, plus an 1MHz internal oscillator.

Watchdog timer interrupts ATtiny every few minutes, measures voltage, filters it and stores in memory. Every time read operation is requested, last filtered ADC value (10 bits as 2 bytes). I2C support is provided by TinyWireS library that configures ATtiny USI (Universal Serial Interface) as I2C slave.

/**
* This function is executed when there is a request to read sensor
* To get data, 2 reads of 8 bits are required
* First requests send 8 older bits of 16bit unsigned int
* Second request send 8 lower bytes
* Measurement is executed when request for first batch of data is requested
*/
void requestEvent() {
 TinyWireS.send(i2c_regs[reg_position]);

 reg_position++;
 if (reg_position >= reg_size) {
  reg_position = 0;
 }
}

/*
* Setup I2C
*/
TinyWireS.begin(I2C_SLAVE_ADDRESS);
TinyWireS.onRequest(requestEvent); //Set I2C read event handler

 

Bright by day, dark by night
Bright by day, dark by night

This cool weather station and its need of daylight sensor is only an example. The amazing thing is that you can now build new I2C sensors and introduce new modules to your projects easily following Paweł’s steps.

For more details about this project you can check Github and the weather station website.