Programming application example of single chip microcomputer driving 74HC164

Publisher:EtherealJourneyLatest update time:2018-03-11 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

;-------------------------------------------------------------
;An example of microcontroller driving 74LS164/74HC164
;74HC164 is a serial input and parallel output data shift module. Every time a clock
pulse is sent to its clock end (CK), its current data line (DT) state is shifted to the output end and output. The data of 164
is latched at the rising edge of the clock, and the output shifts from A to H in sequence
;In this example, the bit operation plug-in developed by our site is used to facilitate the IO bit line setting and clearing operations

;------------------------------------------------------------
;The process of sending a byte of data to 164
;R0----data/instruction byte to be sent 
;-----------------------------------------------------------
SENDTO164:
        PUSH R0
        PUSH R1
        CLRBIT CK_164 ;set c LOC k line is low 
        NOP
        NOP
        CLRBIT DT_164 ;set data line is low 
        LD R1,#08H
  SENDA_164:
        RLC R0 ;right shift R0,bit0 into C
        SETBIT DT_164 ;set data line
        JR C,SENDB_164 ;if C=1,skip
        CLRBIT DT_164 ;clear data line
       
  SENDB_164:
        NOP
        NOP 
        SETBIT CK_164 ;send one clock pulse
        NOP
        NOP
        NOP
        CLRBIT CK_164 ;
        DEC R1
        JR NZ,SENDA_164 
        
SEND164_BACK:
        P OP R1
        POP R0
        RET 
;-------------------------------------------------------------

Reference address:Programming application example of single chip microcomputer driving 74HC164

Previous article:Programming and Application of LED Display Interface Module
Next article:Software programming methods and techniques

Recommended ReadingLatest update time:2024-11-16 12:47

MSP430 MCU drives LCD1602 C language program
/*******************************************************************************/                         1.msp430 single chip C language /************************************************************************/ #include"msp430f6638.h" /*********************************************** P5.3----E P57 P56 P55 P54 P
[Microcontroller]
51 MCU Learning 1- Latch Drive LED Light
Episode 1     An introduction to microcontrollers and some basic knowledge necessary for learning.   Episode 2 1. Analysis of microcontroller models. 1. Example AT89S5224PU AT—Manufacturer logo, indicating that the device is a product of ATMEL. 89—ATMEL's product 89 series family (including Flash memory).
[Microcontroller]
51 MCU Learning 1- Latch Drive LED Light
How to use Atmega 16 microcontroller to drive character LCD display chip
After some research, I found out how to use ATmega 16 microcontroller to drive character LCD chips. Now I write down my research experience: The RT1601 LCD display module I have uses the S6A0069 display chip. A brief description of each pin: The control and data pins are configured as follows: ----------------
[Microcontroller]
How to use Atmega 16 microcontroller to drive character LCD display chip
51 single chip microcomputer LED and digital tube driving
1. Write C51 code to realize the changing pattern of running lights: /*********************************************************** * Experimental function: LED to realize the flower-shaped control of flowing water lamp *************************************************************/ # include reg51.h void delay(unsig
[Microcontroller]
51 MCU at24c02 driver
//////////////////////////////////////////////////////// head File///////////////////////////////////////////////////////////////////////////////////////// /****************************************************************************** * Title: at24c02 e2prom driver * * Files: at24c02.h at24c02.c * * Date: 2010-
[Microcontroller]
AT89C51 single chip microcomputer drives LCD to display Chinese characters C language
Download the complete project file of this program: http://www.51hei.com/f/8952lkj_c.rar The above picture is the schematic diagram and its simulation effect. /*******************************************************************  AT89C51 MCU drives LCD to display Chinese characters C language ***************
[Microcontroller]
AT89C51 single chip microcomputer drives LCD to display Chinese characters C language
51 single chip microcomputer parallel port drives LED digital tube display circuit and program
This paper introduces the method of using a parallel port of 51 single-chip microcomputer to realize multiple LED digital tube display. The hardware circuit structure principle diagram and software program flow of the multi-channel LED display system designed by this method are given, and the program written in 51 asse
[Microcontroller]
51 single chip microcomputer parallel port drives LED digital tube display circuit and program
Use the microcontroller AT89C51 to drive the two-digit digital tube to display 00--99 in order to cycle the program code
;The two-digit digital tube displays 00--99 in sequence. org 0000h a_bit equ 20h; The single digit of the digital tube stores the memory location b_bit equ 21h; The tens digit of the digital tube stores the memory location temp equ 22h ;The counter value is stored in the memory location star: mov temp,#0; initiali
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号