Monday, January 11, 2010


I finally got to turn leds ON and OFF. In fact, I have made them light on based on a pattern :

PORTD = 1;
Delay( );
/*etc ...*/

I actually used the code that is recommended by AVR gurus that is using C operators, however for this simple purpose, I just ommit them here.

My delay routine was simple:

void Delay( void )
      int cnt = 5555; /*Should be unsigned long cnt = 5555 */
      while( cnt-- );

Dumb me. The compiler will ignore my int cnt ! I just need a unsigned long int  and it will work. Well, it has worked ! :-)


Tuesday, January 05, 2010

Motherboards, USB ports and Windows

I have bought a USB programmer for AVR from a Brazilian electronics store. Imagine my excitement to test it after realizing that a simple parallel port programmer for AVR was not working. Then I connected the programmer to my ATMega8 and .....

USP programmer not recognized? Hell, didn't I install all those drivers? Wasn't this USB port working for my pendrive and Palm zire? I assumed I had made some mistake on the board and - fortunatelly I am using a breadboard - assembled it all again and it still did not work.

The, I recall how hard was to make a USB port to connect to Motorola phones while I worked there and switched for the other port behind the PC and....

It works.  Who is to blame ? ASUS or Windows XP? By the way, I tried to compile the simplest code possible by using WinAVR on Vista, but I ended up finding out that in certain versions of Vista, WinAVR does not work.

Man, please don't waste time with parallel port programmers if you are using AVR. Trust me.

Monday, January 04, 2010

back to home

I went back home this last new year holiday.  Sadly, the elected mayor is not doing a good job. I went to school with this guy, he's not someone to whom I would extend my vote of trust. In fact he is far, very far from that.

My hometown is very different from my teens or 20s, it is now dark, empty of light and full of "manos". "manos" is how we call here "young folks that are about to embrace robbery, drug dealing or simply young folks that love riots".

Despite where my parents live and where my wife's mother lives, I hardly like the place these days. It is sad to see that the city has grown and lost part of its natural beauty. Maybe, it is just my self getting old enough. But the city is not what it used to be. Everybody there seems strange to me, maybe because everyone I knew got old enough. Some places still hold the old spirit.

I like the cd store there. I recall when I bought cds there and the place was in a very tiny corner. Now it is placed in a huge room. The owner is smart. He realized that if he sold metal cds, he would make money. And now he even gives recommendations. He also sells regular music, things most people want to hear. He is smart.

My hometown has a very decent fried pizza restaurant called "Semiao", named after the name of the founder. Crispy fried pizza with lots of different flavors.

But what scared me the most was the fact that the sugar cane agriculture is reaching the city limits. When all that is done, the city will die, at least for me. As it is placed above a mild mountain formation, most of its beauty is due to this mix of high place weather and mountain look like place.

Perhaps this is the price you pay for getting old.