Archive for June, 2007

Easy USB with ATMEGA

Wednesday, June 20th, 2007

My computer’s printer port is only one and occupied by printer and JTAG hardware. And I needed more parallel port for my experiments. Something safe for motherboard and something wide. As I mentioned in previous post, one electronics company supplied me with some useless hardware. Each PCB board was with Atmel ATMEGA16 CPU (ATMEGA16 16AI). Also, in the internet I found some hardware and software projects by Igor Cesko…

First after few looks to source circuit diagram I made this experimental PCB.

USB- multi-port adapter

There are only few components- ATMEGA16, 12MHz quartz, few resistors and USB connector. I changed a bit original software and adapter it to MEGA16 hardware.

Also I changed a bit software and firmware for more options and to access to all ATMEGA16 pins. Original software/firmware was for ATMEGA8 or AT90S2313. I was lucky and now I have new device in my windows hardware manager- AVR309: USB to UART protocol converter.

I downloaded Delfi7 to change dll and have big ideas to build new universal tool for my computer. Something with USB to I2C/parallel/serial and “I don’t know what” adapter. The only problem is, that I am new to Delphi and Atmel assembler.

device manager

(more…)

LCD + FPGA

Tuesday, June 19th, 2007

After few weeks of experiments and one dead FPGA chip I finished about 1/5 of my LCD project. At last I tuned all LCD timings and LCD screen can display image from “video RAM”. For this moment “video RAM” is represented by flash ROM chip. At first I had lots of bugs (I’ve lost one byte of information, three lines were missing, the line in the middle of the screen, all screen moved one line down). One line down is not a but, but the feature of the LCD screen. It begins scan from the second line after HS.

Here is the image of my workplace (the LCD is with all the bugs): power supply (+5V and ~-15V), 20.48MHz master clock oscillator (the exact frequency is not essential- the clock is divided by FPGA), ATMEL 29C010A (as video RAM) and Altera FLEX EPF10K10TC144-3 FPGA. Red line on the breadboard is 47K pull-up resistors for data lines.

LCD+FPGA

Here is bigger image of the LCD screen. As you can see the bugs are visible. One bug is from MS Visual Basic program- I’ve made mistake in image processing- lost one screen line generating video bitmap. In new version of software I fixed this bug.

LCD+FPGA

Now I fixed the bugs (english blog is not realtime) and here is fixed image:

fixed image of controller less LCD. FPGA+ROM

Now I need to change ROM to RAM and create some USB interface for my experiments. I do not want to use LPT port anymore.

P.S. That “angry horse” is from Japan animation “Words Worth”. And he is most famous in an Internet fad for the quote, “Your resistance only makes my penis harder!”. “Fad” is an Internet phenomenon occuring when something becomes extremely popular, often quite suddenly, through the word-of-mouth and self-publishing made feasible by the Internet.

Fake Sony USB flash disk

Sunday, June 17th, 2007

One man brought small souvenir from China. It is cool 32Gb Sony flash disk. The only problem is that it is fake, and not such size. The device is made quite well. Solid box with all needed information. The device is looking solid too. The size is very big and the price was too small even for bulk nand devices of such size…

32G Sony fake flash

Before buying such device they even tested it. Windows disk properties reported big size. But buyer didn’t think about copying big file to it.

32G sony flash

Disk manager reported “proper” size too.

32G fake usb flash

You can even copy big files to this flash disk. But you can’t read. While reading, you receive read error. So this device is WOM DISK (Write Only Memory Disk) :)

32G fake sony

Also you can’t format the disk…

32G sony usb

After some experiments I determined that this model was made with special firmware, and nand flash was very small and maybe damaged. I tested disk using block (sector) write and read and found only 0.5Mb of usable disk space. All other disk space is virtual and you can read &HFF from any location of the disk.

There are lots of warning pages in the internet about fake devices. Also, the eBay is full of such devices. So don’t be greedy- you can not buy good thing for very low price.

Out tourists payed for this fake device about 40LTL (15USD).

Cyclone II

Thursday, June 14th, 2007

As I mentioned in previous posts, one company supplied me by few Altera Cyclone II (EP2C5T144C6N) FPGAs. All these chips were soldered to some rejected circuit boards. Board were damaged by improper soldering, mainly by overheating and PCB track unstuck from the base. I selected one board with minimal visual defects. There is place for JTAG connector, so I soldered it, used 3.3V power mentioned in previous post and chip replied on the JTAG chain.

cyclone II

After few experiments and three kynar wires, I manged to set chip in JTAG programming mode and programmed small testing code to it. It is working and I hope that other chips are good too. In Lithuanian version of weblog I described how to set this PCB to jtag mode, but this entry is just for myself. If I’ll need to use other boards, I’ll have detailed instructions. English language reader will not find such PCBs in their local stores.

Thanks to local company for nice set of Cyclones and also, for about twenty Atmel ATMEGA16 chips!

What is Cyclone?

The Cyclone II architecture consists of more than 68K vertically arranged LEs, embedded memory blocks, embedded multipliers, and phase-locked loops (PLLs) that are surrounded by I/o elements (IOEs). A highly efficient interconnect and low-skew clock network provides connectivity between each of these structures for clock and data signals.
Area-efficient IOEs are grouped into I/O banks around the device, offering significant capabilities while consuming minimal die area. Cyclone II devices support a wide range of single-ended and differential I/O standards, such as the LVDS I/O standard at up to 805 Mbps (receive) and 622 Mbps (transmit). Each IOE contains three registers for implementing DDR applications and associated circuitry for other I/O features such as programmable drive strength, bus hold, and programmable slew rate.
Several I/O banks are equipped with dedicated external memory interface circuitry. This circuitry simplifies data transfer with external memory devices, including DDR2 and QDRII SDRAM devices. Maximum data transfer rates reach speeds of up to 333 Mbps (167-MHz clock).
Cyclone II devices implement the same embedded memory blocks available in the original Cyclone family. The Cyclone II family includes up to 250 embedded memory blocks, which are ideal for use as program storage memory for embedded processors or header or cell storage.
Cyclone II devices are PCI revision 2.1 and PCI-X revision 1.0b (Rev 2.0 mode 1) compliant. Each IOE provides multiple paths from the pin to the core, allowing the device to meet associated set-up and hold times.
Cyclone II devices range in density from 4,608 LEs and 119,808 bits of RAM to 68,416 LEs and 1,152,000 bits of RAM. From 13 to 150 18 x 18 embedded multipliers are available within Cyclone II devices.

Advert:

850B SMT SMD HOT AIR REWORK STATION SOLDER STATION, NEW

3.3V regulator

Friday, June 8th, 2007

As the flex was killed, I needed to test the Cyclone chip. But I need good 3.3V power supply for it. The core and PLL voltages are lower, but linear regulators were already placed on the PCB. The only good 3.3 source was computer power supply (ATX model), but it is too big, too noisy to be placed on my desktop. I was lucky and in trash pile with cyclones I found other PCBs- some with switched 3.3 (and other voltages) regulators and quite many Atmel ATMEGA16 MCUs. (Thanks for support!) More than dozen free ATMEGA will force me to use them :) .

So, I have quite big stock of LM2676S-3.3 chips. It is:

The LM2676 series of regulators are monolithic integrated circuits which provide all of the active functions for a step-down (buck) switching regulator capable of driving up to 3A loads with excellent line and load regulation characteristics. High efficiency (>90%) is obtained through the use of a low ON-resistance DMOS power switch. The series consists of fixed output voltages of 3.3V, 5V and 12V and an adjustable output version.
The SIMPLE SWITCHER concept provides for a complete design using a minimum number of external components. A high fixed frequency oscillator (260KHz) allows the use of physically smaller sized components. A family of standard inductors for use with the LM2676 are available from several manufacturers to greatly simplify the design process.
The LM2676 series also has built in thermal shutdown, current limiting and an ON/OFF control input that can power down the regulator to a low 50µA quiescent current standby condition. The output voltage is guaranteed to a ±2% tolerance. The clock frequency is controlled to within a ±11% tolerance.

BTW, using external voltage divider can help us to change output voltage.

3.3V PSU

D2 – just powerful diode protecting device from reverse polarity. Sometimes I connect untested wall adapters and some of them are AC/AC type… Typically from old external modems. I have already damaged one ethernet switch with such adapter.

C1 and C2 are line voltage filters and energy storage devices. The capacitance is not very important thing, place as much as you think. But try to use low ESR capacitors. C3 and C5 is energy storage devices. Low ESR is mandatory here. Capacity- 1000µF or more. C4- boost capacitor, read data-sheet for more details, 0.01µF at 50V. D1 is fast, schottky diode. Voltage dropout less than 1V. The coil is selected from table in datasheet. Don’t worry about exact value. This only lowers the efficiency of the regulator a bit. I used 27µH coil. R2 and LED2 is just to show that something is working. The chip pin 7 is left floating. It can be used to switch off the regulator.

Everything is placed on small PCB with pins for connection to breadboard. Do not build switched power regulators using “wire” connections or breadboard. High frequency and current with long wires will cause strange effects.

Electromagnetic radiation

Sunday, June 3rd, 2007

I was visiting Italy and entered one of the smallest countries- San Marino. All tourist must visit castle on the top of the mountain. As such high placed is often used as radio transmission spot, one castle tower is populated with various radio antennas.

Elektromagnetinė spinduliuotė

In one small room I found quite powerful power supply and some transmitter- the cooling fans were on full speed and I even noticed some watter cooling system. Most interesting fact were discovered later, when I was watching video tape. I noticed that when camera is in the direction to antenna’s field I can hear some funny noise. But when I turn it from them or just place camera behind something solid like stone block or my head :) the noise is fading. Also I noticed that all metal parts in the castle are connected with heavy wires and connected to earth. I guessed that it was simple lightning protection, but while watching video tape I notice that transmitter noise is getting louder when camera is placed near metal connection. I think there is quite strong electromagnetic field and it introduces quite high voltage in big metal parts.

It is interesting, how much time the tourist must stay in this castle tower to melt its brains?

The only good think for castle owners is that this small country didn’t belong to European union, so the local authorities do not need to worry about this radiation.

Elektros priežiūros dokumentai

Sunday, June 3rd, 2007

There are templates for various paper documents used by electricians in Lithuania. Just entry for google.

Kadangi niekur internete neradau kai turi atrodyti kai kurie žurnalai skirti elektrikams, tai pagal pirktinius pavyzdžius padariau elektroninius šablonus. Taigi, nusikraukite ir žiūrėkite su PDF formato readerių. Kad ir iš Adobės puslapių.

Dokumentai yra platinami pagal FreeWare licenzija. Prašome laisvai kopijuoti ir naudoti, tik neužmirškite palikti kreditus į šiuos interneto puslapius.

Elektrosaugos priemonių registravimo žurnalas.

Veikiančių elektros įrengimų rejestras.

Elektros įrankių, jų pagalbinių įrenginių apskaitos, bandymo, tikrinimo ir apžiūrų žurnalas.

Manau tai bus naudingi failai broliams elektrikams.