Someday …

I’ve made some progress on my 5 tubes shortwave radio.

The frequency counter prototype is working.

I’m using a MPF102 as an RF amp, then the signal is feed in a 74HC161 (16x prescaler) and finally into an atmega328p for counting.

For a video goto:

[youtube=http://www.youtube.com/watch?v=Wd0NOFe4joQ]

Project 4 – Homemade SW vacuum tubes receiver

Optrex F-51159 glcd controlled by an Arduino

Just got some Optrex F-51159 GLCD’s from eBay.

If you ever need the datasheet or some code example to make them work with an Arduino, read further:

glcd_demo.pde
============================================================================
/*
   Demo of a Optrex F-51159 controlled by an Arduino.
  
   Note:
  
   There is no CSEL1, CSEL2 on the F-51159.  Connect CS to  pin 14 (analog_0), Nothing on pin 15 (analog_1)
   See: http://www.arduino.cc/playground/Code/GLCDks0108
  
   LCD Bias voltage (-12 to -5 volts) to glcd pin 3 is mandatory.

   Display is 120 x 64 dots, so make these changes to ‘ks0108_Panel.h’ :
   ———————————————
       // for F-51159NYJ-SEW-AA
       #define DISPLAY_WIDTH 120
       #define DISPLAY_HEIGHT 64

      // panel controller chips
      #define CHIP_WIDTH     60  // pixels per chip
   ———————————————
 */

#include <ks0108.h>
#include « Arial14.h »       
#include « clock.h »           // Clock bitmap

unsigned long startMillis;

void setup(){
  GLCD.Init(NON_INVERTED);  
  GLCD.ClearScreen(); 
  GLCD.DrawBitmap(clock, 0,0, BLACK);
  GLCD.SelectFont(Arial_14);
  GLCD.GotoXY(60, 2);
  GLCD.Puts(« Pixel Show »);
  GLCD.GotoXY(61, 47);
  GLCD.Puts(« by ve2cuy »);
  countdown(9);
}

void countdown(int count){
    while(count–){
     GLCD.GotoXY(30, 40);
     GLCD.PutChar(count + ‘0’);
     delay(1000); 
     GLCD.GotoXY(30, 40);
     GLCD.Puts( »  « );
  } 
}

void  loop(){
  GLCD.ClearScreen();

  startMillis = millis();
  while( millis() – startMillis < 15000){
    GLCD.SetDot( random(120), random(64), BLACK);
  }

  startMillis = millis();
  while( millis() – startMillis < 15000){
    GLCD.SetDot( random(120), random(64), WHITE);
  }

  GLCD.Init(INVERTED); 
  GLCD.ClearScreen();
  GLCD.GotoXY(36, 24);
  GLCD.Puts(« The  end… »);
  while (true){}
}
============================================================================

Datasheet:

F-51159

[youtube=http://www.youtube.com/watch?v=yUbRnAU_2Is]

Abyssus universitas

In the world of computer programming, the “Hello world program” is often the first one we write.  During my computer science Degree, we did it in Cobol, Pascal, Modula, 370 assembler, …

In the world of microcontroller, where a display device his rarely utilize in a first project, we light up a LED.

Even after years of playing around with cpu chips or microcontrollers, I still revisit that old classic.

There is something fascinating about staring at a flashing LED.

It must come from my youth, when I would stare at the vacuum tubes in the back of my parent’s b&w tv for hours. Yep, I’m that old…

So, back to the never ending project of lightening a LED.

After unwrapping the AVRISP mkII, I reproduced a “RGB led, PWM controlled” project from David Gustafik at http://www.daqq.eu/index.php?show=prj_yabled.

The idea here was to test the new acquired AVRISP mkII, not reinvent a way of saying “abyssus universitas”.

After a few adjustments in AVR Studio and transferring the HEX file to the chip, I caught myself staring, and staring, and staring, and … (ok, you get the point) at:

[youtube=http://www.youtube.com/watch?v=YiELwEK13aM]
I must admit, 9 channel software PWM is not the usual ‘Hello world’ program, but what the heck…

Farewell

When price is not worth your while

When shipping time is not an issue, I usually order electronic parts from Asia.

But sometimes, you know, when you feel a project itch, I always order from DigiKey.

Why?

Fair prices but mainly, the service.  I don’t know how they do it but I ALWAYS receive my order, at my door, in less than 24 hours!

Thanks, Guys!

So, just got my AVRISPmkII and other stuff.

The unpacking:

 

[slideshow]

And now, back to the project …

Hold on to that pile of gold

For the last year, I have been using an Arduino board and the associated IDE to build a few projects around the Atmega328.

If you are willing to live with miner limitations; boot loader, hardware wrappers (timers, interrupts), …, it’s a very handy solution.

The only major annoyance is the scarceness of the Atmega328 or 168 chip!  Try to get one with DIP package at a reasonable price… It’s been out off stock for a while now at DigiKey (well I guess not anymore: DigiKey, Mouser)

I saw, on eBay, a seller that was asking 1,99USD + 8,50USD for shipping – for one Atmega328.  I said to myself, hum, it might be a good opportunity for 10 pieces.  So I asked the sealer.

Surprise! (well, not really), I got this:

Dear aboudro,

“For normal price of total price 10units(Atmega328) is $105 but for you that special price of total price 10units(Atmega328) is $85

Best regards,

– m……

Great, He gave me a special price on shipping, 65$ to send a 2 ounce package.  I felt so lucky.

Back to my story;

Atmel makes a lot of fine and available chips so I got myself an Atmel AVR ISP In-System Programmer and some ATTINY2313-20PU-ND.

Their IDE is a pleasure to work with and I like the idea of ‘in circuit programming’.

My next AVR project will be a frequency counter – on the local oscillator- with I.F. adjustment – for a vacuum tube, shortwave radio I am working on.  See this post: http://ve2cuy.wordpress.com/vacuum-tube/project-4-sw-tube-receiver/.  It will be used to display the tuned station frequency.

I will start by using a Hitachi HD44780 compatible LCD display but I might switch to nixie tubes.

To be continued…

Pic’s and Atmega’s …

Just ordered a few atmel and microchip microcontrollers on eBay for some projects that I will do during summer vacation.  So, I had to install AVR Studio 4 and MPLAB tools 8.5.

Find the error on theses screen captures:

For a quick ‘cpp’ AVR-Studio start:   c++ avr tutorial by Donald Papp

For a quick ‘cpp’ MPLAB C18 C compiler start:  MPLAB C18 Getting Started