Paypal in Lithuania

October 25th, 2007

Original post dated September 28th, 2007.

After about ten years of waiting, most popular online payment system is working in Lithuania. Few years ago we used Western Union online payment system, but it was closed. Meanwhile Paypal was afraid of Lithuanian hackers or our bank system. Now, from 28th of September, the system is working. You may donate any sum to support this web log using this image link:

Thank you for your support!

Cleaning tap filter

October 21st, 2007

A bit offtopic, not very electronic post. Our tap water is full of lime (calcium). And this lime tens to grow on small tap filters, aerators. After some time I noticed, that the water stream is not very even, the bubbles are not so dense and small. After some more time the stream is skewed. The problem is very simple- lime on the filters. It is possible to find and buy new filters (aerators) in Aikada store (I often visit this company as I am responsible for IT in this company)… But coffee is better in Vitra company. :) So, I visited shop and noticed, that some aerators are missing in display. After some interrogation they confessed, that some visitor steal those small devices. So, I decided to describe how to clean all lime using environment friendly way.

lime on aerators

This recipe is usable even with such large device as cloth washing machine.
Collect all aerators (filters), other small parts covered with lime. These parts must be thermal resistant. Put all parts to electric kettle, add some water and some citric acid. About two full spoons for cup of water. Switch kettle on…

cleaning lime

After few minutes the stench from kettle inform, that everything is going fine. After some time, the stench disappears, and the water will get yellow color. Now rinse the kettle.

lime gone

The same recipe for washing machine- just add about one or two kg or citric acid to it and start the “hottest" cleaning program. And no need for expensive special washing materials, no Calgon… Use your saved money for more pleasant purposes.

This article is a bit “advert" type.

ATMEGA USB 006

October 20th, 2007

It is time to use USB. After several unsuccessful experiments I found some working project in the internet. Maybe other project are working too, but only this one was usable and understandable for me. As I need not only binary compatibility, but compatibility in the source code level. I want to recompile all stuff by myself. In this project only USB Windows system drivers are downloaded from sourceforge web pages.
Why designing the PCB I looked to several other project and adapted my circuit diagram to accept several types of connections. With slight modifications, it is possible to use other firmware.

AVR USB LCD

So, the USB- Universal Serial Buss. This “universal" means that this system is multipurpose and more complicated. It is not only serial data transfer, but stack of procedures, drivers and other stuff to connect external devices to master unit using same buss. It is more complicated that old RS232 serial one and it is very hard to implement all features to simple device. Also, as this buss is “universal" globally, there are some limitations- every device must have unique identification. This identification is coordinated by some organization. This organization distributes VIN (vendor identification number) for money. We shall use free, testing numbers. All software is distributed under GPL/LGPL licenses, so fell free to use it. USB firmware is used from http://www.obdev.at/products/avrusb/index.html. VIN/PIN (also called VID/PID) is used from same source.

Also, LCD module is used to test this project.

There is small testing software for Windows to test the device. It allows to print text on the LCD and some other small command. The source code will be in the next post as I have problems with compiling it with my compiler.

20070922.zip.

ATMEGA USB 005

October 15th, 2007

There are lots of chips with serial control. Some of them use Philips I2C buss. There two data lines and two power lines to transmit all data. There DTMF encoders, switches, Dolby surround audio processors, multiplexers and many many other devices. Just open any TV set and you can find some- like TV tuner. ATMEL chip has build in serial interface, but it is called TWI. In my PCB there are two bigger SMD pads to connect I2C buss. Don't forget to solder 10K pull up resistors.

FM75

For testing TWI bus I selected I2C temperature sensor. It is LM75 or any other clone. I am using small PCB from old plasma display panel with Fairchaild FM75 chip. It is smarter and more precise clone of original LM75. FM75 is backwards compatible with LM75. It has more precision and this means more data bytes available to read. At full precision it used 12 bits for temperature. In my software I used simplified algebra to convert 1/16 fractions to metric system. For more precise calculations, read FM75 and LM75 datasheet. And maybe AD7416 datasheet too.

FM75 ATMEGA16

I am using i2c.c from internet, from USB Tenki project. This project is very interesting, pay a visit to original Tenki web page for more advanced device. lm75.c is from same source. LCD modules are same as in older my web blog posts. When you connect your LM75 chip, don't forget to check the device address- base address is the same, but user selected pins maybe connected in other way.

Programa: 20070919.zip.

With these chips and software example it is possible to build some thermostat project. But don't write all controll stuff for ATMEL chip. Read the datasheet again and use LM75 thermostat option. Use ATMEGA only for control, display and setup.

ATMEGA USB 004

October 14th, 2007

There is ADC in ATMEGA16 with 8 multiplexed inputs. This analog to digital converter have several interesting options. Here is abstract from datasheet:

• 10-bit Resolution
• 0.5 LSB Integral Non-linearity
• ±2 LSB Absolute Accuracy
• 13 - 260 μs Conversion Time
• Up to 15 kSPS at Maximum Resolution
• 8 Multiplexed Single Ended Input Channels
• 7 Differential Input Channels
• 2 Differential Input Channels with Optional Gain of 10x and 200x(1)
• Optional Left adjustment for ADC Result Readout
• 0 - VCC ADC Input Voltage Range
• Selectable 2.56V ADC Reference Voltage
• Free Running or Single Conversion Mode
• ADC Start Conversion by Auto Triggering on Interrupt Sources
• Interrupt on ADC Conversion Complete
• Sleep Mode Noise Canceler

The ATmega16 features a 10-bit successive approximation ADC. The ADC is connected to an 8-channel Analog Multiplexer which allows 8 single-ended voltage inputs constructed from the pins of Port A. The single-ended voltage inputs refer to 0V (GND). The device also supports 16 differential voltage input combinations. Two of the differential inputs (ADC1, ADC0 and ADC3, ADC2) are equipped with a programmable gain stage, providing amplification steps of 0 dB (1x), 20 dB (10x), or 46 dB (200x) on the differential input voltage before the A/D conversion. Seven differential analog input channels share a common negative terminal (ADC1), while any other ADC input can be selected as the positive input terminal. If 1x or 10x gain is used, 8-bit resolution can be expected. If 200x gain is used, 7-bit resolution can be expected.
The ADC contains a Sample and Hold circuit which ensures that the input voltage to the ADC is held at a constant level during conversion. The ADC has a separate analog supply voltage pin, AVCC. AVCC must not differ more than ±0.3 V from VCC. Internal reference voltages of nominally 2.56V or AVCC are provided On-chip. The voltage reference may be externally decoupled at the AREF pin by a capacitor for better noise performance.

Software is very simple. It just read data from ADC and prints the results to LCD module. With small change in the source (just uncomment fre lines) and it is possible to read data from all channels.

ATMEGA ADC

Changing value near text “Stepas" just indicate the cycle number (in default program version) or ADC channel number. And if this number is changing, we can determine, that software is still working :)

Sorftware, source code: 20070918.zip.

ATMEGA USB 003

October 4th, 2007

Blinking LED is not very cool. And not very informative. But we can use LCD module. It is very cheap and available device. There are many types of LCD modules in the world. I am using most popular- HD44780 controller based alphanumerical module. It is 2 lines, 16 symbols. There are 14 or 16 pins on this module. Two extra pins are used for backlight. All other pins are used in 8 bit mode. As MCU pins can be used for more usefull purposes, we use 4 bit mode- every byte is transfered in two cycles. As MCU is very fast, we can not notice any lag here.
LCd module has selftest mode. When we connect power supply we must see upper line in black. If, not black square are here, try to adjust contrast using the only available trimmer on the PCB.

LCD AVR

LCD control software is from internet. After several experiment I selected Peter Fleury program. Other versions I tested had some hardware limitations. LCD connection is described in lcd.h file. No need to change lcd.cfile. But you can peek to it to find what procedures are in here.

Testing program is in test_lcd.c file. There is some push button routines here too. I am using jumper named “firmware" as button.

LCD AVR

If you power this device from computer’s USB slot, don't pay attention to windows messages about unknown device connected to USB buss. We solve this problem later.

Software source and hex file for testing is here: 20070917.zip.

ATMEGA USB 002

October 3rd, 2007

Now we need to test PCB and MCU. To test this hardware we need to run some program. And to build program we need tools. I downloaded and used free software from internet. WinAVR package: http://winavr.sourceforge.net/. Also, I am using programmers notepad2. It is useful tool for MCU programmer.

First program is simple LED flasher. We will test if MCU is working and if all LED diodes are working and all pins of MCU is properly soldered. The only LED will be on all the time is power LED. As the photo is made with long exposure, it seams, that all LEDs are on. In real, they are flashing in binary way.

ATMEGA 16 LED flasher
(My printer is dead, so the PCB is ver ugly)

Software source and hex file: 20070916.zip

Software is very simple- we just set some pin to output and start counting cycle. Counting results are set to output pins. It is bad programming practice to put whole byte to several pins. In real world we need to alter only these bits we need to change- never put data to unused pins or input pins. But this program is for testing only.

Few comments. As I mentioned, mine LPT port is damaged, so I am using add on card. So, edit “makefile" for your programmer. You must check the “program"section. In my version there is few words to describe port address of my add on card:

program: $(PRG).hex
avreal32 -pBC00 -ab -e +$(AVREALMCU)
avreal32 -pBC00 +$(AVREALMCU) -ab -w -c $(PRG).hex -v

Just change -pBC00 to you port. Use “avreal32 -h" for more information. Or, if you use other programmer, replace these line according your programmer manual. Or, don't use “make program" menu item in editor’s toolbar.

Also, some words for absolute beginners. Typically you can find information about simple things- everybody know how to do and they even don't think, that somebody will not know how to do simple compile things. So, to compile software use “make all" menu item from programmers notepad or from CMD prompt. The computer will print lots of stuff on screen, but the main message is at the end:Process Exit Code: 0 and if you don't see any ERROR.
Command “make clean" or Tools->[WinAVR] Make Clean, cleans all compiled files. So if you change something in the source, use make clean to be sure.

And the last menu item, make program or Tools->[WinAVR] Program we program firmware to MCU.

Few words about security bits. Carefully read original Atmel documentation. Sometimes these bits are mixed in various documents. Some tell that “set" means write 1, others- vice versa. It is possible to set MCU to “closed" mode and it will not be visible by programmer. As I am using “second hand" MCU I don't need to change fuse bits. Mine bit looks like this:

Fuses
OSCCAL = AD, AB, A7, A8
BODLEVEL = 0
BODEN = 1
SUT = 2
CKSEL = F
BLB1 = 3
BLB0 = 3
OCDEN = 1
JTAGEN = 1
CKOPT = 1
EESAVE = 0
BOOTSZ = 3
BOOTRST = 1

As it is still working I am not changing any bit. Use this online tool http://palmavr.sourceforge.net/cgi-bin/fc.cgi

You can find HEX file in archive, so you can test hardware without any compilation.

ATMEGA USB 001

October 2nd, 2007

In older posts I mentioned, that I resoldered several ATMEL ATMEGA16 processors. So, I decided to build something usefull using this MCU. As this controller has more ROM and RAM, I decided to use only high level programming language- C. All software in these web pages are compiled and tested on my hardware. So, if you download something here and it is not working, first of all check your hardware and software. Then you may as some questions. Also, I will try to fix possible errors in software loaded from the internet. For example, simple error in LSB ans MSB handling caused one big program to be useless. This error stopped me for two days- it is very hard to find error in alien source code.

AVR USB

As I selected several independant projects in the internet I constructed universal circuit diagram and PCB. So almoust all software is working without modifications or just small modifications on PCB.
To build this project, you need: ATMEGA16 (maybe other mega will work too, but with change in software and harware), LCD module, few LEDs, some resitors, capacitors and 12MHz quartz. One trimmer is usefull too. Also some connectors for programming and USB.

This project will deal with various ideas. From simple LED flasher to complicated USB driven devices. It will be simple ADC, IR (infra red) receivers, I2C bus, LCD manipulating and etc.

After the software and hardware is tuned, user can build small PCB with everything designed for end product.

Circuit diagram (schematics) of the device:

AVR USB
(press on image for larger view)

Image of the PCB:
AVR USB

Circuit diagram and PCB layout for Eagle software .

MCU is programmed using Altera ByteBlaster MV
and AVREAL software. Also, I want to tell, that I damaged my default printer port in my experiments. So I am now using add-on card. This is important when using my software- the programming section of make file must be edited to your needs.

avreal/WIN32 - AVR controllers LPT programmer by Redchuk Alexandr
v1.25rev5 (Jan 15 2007 20:02:38) http://www.ln.com.ua/~real/avreal
bug-reports, suggestions and so on mail to avreal@real.kiev.ua

DVB-T

October 2nd, 2007

Step by step, digital television is conquering our country. From this spring, DVB-T (digital video broadcasting, terrestrial) is broad-casted in my home city. In our country someone decided to use MPEG4, h.264 video compression. All cheap available DVB-T receivers didn't understand this compression method, so he have some problems here. In other internet pages I discovered some solutions to these problems. So I bought simple DVB-T add-on card for my computer. It is Leadtek WinFast DTV1000T. Original software from this card is not usable- it supports only mpeg2. So, I downloaded AltDVB software from internet. Next problem is h264 decoder. Freeware one from ffdshow package is not very good. I think it is intended to use with pure h.264 video stream. But, as I tested my card with small antenna, there is lots of stream errors in DVB broadcasting. And these errors cause ffdshow to freeze video or even crash operating system. I also tested some commercial h.264 decoders. First one is from Nero suite, second one is downloaded from sat users internet forum: CoreAVC Professional. Also there is usable codec in PowerDVD package. But only in some release version. Current PowerDVD player is not letting to use codec in other software.

Here is program interface:
DVB-T
(press on image for larger view).

I can see 10 “free" channels, 3 of them are just test table. And 10 coded, pay-TV channels.
The quality of the image is good compared to distorted analog TV image. But it is not perfect. If the signal strength is low there is lots of decoding artifacts.

Here is error free image:
DVB-T

And what you get is some crow is sitting on your antenna.

DVB-T

It is possible to record transport stream to hard disk. I was using free VLC player to play these images. Here is 1:1 snapshot of the frames.

DVB-TDVB-T
(Press on image for real size).

Casino in the Web

September 22nd, 2007
The internet is enormous size network connecting various people all around the globe. From some cold Russian Siberia to hot and shiny Palm Beach in USA. And the people have big chances to spend good time in internet. From simple and ancient chat to complex, hi tech, 3D worlds for playing games or building your house. But all this games are in virtual world without any material revenue. But in recent few year, the technology, laws and banking system made possible to send and receive money in the internet without any problem. This system is now working and there is big money in the internet.

Stock image: money

One possible place to spend time in the internet is online casino. New technologies make possible us to see almost real 3D images of poker, online blackjack cards, jumping dice or rotating roulette disk. All other online gambling versions are available too- from horse race to some exotic way to lay a wager about flying sourcer landing near white house. Some sound FX and you can feel the real casino.
In recent years, due to new international laws, many online casino were opened in internet. There are good ones with good reputation and old history and there maybe some one-day projects just to collect personal information and steal money.
Here comes the intern casino review system. It is almost impossible to test every casino online by yourself. The staff of Online Casino Blue Book made good try to collect all information about possible ways of online gambling and collected good information about possible bonuses- like free tokens, free play minutes or just simple free entry bonuses.
Also, they made ranking system for online casino. Now you can select best place for online gambling. Here is just quote from the pages to illustrate one casino:

Payout for all games: 97.50%
-24-hour support
-Progressive Jackpot games
-Let it ride Poker
-Blackjack
-Roulette

Methods of making deposits: Visa, Master Card, Check, Fire Pay, Neteller, 900pay ECP, Telebuy, Citadel and Bank Wire Transfer.

* Licensed
* Safe and secure deposit transactions
* Pay out percentages are reviewed monthly by Price Waterhouse Coopers


Hey.lt - Interneto reitingai, lankomumo statistika, lankytojų skaitliukai

Place for rent.