搜索资源列表
PC机串行通信程序设计
- 本串行通信程序利用汇编语言通过BIOS中断调用和DOS功能调用实现PC机双机串行通信。其中,上位机和下位机串行口均为辅串口COM2(口地址为2FXH),对外用9针连接器与令一台PC机连接;BIOS通过“INT 14H”4个中断服务子程序,分别完成串口初始化编程、发送一帧数据、接受一帧数据以及测试通信线状态。本程序分为PC机串口自动测试程序(目的是测试串口好坏)和PC机全双工双机通信程序两个部分。-the serial communications procedures through the u
key_state_mechine
- 4*4矩阵键盘扫描函数,用状态机实现,不用延时以消抖,只需在一个定时10~12ms左右的中断函数里调用,从而节省了单片机时间-4 * 4 matrix keyboard scan function, the state machine to achieve, not delay to eliminate buffeting, only in a regular 10-12ms about the interruption function within the call, thereby sav
KEY_BOARD
- 基于状态机的定时中断矩阵键盘扫描程序,相当好用,直接调用h文件中的KeyBoardScan()即可,-Based on state machine timer interrupt matrix keyboard scanner, very easy to direct the call h file KeyBoardScan () can,
lpc
- LPC总线从设备的verilog设计,包含状态机和中断功能。-verilog code for LPC device
twi
- C语言实现的基于AVR 8位单片机的TWI通讯! 通过中断服务程序中的状态机,与TWI硬件状态机相配合,实现快速准确的数据交换!-C language based on the AVR 8-bit MCU s TWI communication! Through the interrupt service routine of the state machine, with the TWI hardware state machine matched the achievement of r
touch
- 在驱动程序中设定了触摸屏所处的7个不同状态,分别用从-1到5的数字表征,这7个状态构成了一个触摸屏状态机,系统根据当前状态做出下一步的处理,如表1所示。整个软件设计根据功能可以划分为5个部分,分别是初始化、设备打开、读操作、中断处理以及I/O控制-In the driver set the touch screen in which seven different states, respectively, from-1 to 5 the number of characterization,
key
- 基于雨亭的51/AVR单片机开发板的按键扫描程序,在定时器中断中定时扫描,使用状态机进行按键去抖,与延时扫描相比效率较高,占用资源少-Yu Ting s 51/AVR microcontroller based development board scanner button, the timer interrupt in time scan, using the state machine button to shake, as compared with the delayed scan m
demo100710
- 要点有3: 1. TMR1中断,每次中断显示led的一位,且将键盘的状态存储链推进一步。 2. TMR1中断处理中,为便利实现各位的显示,采用了寄存器4(FSR)间接寻址方式。 3. 键盘用多级状态机方式,不会为按键判断占用机时,整体显示和键盘响应非常“干脆”;用“下键”标志防止重复读键,从而对于下键和抬键的开关抖动都能够有效抑制。-Main points of 3: 1. TMR1 interrupt, each led one of the interrupt displa
demo_11_4
- 带校时和音乐报时功能时钟的设计与实现 介绍了I/O口输入与输出的应用,中断的应用,以及基于状态机思想的系统分析和系统设计-With the school musical chime clock time and the design and implementation introduces I/O port input and output ports, interrupt the applications, and ideas based on state machine system
Project2
- 1、 硬件部分包括AT89C52、LCD1602和4个独立按键 2、 使用定时器0产生10ms的定时中断,作为时钟基准和软件定时器的基准。 3、 系统使用两个软件定时器Tkeyscan和Tdisplay。 Tkeyscan用来独立按键模块的定时扫描,每次扫描结合按键状态机的当前状态判断按键的有效性(消抖)及其时长(长按还是短按)。 Tdisplay用来定时激活LCD1602的显示(200ms一次,可自行修改)。 4、 整个系统在四种状态间流转:DISPL
key
- 按键状态机程序,可实现按键按下,长按,弹起三种状态,在定时中断里每隔10MS调用-Key state machine procedures, can be the key press, long press, bouncing three states where the timer interrupt every 10MS call,
Test
- 利用状态机实现51单片机短按长按连发,利用定时器中断产生的软件标志计数,定时器中断可以完成其它任务,-Using the state machine to achieve the the 51 SCM Short Press Long Press bursts software timer interrupt flag count, the timer interrupt other tasks can be completed,
shiyan8_IRQ4
- 开发环境:unSP IDE 2.0.0 实验目的: 1)了解IRQ4的中断向量和中断源。 2)掌握中断控制单元P_INT_Ctrl, P_INT_Clear的设置方法。 3)熟悉中断的编程方法。 实验设备: 1)装有µ ’nSP™ IDE仿真环境的PC机一台。 2)µ ’nSP™ 十六位单片机实验箱一个。 实验原理: IRQ4 中断对应4096Hz、2048Hz、1024Hz 中断源,通过写P_INT_Ctrl来设置中
i2c_slave_V1.2
- 在stm32单片机上,用IO口的上升沿和下降沿中断设计的I2C从机代码。测试通过。所有过程用状态机来控制,没有cpu空延时。 核心代码和单片机相关代码分开,方便移植。 主要用在项目验证和学习交流!-On stm32 microcontroller, with rising and falling IO port interrupt design of I2C slave code. The test. All the process is controlled by a state ma
beep-qu-dong
- 上一节讲了利用累计定时中断次数实现LED灯闪烁,这个例子同时也第一次展示了我最完整的实战程序框架: 用switch语句实现状态机,外加定时中断。这个框架看似简单,实际上就是那么简单。我做的所有开发项目都是基于这个简单框架, 但是非常好用。上一节只有一个单任务的LED灯在闪烁,这节开始,我们多增加一个蜂鸣器报警的任务,要教会大家四个知识点: 第一点:蜂鸣器的驱动程序框架编写。 第二点:多任务处理的程序框架。 第三点:如何控制蜂鸣器声音的长叫和短叫。
7_3_Key_Long_Short_Mealy
- WDT定时器设置为16ms中断。在WDT中断中,记录下最近两次的IO状态存在KEY_Now和KEY_Past中。根据前高后低可判断按键下,前低后高可判断按键松开,存入标志位Key_Dect中。 Key_Dect作为输入量,利用状态机函数Key_SM(),判断出短按键事件和长按键事件。分别调用各自事件处理函数进行处理。-WDT timer 16ms interrupt. In the WDT interrupt, the presence of KEY_Now and KEY_Past rec
7_4_Key_Long_Short_Moore
- WDT定时器设置为16ms中断。在WDT中断中,记录下最近两次的IO状态存在KEY_Now和KEY_Past中。根据前高后低可判断按键下,前低后高可判断按键松开,存入标志位Key_Dect中。 Key_Dect作为输入量,利用状态机函数Key_SM(),判断出短按键事件和长按键事件。分别调用各自事件处理函数进行处理。-WDT timer 16ms interrupt. In the WDT interrupt, the presence of KEY_Now and KEY_Past rec
usart
- 串口商业程序范例: 接收和发射均采用中断模式,并且具备接收发射数据缓存功能,单片机可以方便的用状态机处理串口信息,商业程序最理想的处理方法,集成开发环境TKStudio。-Serial Business Program Example: Are used to receive and transmit interrupt mode, and have the receiver transmit data buffer function, the microcontroller can
LQB G7
- 蓝桥杯第七届国赛代码(状态机扫描矩阵键盘、中断数码管显示、软件IIC、片内EEPROM、带DS18B20\DS1302)(Blue Bridge Cup seventh Tournament (state machine code scan matrix keyboard interrupt, digital display, IIC software, EEPROM, chip with DS18B20\DS1302))
状态机实现中断ok
- 状态机实现定时,仔细看看值得学习。适合初学者(very nice ilove it.if you want learn more.pls contact me.)
