LCD + FPGA

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.

Posted in Anything | Tagged | 2 Comments

Fake Sony USB flash disk

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).

Posted in Anything, Vandalising | 11 Comments

Cyclone II

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

Posted in Anything | Tagged | Leave a comment

3.3V regulator

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.

Posted in Anything | Leave a comment

Electromagnetic radiation

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.

Posted in Anything | 2 Comments

Elektros priežiūros dokumentai

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.

Posted in Anything | Leave a comment

Death of FPGA

I was planing big article about FPGA chips and was testing all circuits when suddenly connected on Altera Flex I/O pin to LCD bias power supply. This was the end of my Altera FLEX. Here is the picture of my workbench…:

FPGA design workbench

Here you can see breadboard with power supply, ByteblasterMV programming cable, Altera Flex testing PCB with EPF10K10TC144-4 on board, rotary encoder, possible substitute for flex- Altera Cyclone II (EP2C5T144C6N) and VGA connector to old CRT monitor.

Just before the accident this all stuff generated such image on old CRT VGA monitor:

Pong game using FPGA chip

It is not my invention, I just used source code from the internet site. Only I changed a bit of the source to adapt it to my hardware and oscillator frequency. That blob on the middle of the screen is the “ball”. It bounces from all sides of monitor and from the paddle movable by rotary encoder.

So I decided to port all this stuff from CRT VGA to controlless LCD panel. But somehow I connected encoder’s ground pin to LCD bias (-15… -20V). This was great shock for FPGA chip and whole I/O bank was dead. The chip is very hot. Most interesting, that core is still working and I can see FPGA on JTAG chain. I don’t have any diagnostics software, but chip is reporting itself as damaged.

So, I am very sad and decided to suspend this project for some time. I ordered (and received- this blog entry is translation of Lithuanian blog and it is not “up-to real time”) chips from eBay for future experiments. Cyclone is working too, but it is soldered to custom PCB and I have only few I/O pins available for use.

Posted in Anything | Tagged | Leave a comment

TOP2004 programmer review

I have Willem eprog programmer, but I was sick changing LPT cable each time I need to reprogram some chip. Also, Willem damaged two chips of one manufacturer. I don’t like that small DIP switches too. Also, Willem can’t program GAL chips.

So I searched the internet and eBay for some recent programmer. My wish list is small: USB, easy to use, GAL. And I found some Chinese made TOP series programmer. They are cheap, USB and jumper-less. Can they support CPLD? I found one in eBay, won, but didn’t pay. Next day I received message from eBay, that seller is fraud and all auctions are cancelled. Also, paypal told that all money will be returned. So, I found other seller with more feedback and ordered TOP2004 programmer again for 49.99 USD. The problem is, that package sending costs from Hong Kong is very expensive- 34 USD. The only good news that American dollars are cheap these days- I love inflation rate of USD. So I payed 218LTL 00 ct. and after about 3 weeks I received programmer. As good Chinese seller wrote in the documents that it is gift and valued on 13$, I don’t pay the VAT and customs fee.

I installed software, connected USB cable and everything is working. The only bad thing is that all messages in the software are written in so called chinglish language (like mine 🙂 ). but I don’t care- my English is not pure too. But sometimes I have big smile from pop-up messages.

TOP2004 universal programmer

And now review about the programmer itself…
Continue reading

Posted in Anything | 59 Comments

Few words about CPLD

Just short story about my experiments using CPLD chip and Lattice software.

I forced myself to use and learn about programmable logic chips. As I wrote in my older post, I have very small inventory of the chips and was forced to use Lattice isp2032VE110LT144 chip. I received great help reading article from Seattle Robotics Society web page. Also, at same time I was experimenting with controller-less LCD screen module. So I joined both ideas to one project and here is the result.

CPLD + LCD

Also in this project is used my universal dual output power supply from older post.

The theory about LCD control was tested using big computer and MS Visual Basic software. CPLD programing software I downloaded from Lattice Semiconductors site. The chip was soldered to self-made testing PCB.

And now few words about programing of the CPLD devices…
Continue reading

Posted in Anything | 1 Comment

Universal power for breadboard

Very often I need regulated PSU when playing with breadboard. And I need negative power supply too. Especially when doing something with operational amplifiers or old LCD modules. Typically I use 78xx or 79xx regulators in my experiments. But last experiment was draining lots of power and 7805 was very hot. And I use wall adapters as my PSU. So if I need dual voltage, I need to use two adapters. Also, the regulators take too much place in the breadboard and are not very efficient. So I decided to build add-on for my breadboard.

Here is the result:

switching regulator: negative and positive from one source

It is not a miracle 🙂 It just old, refurbished LT1076 chips from some old video multiplexer (I found nice dual port RAM and fast ADC/DAC too…). One LT1076 is working as standard step-down regulator and other as inverting. All outputs are regulated using simple variable resistors (blue ones on PCB). The output of positive regulator is from Vin to 0V. Negative output is more wide- when I was using small 7.5V, 1A wall adapter I managed to get output from 0 to -25V (with low load).

Continue reading

Posted in Anything | Leave a comment