Blog

Attiny13 Blink example

Image of Attiny13 MCUJust to keep and share the code... Here is the code for making a LED blink using an Attiny13 MCU from Atmel.

I got a package with about 30 AVR MCU's from different kind yesterday and now I will give them all a try. The next step with the Attiny13 is to build a thermometer with a RGB LED as indicator of the temperature. As temperature sensor I will use the LT1025 chip which I tried some days ago. I got many logic IC's too so it will be a hackish time this december. I will post the code and circuit here in some days when everything is working properly... ;)

#include <avr/io.h>
#include <util/delay.h>

#define LED_PIN PB4

int main(void) {

  // Configure LED_PIN (PB4) as output
  DDRB |= (1 << LED_PIN);

  while (1) {
    PORTB |= (1 << LED_PIN);
    _delay_ms(500);
    PORTB &= ~(1 << LED_PIN);
    _delay_ms(500);
  }

  return 0;
}

Have fun... ;)

Permalink: https://hanez.org/2011/12/04/attiny13-blink-example/

Evaluating LT1025

Today I found a chip named LT1025. It is a Thermocouple Cold Junction Compensator from Linear Technology which is very easy to use for building temperature sensors for measurement and control and can also be used to convert a heat gradient into electricity.

It took about 5 minutes to get it working in the Arduino environment.

Just order some samples from Linear, they will send you one or two without charge... ;)

Permalink: https://hanez.org/2011/12/02/evaluating-lt1025/

Evaluating 74HC238

Image of 74hc238 icI am currently working me thru my box of microchips and other electronic stuff. I found some 74HC238 IC's today and gave them a try. It was no very spectacular event but it's nice to know what I have laying around when starting the next AVR project.

The 74HC238 is a high speed CMOS 3 to 8 line decoder which makes it possible to control 8 outputs with only 3 input lines. You will find more information and the datasheet at Sparkfun.

I used it to control 8 LED's with my Arduino using just 3 output pins. Nothing worth to show you a photo... ;)

Permalink: https://hanez.org/2011/12/01/evaluating-74hc238/

Pages

NULL
Page generated at: Mar 26, 2024 (CET) using Jekyll & xw3 on GNU/Linux
Powered by: NULL