Lesson 32--Microduino 16*16 Lattice Character Transverse Move Display

来自Microduino Wikipedia
Jasonsheng讨论 | 贡献2014年3月27日 (四) 12:01的版本 (Created page with "{{Language|第三十二课--Microduino 16*16点阵汉字右移}} {| style="width: 800px;" |- | ==Objective== This tutorial will teach how to move an image to the right dynami...")
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
Language English

Objective

This tutorial will teach how to move an image to the right dynamicly on 16*16 lattice. Take an Chinese characters for example.

Equipment

Document

LM-2256 Series 16 *16 matrix displays:文件:.led 16 16.zip

Feature

  • Smale, the size is 40.46*40.46*5mm;
  • Using 2mm round LED;
  • LED lattice screen on a black background, very beautiful;

Principle

  • Every 8 columns as a moving unit, moving 16 steps.
  • In 0 ~ 8 moving step, the right part move to right, at the same time still need to put on the left side's data.
  • In 8 ~ 16 moving step, put the left graphics code to the right directly and then move to right.

Debug

  • Prepared Work
  • Step 1:Downlaod the test program, uncompress and open it;
  • Step 2:Compile it and selte the board type to download;
  • Step 3:Change the Chinese character or image
    • Change 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: modulus method changed to: determinant, Yang code, reverse.

    • Change dinamic display timer

In loop() function, the second for() loop uses to control display timer for every image, large number with large timer.

Grammar

  • "<<": left shift operator, From low to high

For example: a=0x03;// binary:00000011 b=a<<3// binary:00011000 then b=0x18;

  • "<<=": lefe shift operator, and assign the shift value to yourself.

For example: a<<=0x03; then a==0x18;

  • ">>": right shift operator, from high to low.

For example: a=0x30;// binary:00110000 b=a>>3// binary:00000110 then b=0x06;

  • "|": Bitwise or operator, as long as there is a data 1, then the result is 1, otherwise the result is 0.
0 0 1 1 operand 1    
0 1 0 1 operand 2  
--------------
0 1 1 1 result
  • ”&”: Bitwise and operator, two data both are 1, then the result is 1, otherwise the result is 0.
0 0 1 1 operand 1    
0 1 0 1 operand 2  
--------------
0 0 0 1 result

Result

Through testing, the move speed of Chinese character is about half a second. Players can modify the display images and time according to his own interest.

Pay attention issue

  • The difference between left shift and right shift;
  • When change the font, need set the modulus format correctly.

Video