The original blog is in Turkish and in www.dincay.blogspot.com. This is the English translation of it.
Altera etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Altera etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

24 Ekim 2010 Pazar

Altera DE0 – Programming the Serial Configuration Chip (EPCS)


DE0 has a special 4 kb serial EEPROM. It's name is epsc4 in Altera's documents. When the board is powered, if the programming switch is in Run position, fpga loads the configuration data stored in epcs. I don't want to see the test program every time I powered the board, so I decided to re-program epcs according to my needs.

There is a section in DE0 user manual about programming the epcs (p.20-21) but the way described is not complete. Epsc won't be programmed, if only the instructions in user manual is followed. This aim of this article is to provide a complete description about how to program the epsc on DE0.

The configuration file that is loaded to fpga has .sof extension. It is .bit in Xilinx. This .sof file is for fpga only, it needs to be changed for epsc. To do this I opened

  • File → Convert Programming Files

In opened window I changed these

  • Programming file type -> Programmer Object File (.pof)
  • Configuration Device -> ECPS4
  • Input files to convert -> Click "SOF data” -> Add File -> select .sof file to be changed

After all these steps the window will be like this
Create the file by clicking Generate.


Second step is load this newly created .pof file to epcs. In order to do this I opened the Programmer in Quartus. I performed these steps in Programmer window.
  • Hardware Setup -> USB Blaster
  • Mode -> Active Serial Programming -> 'Yes'
  • Choose “Enable real-time ISP to allow background programming (for Max2 devices)”
  • Add Device -> EPCS4 -> OK
  • Click the new symbol -> Change file -> Choose .pof file
  • Put a tick in Program/Configure option
  • Start
My window looks like this just before I clicked start.

After following all these steps, I could program epcs. Every time the board is powered, the clock application is displayed.

27 Eylül 2010 Pazartesi

Clock


I made a simple clock application in DE0. It shows hours, minutes and seconds. I use counters for each. They are operating with 50MHz clock. I use a 1 Hz pulse generator. It creates a single pulse every 1 second. Binary counter output is converted to BCD by sing add-to-6 method. I used a readily available code from internet. Displaying BCD data in 7 segment displays is a simple work. In DE0, all of the pins of 4 digit 7 segment leds are connected to the separate pins of the fpga i.e 4x7=28 pins are used for 7 segment leds, so there is no need to do time multiplexing.
Some pictures:

This video shows the operation of the clock. It also serves as a user-guide.

Program codes can be downloaded from here.