Tag Archives: AVR

Programming the ATtiny10 using Arduino IDE

David Johnson-Davies @ technoblogy.com has a nice guide on how to program ATtiny10 6-pin mcu using the arduino IDE. Programming is done using the widely available USBasp programmer from Thomas Fischl. Examples are also included on the guide.

Unlike the SPI protocol used to program the larger AVR chips, such as the ATmega328 in the Arduino Uno, the ATtiny10 uses a programming protocol called TPI (Tiny Programming Interface) which needs only five wires. Fortunately Thomas Fischl’s excellent USBasp programmer supports this protocol [3]; you can build your own, order one from his site, or they are widely available on eBay [4], Banggood [5], etc.

Atmel ATmega8 – A World-Famous Microcontroller Created By Two Annoyed Students

AVR is a family of microcontrollers developed by Atmel beginning in 1996. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. The Atmel AVR core combines a rich instruction set with 32 general purpose working registers. Atmel’s ATmega8 comes from the AVR line of microcontroller and it is a gem of the modern maker movement. It is used as the heart of the first generation of the Arduino board to be widely adopted by electronics hobbyists. Countless creative projects are designed with those cheap yet powerful chips.

ATmega8 was originally developed in the early 1990s by two students at the Norwegian University of Science and TechnologyAlf-Egil Bogen, and Vegard Wollan. Microcontrollers are different from microprocessors in terms of built-in memory and I/O peripherals. They typically have their own onboard program memory and RAM, rather than relying on external chips for these resources.

When Bogen and Wollan were in university, they faced trouble in following the steep learning curve of the complex instruction sets for microprocessors. Most of the processors used in those days were CISC (Complex instruction set computer) based. They wanted to design a RISC (reduced instruction set computer) based microcontroller with an aim in mind to create something that would be easy to program and relatively powerful. Bogen explained in a YouTube video,

I found them very hard to us. The learning curve to get to use them was hard; I found the development tools crappy. And also I saw that the performance of the products was not where I wanted it to be.

Bogen
Alf-Egil Bogen – one of the creators of the AVR core

Computers, that are typically used on the day-to-day basis, use Von Neumann architecture. In this architecture, programs are loaded into the RAM first and then executed from the same. AVR uses the Harvard architecture, in which program memory and working RAM are kept separate, thus enables faster execution of instructions. The first prototype of AVR used ROM, which is not re-writeable, as the program memory. Later Atmel added easily programmable (and reprogrammable) flash memory to the processor core. The first commercial AVR chip, the AT90S8515, was released in 1996. Wollan says in a video,

instructions and stuff were things we were actually thinking of from the very beginning to make it efficient and easy to use from a high-level point of view

Wollen
Vegard Wollen – another creator of AVR

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.

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]

Emulate an Apple ][ on an AVR Microcontroller

The Apple II personal computer, which stylized as Apple ][, is an 8-bit home computer and one of the first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak and developed with Steve Jobs. Apple ][ was introduced in 1977 at the West Coast Computer Faire by Jobs and was sold several million times till 1993.

Maximilian Strauch is a computer scientist, software developer, web designer and maker from Germany. In 2014 he wrote about implementing a software emulator for the complete Apple ][ computer system on a single Atmel AVR microcontroller unit (MCU) in his Bachelor thesis.

The microcontroller not only emulates the MOS 6502 processor, it also performs other tasks such as output display and input keyboard. A challenging task is to get the 20 MHz AVR controller run as the 1 MHz processor.

The final result of the thesis is a fully functional, battery powered and portable Apple ][ emulator.

This video shows the final prototype in action and demonstrates most of it’s features.

The layer diagram of the Apple ][ emulator consist of about 10 layers shown in the next figure.

  • Emulator Runtime Environment (ERE): Contains the source code which makes up the main (backend) GUI of the emulator in particular, the menus.
  • UI Framework / Display I/O: Some low level functions to control the LCD display (SSD 1289 controller) and functions to paint menus and backgrounds.
  • Keyboard I/O: Accepts key presses from the separate keyboard controller and provides some high-level functions to convert Apple ][ keystrokes into regular ASCII keycodes and some wait-for-keypress functions.
  • State I/O: The emulator supports saving the current state of the entire emulation including RAM and the processor registers. Therefore the execution can be saved and reloaded later to continue at the exact same execution state.
  • TWI / EEPROM: Provides physical layer support to talk to an EEPROM, e.g. two functions which utilize the AVR’s hardware support for I2C to talk to the 128KB I2C serial EEPROM from Microchip.
  • DSK I/O: Contains all high-level functions to read Apple ][ floppy disk images (5 1/2 inch floppy disks, normally 140 KB in total) and list that contained programs to load them into memory.
  • SD Library (3rd party): The emulator uses the Petit FAT File System Module by Elm Chan since it works out of the box. A further improvement could be to store states to the SD card.
  • 6502 CPU Emulation: Advanced emulation of the MOS 6502 processor without support for illegal instructions (not originally defined) and the BCD mode.
Layer diagram of the Apple ][ emulator: every horizontal connection of two boxes symbolizes a use relation.

Max has published detailed information about the thesis here. All of the project resources are available online, so you can download the full thesis, the keynote, and the schematic.

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.

Program AVR Using Arduino the easy way

pn3

rik @ riktronics.wordpress.com show us how to program AVR microcontrollers using an Arduino board.

Advanced hobbyists like me (and you, of course 😉) love to play with microcontroller. And the most famous microcontrollers for beginners are AVR series from Atmel™.  Almost all beginners in microcontroller-world have their Arduino boards lying on work table. Because it is so much easy, so much fun, and so much famous. Here I explained How to Burn Programs In Your AVR Microcontroller Using An Arduino.

Program AVR Using Arduino the easy way – [Link]

WiLoader : The WiFi Programmer for Arduino & AVR

88fc4c2107d9c5238a22606cadf1fed0_original

The new generation of programmers that use WiFi instead of cables. Program, control and monitor Robots, AVR and Arduino over WiFi.

Have you ever thought of programming wirelessly ? WiLoader is the answer. But HOW ???? WiLoader easily connects to your WiFi network, then you can program your AVR, Arduino boards, Robots and other targets like them. It doesn’t need any kind of cable for computer connection, especially those huge old USB ones. Because it employs WiFi, even your smartphone can be used to configure, communicate, control and monitor your targets via a WiFi-UART bridge.

WiLoader : The WiFi Programmer for Arduino & AVR – [Link]

A miniature persistence-of-vision board

front

axio.ms published an update of the board and firmware of their SMD POV display.

This device is simply 8 bright SMD LEDs and an AVR uC and makes use of the Persistence of Vision effect. You wave it about, and it writes messages in the air, with no wires, liquids or unpleasant bending! Some would say that it’s quite similar to magic. It’s a double-sided kitchen PCB (toner transfer) with a flower on the back. It has a single button; held for a second, it switches it on/off. When on, a quick click switches between a set of predefined messages. It runs off a CR2032 until the end of time.

A miniature persistence-of-vision board – [Link]

AVR vs PIC: The case of the candle

led_candle

A self-igniting candle implemented using AVR and PIC microcontrollers.

This project has two variations, one using an ATTiny25, the other using a PIC12LF1822.

In a series of minimalistic devices, this electronic candle periodically measures ambient light levels. Once it detects nightfall, it self-ignites and burns for three hours, flickering as a candle does. The flicker intensity changes about every minute, adding more variability.

AVR vs PIC: The case of the candle – [Link]