共3条
1/1 1 跳转至页
FIP,VFD 请问有谁用过FIP(VFD)驱动器得?
问
我手头只有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
可是没有具体应用实例
有的话帮忙传一下
先谢了
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
共3条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
vscode+cmake搭建雅特力AT32L021开发环境被打赏30分 | |
【换取逻辑分析仪】自制底板并驱动ArduinoNanoRP2040ConnectLCD扩展板被打赏47分 | |
【分享评测,赢取加热台】RISC-V GCC 内嵌汇编使用被打赏38分 | |
【换取逻辑分析仪】-基于ADI单片机MAX78000的简易MP3音乐播放器被打赏48分 | |
我想要一部加热台+树莓派PICO驱动AHT10被打赏38分 | |
【换取逻辑分析仪】-硬件SPI驱动OLED屏幕被打赏36分 | |
换逻辑分析仪+上下拉与多路选择器被打赏29分 | |
Let'sdo第3期任务合集被打赏50分 | |
换逻辑分析仪+Verilog三态门被打赏27分 | |
换逻辑分析仪+Verilog多输出门被打赏24分 |