嵌入式LCD12232点阵研究

简述:

这两天在学嵌入式的开发与设计,一切从新开始,从头开始。今天在我的那块实验板上,搞了那个LCD12232点阵的显示

可是在网上一搜,却没有相关的软件进行简易的计算。每次为了显示一个字,各种算,各种纠结。随想到了自己开发一款小软件

 

实验平台:

 1.UP-Magic2410

 2.模块:LCD12232

 

LCD12232点阵字库计算器

1.使用说明:

只需要在软件上画出欲显示的图形,下面就将计算出相应的十六进制。挂载进开发板,便可以显示。

2.代码(C#):
using System;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 点阵生成12232
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            initFrame();
        }

        int pX = 0; //控件的XY坐标
        int pY = 0;
        Control pOld = null;    //记录控件的老状态
        GroupBox groupBoxControl = new GroupBox();
        int[,] allData = new int[16,16];

        /// <summary>
        /// 初始化
        /// </summary>
        private void initFrame()
        {
            pX = 15;
            pY = 18;
            pOld = null;
            //this.Size = new System.Drawing.Size(350,500);
            createButton();
        }

        /// <summary>
        /// 创建16*16按钮
        /// </summary>
        private void createButton()
        {
            groupBoxControl.AutoSize = true;
            groupBoxControl.Text = "操作框";
            groupBoxControl.Location = new Point(12, 10);
            for (int i = 0; i < 16; i++)
            {
                for (int j = 0; j < 16; j++)
                {
                    allData[i, j] = 0;
                    Button btnCreate = new Button();
                    btnCreate.FlatStyle = FlatStyle.Flat;
                    btnCreate.Text = "0";
                    btnCreate.Name = i.ToString() + j.ToString(); ;
                    btnCreate.BackColor = Color.White;
                    btnCreate.Width = 20;
                    btnCreate.Height = 20;
                    btnCreate.Location = new Point(pX, pY);
                    btnCreate.MouseMove 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值