导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→发表看法:[guest][求助]哪位大虾用过UPD6453,请帮



No.35215
作者:guest
邮件:guest@guest.com
ID:6
登陆:16560次
文章数:7648篇
最后登陆IP:219.68.9.43
最后登陆:2005/5/20 1:37:44
注册:2003/3/10 16:21:00
财富:35062
发帖时间:2003/6/20 15:56:59
发贴者IP:211.161.62.209
标题:guest:[求助]哪位大虾用过UPD6453,请帮小弟看一下程序!
摘要:No.35215[求助]哪位大虾用过UPD6453,请帮小弟看一下程序! 哪位大虾用过UPD6453,请帮小弟看一下程序!
小弟按如下程序运行时,在UPD6453的输出端得不到任何的信号。
/*
 AddLetters.c
 Author:RanGuanghong
 Date:2003.6.2
 Vervion:1.0
 Function:
 Ocsillor:12.00Mhz.
 CPU:w78e51
 OSD device:uPD6453CY-001
 OSD ocsillor:7.2Mhz,33pf.
*/


#include   <reg51.h>  


#ifndef uchar
#define uchar unsigned char
#endif
#ifndef uint
#define uint unsigned int
#endif


#define ReloadTh1 0xf4
#define ReloadTl1 0xf4


/*
 I/O port.
*/
sbit Load=P1^0;
sbit Sclk=P1^1;
sbit BackGround=P1^2;

sbit Busy=P1^3;
sbit Clk=P1^4;
sbit Cs=P1^5;
sbit DataLine=P1^6;

sbit Led=P1^7;


/*
 Parramenters.
*/
uchar bdata Flags=0;
sbit AddLetterFlag=Flags^0;


uchar data ReloadTh0=0xff;
uchar data ReloadTl0=0xbf;
uchar data ColumCounter=0;
uint data LedDelayTimer=65000;
uchar data ByteCounter=0;


uchar data DisplayControl=0;
uchar data BackgroundControl=0;
uchar data ProgressiveScanControl=0;
uint data DisplayPositionControl=0;
uint data CharacterWriteAddessControl=0;


/*
 void Int1(void)
*/
void Int0(void) interrupt 0
{
 EX0=0;
 ET0=1;
 while(1);
}


/*
 void T0(void)
*/
void Timer0(void) interrupt 1
{
 TR0=0;
 ET0=0;
 while(1);
}


/*
 void Int0(void)
*/
void Int1(void) interrupt 2
{
 EX1=0;
 while(1);
}


/*
 void Timer1(void)
*/
void Timer1(void) interrupt 3
{
 TH1=ReloadTh1;
 TL1=ReloadTl1;
 while(1);
}


/*
 void SerialPort(void)
*/
void SerialPort(void) interrupt 4
{
 if(RI)
 {
  RI=0;
 }
 
 if(TI)
 {
  TI=0;
 }
 while(1);
}


/*
 void WriteByte(uchar x)
*/
void WriteByte(uchar x)
{
 uchar i,j;
 
 
 j=x; 
 while(Busy);
 for(i=0;i  <8;i++)
 {
  Clk=0;
  j  <  <=1;
  DataLine=CY;
  Clk=1;
 } 
}


/*
 void WriteOneByte(uchar x)
*/
void WriteOneByte(uchar x)
{
 uchar i;
 
 
 i=x;
 Cs=0;
 WriteByte(i);
 while(Busy);
 Cs=1;
}


/*
 void WriteTwoByte(uint x)
*/
void WriteTwoByte(uint x)
{
 uchar i;
 
 
 i=x/256;
 Cs=0;
 WriteByte(i); 
 i=x%256;
 WriteByte(i); 
 while(Busy);
 Cs=1;
}


/*
 void WriteSecondByte(uint x)
*/
void WriteSecondByte(uint x)
{
 uchar i; ......

>>返回讨论的主题



  发表回复
用户名   *您没有注册?
密码   *
验证码   * .
标题   *
心情
随便说说    我回答你    最新发现    得意的笑   
气死我了    真是没劲    坚决同意    表示反对   
大家过来    好奇怪哟    懒得理它    大家小心   
文件上传
内容


字体:      字体大小:    颜色:
粗体 斜体 下划线 居中 超级连接 Email连接 图片 Flash图片 Shockwave文件 realplay视频文件 Media Player视频文件 QuickTime视频文件 引用 飞行字 移动字 发光字 阴影字 查看更多的心情图标 背景音乐
点击加入表情
                         
选项
有回复时用短消息通知您?

   




老古网执行:16毫秒 最大:8312毫秒 查询6次