Lesson 25--Microduino 5*7 Lattice Static Display

来自Microduino Wikipedia
跳转至: 导航搜索
Language English

Objective

This experiment will introduce how to use the Microduino I/O port to control 5*7 lattice and without drive chip.

Equipment

Schematic

  • 5*7 lattice schematic
Led 5 7 Principle.jpg
  • Drive Mode

Common cathode:All the cathode of LED connect together, and use high level to light the LED. Common anode:All the anode of LED connect together, and use low level to light the LED.

Debug

Measure lattice pin

If you don't have hte lattice pin diagram, measure it by yourself. Detailed step, please refer to 8*8 lattice.

http://v.youku.com/v_show/id_XNjg0NTk4Nzk2.html

Set up circuit

  • Connect the column pin to D2-D6 and row pin to D7-D13;
D2 D3 D4 D5 D6
COL1 COL2 COL3 COL4 COL5
D7 D8 D9 D10 D11 D12 D13
ROW1 ROW2 ROW3 ROW4 ROW5 ROW6 ROW7
Led 5 7 line.jpg

Program

Step 1:Download test program, and open it; Step 2:Select the board type and download directly, after download a picture will be shown on lattice

  • Note:
    • duan[] array use to store column data, data[] array use to store row data;
    • If need change the picture, only need change the data in array data[], five data represent a picture;
    • leddisplay() function configures the lattice row pin. Function ledduan() uses to configure lattice column pin;
    • Use the right shift operation ">>" to move out the data and output to I/O port, then light the LED.
    • This experiment uses the common cathode lattice, if use the common anode lattice with the same pin defination, need reverse the array data. For example, change the "data[i]" to "~data[i]". If the pin defination is different, need change the pin's configuration in function leddisplay() and ledduan().

Change the font

Detailed information, please refer to:http://www.microduino.cc/wiki/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--Microduino_OLED%E4%BD%BF%E7%94%A8/zh Note:Need to replace modulus with image model, and new a 5*7 image. Draw a image, then the modulus way changed to: Yin, column type, reverse.

Change the font code in data[], download directly and then display the new image on lattice.

Result

By testing, lattice can display an image and each LED's brightness is uniform, very beautiful.

Led 5 7 static Result.jpg

Video