导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→这样的时序怎么实现不了!!??

* 87562: 这样的时序怎么实现不了!!??

   xiaocaigang 
xiaocaigang发表的帖子 

 这样的时序怎么实现不了!!??

此主题相关图片如下:
按此在新窗口浏览图片

此主题相关图片如下:
按此在新窗口浏览图片
程序如下:

$include (c8051f330.inc)
n1 equ 30h
n2 equ  31h
n3 equ  32h
rr1 equ 33h
rr2 equ 34h
rr3 equ 35h

 

org 0000h
ljmp 100h

org 000bh
ljmp intclk0

org 0100h


    mov  P0MDOUT,   #0ffh
    mov  XBR0,      #001h
    mov  XBR1,      #040h
   


    mov  TMOD,      #022h
  
    mov  IE,        #00Ah
   mov r0,#00h
  mov r1,#00h
  mov tl0,#0ffh
  mov th0,#0ffh
    setb ea
    setb et0
  setb tr0
  MOV P0,#00H
 
    

here:mov n1,#23h
     mov n2,#0f3h
   mov n3,#058h
     mov rr1,#11h
     mov rr2,#0a5h
   mov rr3,#085h
     sjmp here


intclk0:inc r0
        cjne r0,#1,next1
    mov r1,n1
    sjmp yw1
next1:  cjne r0,#9,next2
        mov r1,n2
    sjmp yw1
next2:  cjne r0,#17,next3
        mov r1,n3
    sjmp yw1
next3:  cjne r0,#25,next4
        mov r1,rr1
    sjmp yw1
next4:  cjne r0,#33,next5
        mov r1,rr2
    sjmp yw1
next5:  cjne r0,#41,next6
        mov r1,rr3
    sjmp yw1
next6:  cjne r0,#48,next7
        mov r0,#0h
    sjmp yw1
next7:  cjne r0,#20,next8
        sjmp yw2
next8:  cjne r0,#40,yw1
        sjmp yw2

yw1:    mov a,r1
        RLC a
    mov r1,a
        MOV P0.0,C
    CALL DELAYUS
    setb P0.3
    CALL DELAYUS
      clr p0.3
    
    RETI

yw2:    mov a,r1
        RLC a
    mov r1,a
        MOV P0.0,C
    CALL DELAYUS
    setb p0.3
    CALL DELAYUS
    clr p0.3
    SETB P0.2
    call delayus
    clr p0.2
    RETI
    

DELAYUS:NOP
        NOP
    NOP
        NOP
        NOP
    NOP
        NOP
        NOP
    NOP
        NOP
        NOP
    NOP


    RET


    END

这里写了两次20位的数据,要求的时序见附件中图

P0.0 是DATA

P0.2 是EL

P0.3是CLK

那位帮忙看看啊!!!

圈到的不知道怎么出来的



发表时间:2005年12月31日13:15:34

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:单片机兼职本人从事两年多的单片机工作,熟悉多种系列的,想在青岛找个兼职 cjf308@sin
[下一篇帖子]:古哥,FTP里怎么没找见EW430?小弟急着要用啊。找了半天没找见啊。