|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
! "# ! $#%& ,- 123456 '()*+%& ../0 ) ) ( ' & % $ # " ! (789:;<=>? ! ! ! !" ! ! ! ! ! ! ! "# $% # $ 345612 " & # # # # # &'()*+ &'(),+ %78(9! %78:)! ;<=>?@A1 BCDE1@AFG HIBCJ@A12 DEKL122M N.ODEJDEK(9 L122M (9.OLPQ12 N.OL1@AF N.OLRST!U V()WX12 !% -./012 78 " ' # # z() 78V,+1 N.OL 1() yzCLN.OL1 dyz#eDE1 78 N 78V DE 78+~>L xL()(9 ! () dN.OL1 yzCDE Tu1Y<=>V(9 & & % $ $ $ ! -.(9 1 |( H +1V*+ df-. 78V,+ |)6(9 H6(9 6(9 (c)(9 (c)# a YDEZV[\ @%& abc DE ]DE^_LYDE defgDET stuvbc wxgDET hiY bc ijkYHlm nopqr yzi{YWXK|}~Ti{YWXu DE gDEiY$% {noWX " DE * iY ;(R)(R) 6u {lmWXY ijkYlmnoqr" V 4 J(R) " ^(R) 2 (R)[ ^(R) 2 5 2 L P 3 9 V 6T uV Vno 5 2 L wxDET P 3 9 Vno DE V 1/23/4DE" 6T u KDE\ i1/46V;(R)(R) 6 KDE\ ~J "{6T*u (R) YAA (R) 2 5 2 L P 3 9 4 wxR1/23/4DETY V (R)[ ^(R) Vno 1/23/4DE K1/23/4DE\ A(BCD%& 6AAA *E/ EEI[HIIS + IIZVDE J) ) )V NOZO< OOO0x < +"VL efDE1 -O " | " & UYU Y I 1 1 " *E/ DEK~uDEA UYU i"YaEEAC " ) ) ) V a aeU"% DE gDEYEE- | " , + Za0 | EaY| g|% Ea|Yaaa< no o "n EEEaYnoqr ceT eeYWXVe"no +&+ Za0Ea& no lm lm EEEaYlmqr diutiilmqrT gu)uu T EF Z e"ut +&+Za0Ea& i1hnog u)Yuhty oooo/ WX Tuu)YLht 9 df$Ea Y1 YjVlmqr O* Y%G W%&XY GHI(JKLMNOP QR%&S+&+TUV KL[\DOP] |%DE V|DE DEJ V%EaJiuDaY| +&+V| |V ; |V JiuDaY " NOZOV (R) V *E/ (R)EaY$|V EaY$|V " |DE |V \?(R)EaYV A |EE OO~ V EaJYiu| DEK |%DE N.OLDE gDE; N9dIY-.E Y-.E KDE" EEYIuH I VBCf YDE a&" .-<1VJY..OE 0x DEYII| E { TuHI+&+UV ..OEYaa OO O#{ (9.OEYu YD ! Y!78{*()WX ! 78;()WXUV(9WX DEYTI| #f! 78Y"0u;(9Xf()XYU#o$ dfY-.1 %78;*+V,+ N.OLDE h(9 %oOO uy&f x#" uIYAA .' E (2 )#ef N.ODE U(9dI-.Y.O )ef 1*-. +xACK{ )Y/A01 YDE2o\ { C@A " C @A YDE WX "_LY]DE FGV ! DEYFGV! { I V{ _LYDE FGV! , xL; ! 78C)yz I dz.V,+T ! 78~YL 78Y~>tu N.OLDE C f T!VY.OE wxDE1 Y !(R)@AY~>V(9WX p4#e _LDE DE*I L*I " N.ODE N.ODE *I (9Y.OE *I Y0< 0#67CEa )".O Oe4 a 0J fY.O^EaO"# e 4EaEajklmqre"uE/.OY UxJ#f.OY8^8<9e UxJY8<9e":e; e">e4 c<"#)E $=Y8 ).O aeU) ?@0J8<9^8.O#=$&$Y8 O"L +*% ONOoPQ YEa T"U:o uVH*G <9Yua& "E / YI< <90E>FYu oO*.OZYGHI> 0XdY6x uZaV ax b=1 ic F* ~ uY#Y(c)xOZ|} )yz[\ O]^_(c)x da(c)xYc0Eefg Eex=h Y!auV0o/< O#K# O#uYYax #I./ ze frYo/< \ WX !I,+V*+T ~T .-<1 .OE $5J iY eV ijo&. Y12kuU) "no DE d i Y qreV 1)#ef N.O %78(9V,+ .OEYaa JEO U h JY. DE (9i-<.YE h(9 OO0x )*-.Yo/ E>lm/YnP !F >u7)FYstHI O:$5op !)gZ hYu~ ij oVyz#6 Ea x=FqFr EF )4vAO*xYGHI>J AEV6XiAC QR(^._ab XcdefgSJ^.Dh klImno^p^qr._abDst uvNw <w9 !. xyY ! . xyY K #Y0? $5iRSYz>A C eVp4.O() {ThiNfY.O EU#SUT 1hIY AA !#"$5 |# ! i1}pV .0 O112 $5 1)23452 OE, " o jo~ $5J112OY# V Y/ 1}p"Y $ title (HD7279A Test Program) $ DB ;********************************* ; RAMaa ;********************************* BIT_COUNT DATA 07FH TIMER DATA 07EH TIMER1 DATA 07DH TEN DATA 07CH DATA_IN DATA 020H DATA_OUT DATA 021H ! ;******************************************* ; I/O"aa ;******************************************* DAT BIT P1.2 ;HD7279AYDATA#P1.2 KEY BIT P1.3 ;HD7279AYKEY#P1.3 CS BIT P1.4 ;HD7279AYCS#P1.4 CLK BIT P1.5 ;HD7279AYCLK#P1.5 ORG JMP ORG START: MOV MOV MOV 000H START 100H SP,#2FH P1,#11011011B TIMER,#50 ;aa ;I/O" ;1i25MS START_DELAY: MOV START_DELAY1:DJNZ DJNZ MOV CALL SETB MAIN: JB MOV CALL CALL SETB MOV MOV DIV MOV MOV TIMER1,#255 TIMER1,START_DELAY1 TIMER,START_DELAY DATA_OUT,#10100100B SEND CS KEY,MAIN DATA_OUT,#00010101B SEND RECEIVE CS B,#10 A,DATA_IN AB TEN,A DATA_OUT,#10100001B ;a(bc)DE ;3aCSV*+ ;aae.-< ;.-< CN.ODE ;jCSV*+ ;16U BCDEU# CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL SETB JNB JMP SEND DATA_OUT,#10100001B SEND DATA_OUT,#10000001B ; ;2DE dI ;AA,9Z ;L ;CDEfHD7279A WAIT: ;******************************************* ; C1HIfHD7279 *I ;******************************************* SEND: MOV BIT_COUNT,#8 ;ja=8 CLR CS ;jCSV,+ CALL LONG_DELAY ;r1 SEND_LOOP: MOV MOV SETB MOV RL MOV CALL CLR CALL DJNZ CLR RET C,DATA_OUT.7 DAT,C CLK A,DATA_OUT A DATA_OUT,A SHORT_DELAY CLK SHORT_DELAY BIT_COUNT,SEND_LOOP DAT ;(91 ;jCLKV*+ ;4CL ;h1 ;jCLKV,+ ;h1 ;_aae8eCR ;CR ;******************************************* ; ;HD7279#euHI *I ;******************************************* RECEIVE: MOV BIT_COUNT,#8 ;ja=8 SETB DAT ;jP1.2(DATA)"V*+ ;(()WX) CALL LONG_DELAY ;r1 RECEIVE_LOOP: SETB CLK ;kCLKV*+ CALL SHORT_DELAY ;h1 MOV A,DATA_IN ;L RL MOV MOV MOV CLR CALL DJNZ CLR RET A DATA_IN,A C,DAT ;NuL DATA_IN.0,C CLK ;kCLKV,+ SHORT_DELAY BIT_COUNT,RECEIVE_LOOP;aae#e8L DAT ;yjDAT"V,+((9WX) ;******************************************* ; 1$5 ;******************************************* LONG_DELAY: MOV TIMER,#25 ;ja112Vi50uS DELAY_LOOP: DJNZ TIMER,DELAY_LOOP RET SHORT_DELAY: MOV TIMER,#4 ;ja112Vi8uS SHORT_LP: DJNZ TIMER,SHORT_LP RET END #"$5 |# V i 1 } p .0 jo~ $ 5 . x y Y $5J112OY# O112 ..OE$5OE,o "Y/1}p TITLE LIST INCLUDE "HD7279A TEST" P=16C54 P16C5X.INC ;********************************** ; 01aa ;********************************** BIT_COUNT SET 0X07 DATA_OUT SET 0X08 DATA_IN SET 0X09 TEN SET 0X0A TIMER SET 0X0B TIMER1 SET 0X0C ;********************************** ; I/O"aa ;********************************** CS EQU 0 CLK EQU 1 DAT EQU 2 KEY EQU 3 ORG GOTO ORG 0x1FF START 0X00 ;CS#16C54YRA0 ;CLK#16C65YRA1 ;DAT#16C54YRA2 ;KEY#16C54YRA3 ;******************************************* ; 1$5 ;******************************************* LONG_DELAY MOVLW D'16' ;ja112Vi50uS MOVWF TIMER DELAY_LOOP DECFSZ GOTO RETLW TIMER DELAY_LOOP 0 MOVLW D3 ;ja112Vi8uS MOVWF TIMER SHORT_LP DECFSZ TIMER GOTO SHORT_LP RETLW 0 ;******************************************* ; C1HIfHD7279 *I ;******************************************* SEND MOVWF DATA_OUT ;4CL1)DATA_OUT MOVLW D'8' MOVWF BIT_COUNT ;ja=8 BCF PORTA,CS ;jCSV,+ CALL LONG_DELAY ;r1 SHORT_DELAY SEND_LOOP BCF RLF BCF BTFSC BSF BSF CALL BCF CALL DECFSZ GOTO BCF RETLW STATUS,C DATA_OUT PORTA,DAT STATUS,C PORTA,DAT PORTA,CLK SHORT_DELAY PORTA,CLK SHORT_DELAY BIT_COUNT SEND_LOOP PORTA,DAT 0 ;(91 ;jCLKV*+ ;h1 ;jCLKV,+ ;_aae8eCR ;CR C;******************************************* ; ;HD7279#euHI *I ;******************************************* RECEIVE MOVLW D'8' MOVWF BIT_COUNT ;ja=8 MOVLW B'11111100' ;jRA2(DATA)"V()WX TRIS CALL RECEIVE_LOOP BSF CALL PORTA LONG_DELAY PORTA,CLK SHORT_DELAY ;r1 ;kCLKV*+ ;h1 BSF BTFSS BCF RLF BCF CALL DECFSZ GOTO MOVLW TRIS RETLW STATUS,C PORTA,DAT STATUS,C DATA_IN PORTA,CLK SHORT_DELAY BIT_COUNT RECEIVE_LOOP B'11111000' PORTA 0 ;NuL ;kCLKV,+ ;aae#e8L ;yjRA2(DATA)"V(9X ;******************************************* ; ;******************************************* START MOVLW B'11111000' ;I/O" TRIS PORTA MOVLW B'11111001' MOVWF PORTA MOVLW 0X19 ;1i25MS MOVWF TIMER START_DELAY MOVLW 0XFF MOVWF TIMER1 START_DELAY1 DECFSZ TIMER1 GOTO START_DELAY1 DECFSZ TIMER GOTO START_DELAY MOVLW B'10100100' ;a(bc)DE CALL SEND BSF PORTA,CS ;3aCSV*+ ;******************************************* ; $5 ;******************************************* MAIN BTFSC PORTA,KEY ;aae.-< GOTO MAIN MOVLW B'00010101' ;.-< CN.ODE CALL SEND ;CN.ODE CALL RECEIVE ;;HD7279AN.OE BSF PORTA,CS ;jCSV*+ ;******************************************* ; 16U BCDEU# ;******************************************* CLRF TEN GET_DEC MOVLW D'10' SUBWF DATA_IN,W SKPC GOTO OVER MOVWF DATA_IN INCF TEN GOTO GET_DEC ;******************************************* ;C-.YBCDEfHD7279 ;******************************************* ;2DE dI AA ;9Z L OVER MOVLW B'10100001' ;DE CALL SEND ;CDEfHD7279A MOVLW B'10100001' ;DE CALL SEND ;CDEfHD7279A MOVLW B'10000001' ; u:MCS51YC$5 oaHD7279A YC51$5,CO$YO #include // // // // cs at P1.4 clk # P1.5 dat # P1.2 key # P1.3 { while (1) { for (tmr=0;tmr<0x2000;tmr++); send_byte(CMD_RESET); //****************************************** DE // // ~1 // aHD7279A //****************************************** send_byte(CMD_TEST); // DE for (j=0;j<3;j++) // 1i3 { delay10ms(100); } send_byte(CMD_RESET); // bc //********************************************** noDE.O#" // // h-.Y.E 9, )10A-. // -S0.U) write7279(UNDECODE,0X08); // (R)1 <='_' write7279(UNDECODE+1,0x08);// (R)2 <='_' do { if (!key) // ).-< { key_number=read7279(CMD_READ); // N9.E write7279(DECODE1+1,key_number/16); // (R)2 .E*8 write7279(DECODE1,key_number&0x0f); // (R)1 .E,8 while (!key); // p4-.c wait_cnter=0; } wait_cnter++; } while (key_number!=0 && wait_cnter<0x30000); // )-.V 0 ^M1UU) write7279(BLINKCTL,0xff); // bcnojk //****************************************** // //****************************************** for (j=0;j<5;j++) // uV00000 { digit[j]=0; write7279(DECODE0+j,digit[j]); } while (digit[4]<2) // )f20000 { digit[0]++; if (digit[0]>9) { digit[0]=0; digit[1]++; if (digit[1]>9) { digit[1]=0; digit[2]++; if (digit[2]>9) { digit[2]=0; digit[3]++; if (digit[3]>9) { digit[3]=0; digit[4]++; if (digit[4]>9) { digit[4]=0; } } } } } write7279(DECODE0,digit[0]); if (digit[0]==0) { write7279(DECODE0+1,digit[1]); if (digit[1]==0) { write7279(DECODE0+2,digit[2]); if (digit[2]==0) { write7279(DECODE0+3,digit[3]); if (digit[3]==0) { write7279(DECODE0+4,digit[4]); } } } } } delay10ms(150); send_byte(CMD_RESET); // bc //************************************************* //********************************************* for (j=0;j<16;j++) { send_byte(RTL_UNCYL); // "1/23/4DE write7279(DECODE0,j); // EEAC0DE (R)1 delay10ms(50); } delay10ms(150); send_byte(CMD_RESET); //********************************************* EEAC1DE // //********************************************* for (j=0;j<16;j++) { send_byte(RTR_UNCYL); // "1/23/4DE write7279(DECODE1+7,j); // EEAC0DE (R)8 delay10ms(50); } delay10ms(150); //********************************************* lmDE // //********************************************* k=0xff; for (j=0;j<6;j++) { k=k/2; write7279(ACTCTL,k);// Mu(c)ulm delay10ms(100); } write7279(ACTCTL,0xff); // 3a8 delay10ms(100); send_byte(CMD_RESET); // bc //********************************************** |%DE^|DE // //********************************************** for (j=0;j<64;j++) { write7279(SEGON,j); write7279(SEGOFF,j-1); delay10ms(20); } } } void write7279(unsigned char cmd, unsigned char dta) { send_byte (cmd); send_byte (dta); } unsigned char read7279(unsigned char command) { send_byte(command); return(receive_byte()); } void send_byte( unsigned char out_byte) { unsigned char i; cs=0; long_delay(); for (i=0;i<8;i++) { if (out_byte&0x80) { dat=1; } else { dat=0; } clk=1; short_delay(); clk=0; short_delay(); out_byte=out_byte*2; } // h64 |% // 1hIu | dat=0; } unsigned char receive_byte(void) { unsigned char i, in_byte; dat=1; // jV()WX long_delay(); for (i=0;i<8;i++) { clk=1; short_delay(); in_byte=in_byte*2; if (dat) { in_byte=in_byte|0x01; } clk=0; short_delay(); } dat=0; return (in_byte); } void long_delay(void) { unsigned char i; for (i=0;i<0x30;i++); } void short_delay(void) { unsigned char i; for (i=0;i<8;i++); } // ********************* 1 n*10ms ********************** void delay10ms(unsigned char time) { unsigned char i; unsigned int j; for (i=0;i |
Price & Availability of HD7279A |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |