FireBeetle OSD字符叠加模块

简介

OSD是On-screen Display的简称,即屏幕菜单式调节方式。这是一种在屏幕上附加各类菜单式字符的技术。DFRobot新推出的OSD视频字符叠加模块,采用AT7456E高性能视频字符叠加芯片,该芯片集成了512Byte的EEPROM用户自定义存储空间,是一款单通道、单色随屏显示发生器,具备视频驱动、同步分离器、视频分离开关等功能。在接入视频源后(AV信号),可在视频上覆盖一层540x192像素点,可显示16x30个字符。用户可调取字库来显示相应文字或图案。 Firebeetle OSD字符叠加模块,兼容FireBeetle萤火虫接口,可以直接插接在FireBeetle萤火虫系列主板上。

技术规格

功能示意图

PinOut

注:NC不连接,VCC为电源电压输出(5V-USB供电时, 3.7V-锂电池供电时)

使用教程

准备

硬件

软件

接线图

操作步骤

注:cs变量为片选引脚,必须和拨码开关相对应。例如:拨码开关D3,对应的FireBeetle-ESP32引脚为IO26。本示例片选为D3。

EEPROM字库

1 第一个字符地址 0x01 2 第一个字符地址 0x101

字模软件的使用

1.点击设置按钮

2.选择下图中的选项:Padding Removal,Line wrap,Byte

3.在左侧编辑框输入内容,点击Generate生成字模

示例


 /*!
  * file DFRobot_OSD.ino
  * character superimposition.
  * @n This example Set characters on the screen.
  *
  * Copyright   [DFRobot](http://www.dfrobot.com), 2016
  * Copyright   GNU Lesser General Public License
  *
  * version  V1.0
  * date  2017-10-9
  */

#include <DFRobot_OSD.h>

/*select CS pin*/
#ifdef __AVR__
int cs = 3;
#elif defined ESP_PLATFORM
int cs = D3;
#elif defined __ets__
int cs = D3;
#else
  #error unknow board
#endif

DFRobot_OSD osd(cs);

/*Define Chinese characters*/
int buf0[36] = {0x02,0x80,0x02,0x40,0x7F,0xE0,0x42,0x00,0x42,0x00,0x7A,0x40,0x4A,0x40,0x4A,0x80,0x49,0x20,0x5A,0xA0,0x44,0x60,0x88,0x20};
int buf1[36] = {0x20,0x00,0x25,0xE0,0x75,0x20,0x29,0x20,0xFD,0x40,0x21,0x40,0x7D,0x20,0xC5,0x20,0x7D,0x20,0x45,0xC0,0x7D,0x00,0x45,0x00};
int buf2[36] = {0x20,0x00,0x2F,0xC0,0x24,0x40,0xF4,0x40,0x24,0x80,0x64,0xE0,0x74,0x20,0xA6,0x20,0x25,0x40,0x28,0x80,0x29,0x40,0x32,0x20};
int buf3[36] = {0x3F,0x00,0x2A,0xE0,0xFA,0x20,0x2E,0xA0,0x2A,0xA0,0xFE,0xA0,0x2A,0x40,0xAB,0x40,0xBE,0xA0,0xA3,0x20,0xE2,0x00,0xBF,0xE0};

void setup(){
  osd.init();
  osd.clear();
  /* Write the custom character to the OSD, replacing the original character*/
  /* Expand 0xe0 to 0x0e0, the high 8 bits indicate page number and the low 8 bits indicate the inpage address.*/
  osd.storeChar(0xe0,buf0);
  osd.storeChar(0xe1,buf1);
  osd.storeChar(0xe2,buf2);
  osd.storeChar(0xe3,buf3);
  /*Displays custom characters*/
  osd.displayChar(2,2,0xe0);
  osd.displayChar(2,3,0xe1);
  osd.displayChar(2,4,0xe2);
  osd.displayChar(2,5,0xe3);
  /*display character*/
  osd.displayChar(9,9,0x11d);
  osd.displayChar(9,10,0x11e);
  osd.displayChar(8,11,0x10f);
  /*display String*/
  const char* str1 = "DFRobot";
  String str2 = "2017.9.12";
  String str3(3.14);

  osd.displayString(14,21,str1);
  osd.displayString(2,19,str2);
  osd.displayString(4,19,str3);
  osd.displayString(4,2,"hello world!");
}

void loop(){

 }

结果

Arduino库函数功能列表

DFRobot_OSD(int CS);

void init();

void clear(void);

void displayChar(unsigned char row, unsigned char col, unsigned short addr);

void displayString(unsigned char row, unsigned char col, unsigned char *s);

void displayString(unsigned char row, unsigned char col, String s);

void storeChar(unsigned short addr,int dt[]);

兼容性测试

MCU 测试通过 测试失败 未测试 特别标注
FireBeetle-Board328P
FireBeetle-ESP32
FireBeetle-ESP8266
Leonardo 使用杜邦线连接测试

尺寸图

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!

更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖。

更多

DFshopping_car1.png DFRobot商城购买链接