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

 *第13702篇: [求助]哪位大虾用过UPD6453,请帮小弟看一下程序!

  
楼 主:guest 2003年6月20日15:56
 [求助]哪位大虾用过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;
 
 
 i=x/256;
 Cs=0;
 WriteByte(i); 
 i=x%256;
 WriteByte(i); 
 WriteByte(i);
 while(Busy);
 Cs=1;
}


/*
 void WriteCharacterAddess(uchar x,uchar y,uchar Character)
 x=1~12;
 y=1~24;
 Character=0~255;
*/
void WriteCharacter(uchar x,uchar y,uchar Character)
{
 uint i=0;
 
 
 i=i|0x8400;
 if(x>  =0x10)
 {
  i=i|0x0100;
 }
 i=i|(x  <  <5);
 i=i|y;
 WriteTwoByte(i);
 
 i=0xca00;
 i=i|Character;
 WriteSecondByte(i);
}


void main(void)
{
 uchar Temp=0;
 
 
 P0=0x00;
 P1=0xff;
 P2=0x00;
 P3=0xff;
 Load=1;
 Load=0;  
 
 IP=0x00;
 IE=0x00;
 TMOD=0x25;
 TCON=0x05;
 PCON=0x00;
 SCON=0x00;
 
 TH0=ReloadTh0;
 TL0=ReloadTl0;
 TH1=ReloadTh1;
 TL1=ReloadTl1;
 
 ES=1;
 EX0=0; 
 EA=1;
 
 while(1)
 {
  WriteOneByte(0x04); /*Display off,Osc on,Flink off.*/
  WriteOneByte(0x40); /*No background.*/
  WriteOneByte(0x1e); /*Background color:white.*/
  WriteOneByte(0x30); /*Nomal TV scan.*/
  WriteOneByte(0x34); /*Video RAM all reset.*/
  
  WriteTwoByte(0x8088); /*Display position.*/  
  
  WriteCharacter(1,1,0x00);  
  WriteCharacter(1,2,0x01);
  WriteCharacter(1,3,0x02);
  WriteCharacter(1,4,0x03);
  WriteCharacter(1,5,0x04);
  WriteCharacter(1,6,0x05);
  WriteCharacter(1,7,0x06);
  WriteCharacter(1,8,0x07);
  WriteCharacter(1,9,0x08);
  
  WriteCharacter(4,1,0x00);
  WriteCharacter(4,2,0x01);
  WriteCharacter(4,3,0x02);
  WriteCharacter(4,4,0x03);
  WriteCharacter(4,5,0x04);
  WriteCharacter(4,6,0x05);
  WriteCharacter(4,7,0x06);
  WriteCharacter(4,8,0x07);
  WriteCharacter(4,9,0x08);
  
  WriteCharacter(8,1,0x00);
  WriteCharacter(8,2,0x01);
  WriteCharacter(8,3,0x02);
  WriteCharacter(8,4,0x03);
  WriteCharacter(8,5,0x04);
  WriteCharacter(8,6,0x05);
  WriteCharacter(8,7,0x06);
  WriteCharacter(8,8,0x07);
  WriteCharacter(8,9,0x08);
  
  
  //WriteTwoByte(0x8800); /*Size,Smooth,Mask pule control.*/
  
  WriteOneByte(0x0c); /*Display on,Osc on,Flink off.*/  
  
  
  Cs=0;  
  
  while(1)
  {
   if(LedDelayTimer==0)
   {
    Led=~Led;
    LedDelayTimer=65000;
   }
   else
   {
    LedDelayTimer--;
   }
  }  
 }
}

  
2楼:guest 2003年6月21日09:39
 版主有没有点招儿啊!我知道很少人用这种芯片。
  
3楼:guest 2003年6月21日11:44
 看热闹的人倒是挺多的,哎!
  
4楼:guest 2003年6月21日13:32
 不要叹气吗,推荐给你!
如果你有兴趣,去到这里问问 sky_abc

  
5楼:guest 2003年6月23日14:27
 问题已经解决,有需要字幕叠加器的可经跟我联系!
问题已经解决,有需要字幕叠加器、字符叠加器的可经跟我联系!
我的产品可一屏叠加64 个汉字, 不过有做过12X18点阵字库的朋友可以跟我联系。 这种字库不是国标字库,很难找。
联系方式:rgh111@163.com
  
6楼:guangbiao 2006年12月6日16:03
 马后炮!!
[size=3][/size]
upd6453最好不要用晶振,用电感来做,这样效果要好很多!
用示波器去量量它的晶振输入端口看看频率为多少,最好不要超过限制频率太多。

>>>>>>对该主题发表你的看法

本主题贴数6,分页: [第1页]


[上一篇主题]:请推荐一款内置16k flash, 1k ram, 带看门狗

[下一篇主题]:用过16c554的达人能发个例程给我吗?