这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 基础知识 » FIP,VFD 请问有谁用过FIP(VFD)驱动器得?

共3条 1/1 1 跳转至

FIP,VFD 请问有谁用过FIP(VFD)驱动器得?

院士
2006-09-17 18:14:16     打赏
FIP,VFD 请问有谁用过FIP(VFD)驱动器得?



关键词: 请问     用过     驱动器    

院士
2006-12-22 22:43:00     打赏
2楼
问 我手头只有UPD16311,PT6311的数据手册
可是没有具体应用实例
有的话帮忙传一下
先谢了
sprawns@sohu.com 1: 没有吗/急啊 2: 啃西文资料吧,足够详尽的拉http://pdf1.alldatasheet.com/datasheet-pdf/view/6815/NEC/UPD16311.html 3: 提供一个汇编程序,便于和手册对照看MISO BIT P1.0 ;sent data to MCU
MOSI BIT P1.1 ;sent data to vfd
CLOCK BIT P1.2
VFD_CS BIT P1.3

DISPLAY_DATA EQU 58H ;display data
DISPLAY_ADDRESS EQU 59H ;VFD display address
DATA_COUNT EQU 5AH     ;欲显示的数据数量
DATA_ADDRESS EQU 5BH   ;欲显示的数据在内存的起始地址
SW_BUFFER   EQU 5CH
KEY_BUFFER1 EQU 5DH
KEY_BUFFER2 EQU 5EH
KEY_BUFFER3 EQU 5FH

INIT_VFD:
    CLR VFD_CS
    MOV A,#00000010B ;display mode setting:6digitis/16segments
    ACALL TO_VFD
    SETB VFD_CS
    NOP
    RET

WRITE_VFD:
    MOV A,#01000000B ;data setting:normal mode/inc address/write display
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    SETB VFD_CS
    NOP
    MOV A,#11000000B ;VFD display address:from 00H
    CLR VFD_CS
    ACALL TO_VFD
    MOV R2,DATA_COUNT
    MOV R0,DATA_ADDRESS
VFDLOOP:MOV A,@R0
    ACALL TO_VFD
    INC R0
    DJNZ R2,VFDLOOP
    SETB VFD_CS
    NOP
    CLR VFD_CS
    MOV A,#10001111B ;dimming quantity setting:display on/14/16
    ACALL TO_VFD
    SETB VFD_CS
    RET

WRITEVFD:
    MOV A,#01000100B ;data setting:normal mode/fixes address/write display
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    SETB VFD_CS
    NOP
    MOV A,DISPLAY_ADDRESS ;VFD display address
    CLR VFD_CS
    ACALL TO_VFD
    MOV A,DISPLAY_DATA ;display data
    ACALL TO_VFD
    SETB VFD_CS
    NOP
    NOP
    CLR VFD_CS
    MOV A,#10001111B ;dimming quantity setting:display on/14/16
    ACALL TO_VFD
    SETB VFD_CS
    RET

WRITE_LED:
    MOV A,#01000101B ;data setting:normal mode/fixes address/write LED
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    SETB VFD_CS
    NOP
    MOV A,#00001111B
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    SETB VFD_CS
    RET

READ_KEY:
    MOV A,#01000110B ;data setting:normal mode/fixes address/read key
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    ACALL TO_MCU
    MOV KEY_BUFFER1,A
    ACALL TO_MCU
    MOV KEY_BUFFER2,A
    ACALL TO_MCU
    MOV KEY_BUFFER3,A
    SETB VFD_CS
    NOP
    RET

READ_SW:
    MOV A,#01000111B ;data setting:normal mode/fixes address/read SWICH
    CLR VFD_CS
    ACALL TO_VFD ;sent data to vfd
    NOP
    ACALL TO_MCU
    ANL A,#07H
    MOV SW_BUFFER,A
    SETB VFD_CS
    NOP
    RET

TO_VFD:MOV R6,#8
TOLOOP:CLR CLOCK
       RRC A
       MOV MOSI,C ;sent data to vfd
       NOP
       SETB CLOCK
       NOP
       NOP
       DJNZ R6,TOLOOP
       RET

TO_MCU:MOV R6,#8
INLOOP:SETB CLOCK
     NOP
     NOP
     NOP
     CLR CLOCK
     MOV C,MISO ;sent data to MCU
       RRC A
       NOP
       DJNZ R6,INLOOP
       RET

专家
2023-03-11 17:15:07     打赏
3楼

学习


共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]