Archives for category: Related Link

Starting to program microcontrollers in assembler is quite a barrier in the beginning. Searching the web for Assembler tutorials and example code can get confusing really fast, that’s why I want to share my experiences and provide a collection of links that helped me to get started with this topic.

First of all three important differences derive from the three major microcontroller companies: Microchip, Atmel and ARM. Good introduction to Microcontrollers (also for the difference of PIC and AVR) and also this basic Introduction into Assembly Language and a Assembler Hello World ASM Example are worth having a look.

Further there are ways to convert C code to Assembler code, to optimize C code for AVR microcontrollers by Atmel and ways to mix these languages together: Mixing C and Assembly, Atmel tutorial for Mixing C and Assembly

The difference between the .asm and .S file extensions for the assembler code files is not really clear, but this messageboard thread about the file extensions difference of .ASM and .S helped a little bit. Two examples for .S-files can be found with a Linker Script commands for S-code blink example and another S-code blink example. More infos on Linker Scripts here.

Besides the instruction sets and specific libraries for the microcontrollers it is important to understand how the GNU GCC Compiler works. For example does it use the GNU Binutils for i.a. compile command objcopy etc. Here can also be found some compile commands for my AVRFID example.

If you find anything wrong in this collection of informations on microcontroller programming, I would be happy for a comment. I wanted to sum up and share my search results here and maybe it helps other people to get faster into it!?

In order to use an ATtiny85 as an AVRFID, it is necessary to know the exact inner workings of these microcontrollers.


For I/O-operations the pins (2=PB3, 3=PB4, 5=PB0, 6=PB1, 7=PB2) can be used. The configuration of the ports is affected by the three 8-bit registers PORTB (data register), DDRB (data direction register) and PINB (port input pins):

Read the rest of this entry »

Good work by Melanie Rieback, an Assistant Professor of Computer Science at the Vrije Universiteit in Amsterdam in the field of RFID security. Among other things I found a nice presentation about the security of ubiquitous computing with RFID in the spot light. Further more a podcast about RFID malware and a video of a presentation at the LIFT09 Conference (unfortunately with the french translation).

First of all I emphasize that unfortunately none the following attempts of reprogramming fused AVRs was successful in my case. Therefore this is more a personal documentation of what did not work, rather than a tutorial on how to get AVRs reprogrammed.

The general problem is, that once the fuse bits of an AVR are set to except an external clock source, the AVRs can in theory only be reprogrammed when they have that external clock source during the reprogramming process as well. In practice it is much more complicated.

Read the rest of this entry »

Latest example of action figures using RFID/NFC to be represented with in a videogame. Will be probably a big merchandise enhancer for Disney, cause you really have to buy extra features for your video game in terms of these exisiting objects. I don’t know if the position of the body Parts can also be recognized and represented in the virtual game!? We will see…

Seems that nearly every week there is something announced about action figures using RFID technology. Just stumbled over the news that Activision has a Toys to Life series with the Skylanders Swap Force being the latest crossplatform, that allows in-game avatar representations of the toys plus storing unique information in the toys.

Great long range 125kHz reader and writer example using the T5567 protocol. It reaches a read distance of a “couple of feets”.

Valuable article about the security lacks in the HID Standard Security iCLASS™ Cards.

  1. 21. September 2008: Using an AVR as an RFID tag by Author Beth (Micah Dowty) and version 1.0 of the avrfid.S . Also found as the Emulator RFID.
  2. 15. June 2010: AVRFID 1.1 Firmware by Author Beth (Micah Dowty) version 1.1 of the avrfid.S which incoporates a few patches by Luke Koops who improved the FSK modulation for HID tags, so that the resulting waveform is much more regular and Cesar Fernandez who described the HID card format in more detail.
  3. 16. May 2011: Duct Taped AVRFID by Author Beth (Micah Dowty) uses her version 1.1 avrfid.S
  4. November 2011: AVRFID PCB Implementation by Daniel Smith
  5. September 2012: RFID Spoofing by Eric Barch who only uses Beth’s (Micah Dowty)  HID part of her version 1.1 avrfid.S .
  6. 1. December 2012: AVRFID 1.2 Firmware last update by Daniel Smith on his version 1.2 of Beth’s avrfid.S which adds support for 35 bit HID Corporate 1000 format and fixed 26 bit parity.
  7. 27. December 2012: AVR RFID Multipass by Trammell Hudson of the NYC Resistor hacker collective, which come up with an optimized version of Beth’s version 1.2 avrfid.S and convert it to C ending in the avrfid2.c file. Beth (Micah Dowty) welcomes this transition as it uses less of the 8kB flash memory of the AVRs etc… and has an nice application scenario of an action figure, whose body parts trigger different IDs in the AVRFID tag. The whole code in C for latest AVRFID tag and the reader can be found here. In his post Hudson also describes how easy it is to reprogramm AVRs with some Bus Pirate Tools, which provide an recovery clock. But a few patches are still needed!

The T5557 protocol by Atmel supports read and write operations on RFID tags. Here a shorter summary of the T5557 protocol. By that it’s easy to clone tags, like in this example. But at the same time this rises security issues, which is probably the reason why it is not so commonly used (yet). The difference to the successor, the T5567 protocol is simply some improvements in terms of power on reset if the tag enters the field very slowly.

Really comprehensive explaination of the EM4100 protocol. The whole data structure of this common communication is illustrated, which also gives me orientation for the demands on my custom AVRFID code. Here the official EM4100 datasheet which is part of a whole family of EM protocols by EM Microelectronic. There is also an overview of their protocols by the field of application. The latest protocol is the EM4200 which actually replaces the precursor protocols EM4100/4102 and EM4005/4105.