搜索
bottom↓
回复: 3

请问马老师

[复制链接]

出0入0汤圆

发表于 2011-6-21 00:00:40 | 显示全部楼层 |阅读模式
请问马老师 我用proteus仿真1602的时候用您书上写的那个去仿真,电路图是用4路数据的也就是DB4到DB7为什么仿真不出来内容呢  程序就是用您给的那个  郁闷啊  会是什么原因呢

阿莫论坛20周年了!感谢大家的支持与爱护!!

月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!

出0入0汤圆

发表于 2011-6-21 01:17:22 | 显示全部楼层
if you post the schematic + source code, we may be able to help you.

in general, the issues with lcds are related to initialization.

出0入0汤圆

 楼主| 发表于 2011-6-21 08:44:29 | 显示全部楼层

(原文件名:T)~1XD3V)$MV(TXO@72O3UP.jpg)
this is the schematic
and  this is the source code

/*********************************************
File name           : Demo_6_9.c
Chip type           : ATmega16
Program type        : Application
Clock frequency     : 4.000000 MHz
Memory model        : Small
External SRAM size  : 0
Data Stack size     : 256
*********************************************/
#include <mega16.h>
// Alphanumeric LCD Module functions
#asm
   .equ __lcd_port=0x15
#endasm
#include <lcd.h>

typedef unsigned char byte;

/* table for the user defined character */
flash byte char0[8]={                // 天的字型
0b0011111,
0b0000100,
0b0000100,
0b0011111,
0b0000100,
0b0000100,
0b0001010,
0b0010001};
flash byte char1[8]={                // 向的字型
0b0000100,
0b0001000,
0b0011111,
0b0010001,
0b0011111,
0b0011011,
0b0011111,
0b0010001};
flash byte char2[8]={                // 上的字型
0b0000100,
0b0000100,
0b0000111,
0b0000100,
0b0000100,
0b0000100,
0b0000100,
0b0011111};

/* function used to define user characters */
void define_char(byte flash *pc,byte char_code)
{
        byte i,a;
        a=(char_code<<3) | 0x40;
        for (i=0; i<8; i++) lcd_write_byte(a++,*pc++);
}

void main(void)
{
        lcd_init(16);                        // initialize the LCD for 2 lines & 16 columns

        define_char(char0,0);  // define user character 0
        define_char(char1,1);  // define user character 1
        define_char(char2,2);  // define user character 2
        lcd_clear();
        lcd_putsf("Demo_6_9.c");        // 第一行显示内容
        lcd_gotoxy(0,1);
        lcd_putsf("User define:");        // 第二行显示内容
        lcd_putchar(0);                            // 接在后面显示"天天向上"
        lcd_putchar(0);
        lcd_putchar(1);
        lcd_putchar(2);
        while (1);
}
       help help!!!!

出0入0汤圆

 楼主| 发表于 2011-6-21 08:48:24 | 显示全部楼层
不好意思是个小问题 发现了
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-4-25 16:03

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表