-
交通灯: 1. 因为本设计是交通灯的控制,所以要先了解实际交通灯的变化规律。假设一个十字路口为东西南北走向。初始状态0为东西红灯,南北红灯。然后转状态1南北绿灯...
交通灯: 1. 因为本设计是交通灯的控制,所以要先了解实际交通灯的变化规律。假设一个十字路口为东西南北走向。初始状态0为东西红灯,南北红灯。然后转状态1南北绿灯通车,东西红灯。过一段时间转状态2,南北绿灯闪几次转亮黄灯,延时几秒,东西仍然红灯。再转状态3,东西绿灯通车,南北红灯。过一段时间转状态4,东西绿灯闪几次转亮黄灯,延时几秒,南北依然红灯。最后循环至状态1。 2. 双色LED是由一个红色LED管芯和一个绿色管芯封装在一起,公用负端。当红色正端加高电平,绿色正端加低电平,红灯亮;红色正端加低电平,绿色正端加高电平,绿灯亮;两端都加高电平,黄灯亮。 急救车和交通灯: 中断服务程序的关键是:1. 保护进入中断时的状态,并在推出中断之前恢复进入时的状态;2. 必须在中断程序中设定是否允许中断重入,即设置EX0位。 本设计使用了INT0中断,一般中断程序进入时应保护 PSW,ACC以及中断程序使用但非其专用的寄存器。本设计中的INT0程序保护了PSW,ACC,2等三个寄存器并且在退出前恢复了这三个寄存器。另外中断程序中涉及到关键数据的设置时应关中断,及设置时不允许重入。本设计中没有涉及这种情况。 name:trled1.asm trled2.asm-traffic lights : 1. Because of the design of the traffic lights, so there must first understand the traffic lights change. Assuming a crossroads for the east-west north-south. Initial state of things 0 red light, red light north-south. Then the state opening of a north-south green, red things. For a period of time to state 2-green flashing yellow light switch several times, a few seconds delay, things are still red. Three sub-state, opening things green, red ligh
- 2022-04-29 18:17:53下载
- 积分:1
-
keil编译器的环境下基于lpc2378的各个模块的工程代码
keil编译器的环境下基于lpc2378的各个模块的工程代码-keil compiler environment of each module based on lpc2378 project code
- 2022-09-01 19:40:03下载
- 积分:1
-
application example(linux), based on atmel9260: norflash operation
linux下基于9260的应用例程:norflash读写-application example(linux), based on atmel9260: norflash operation
- 2022-07-06 12:16:21下载
- 积分:1
-
这篇文档介绍在Linux下用GNU工具集开发ARM程序的一个机理
这篇文档介绍在Linux下用GNU工具集开发ARM程序的一个机理-This document describes the use of GNU Linux development tool set procedures for an ARM Mechanism
- 2022-03-10 04:35:04下载
- 积分:1
-
打印hello
print hello- microblaze
- 2023-06-04 14:45:03下载
- 积分:1
-
提供的程序是供四相步进电机使用。本实验使用的步进电机用直流+12V电压,电机线圈由A、B、C、D四相组成。 2. 驱动方式为四相单四拍方式,各线圈通电顺序如下表...
提供的程序是供四相步进电机使用。本实验使用的步进电机用直流+12V电压,电机线圈由A、B、C、D四相组成。 2. 驱动方式为四相单四拍方式,各线圈通电顺序如下表。表中首先向A相线圈输入驱动电流,接着向B,C,D线圈通电,最后又返回到A相线圈驱动,按这种顺序轮流切换,电机轴按顺时针方向旋转。若通电顺序相反,则电机轴按逆时针方向旋转。-provide for the procedures of the four-phase stepper motor use. This experiment used the stepper motor 12V DC voltage electrical coils A, B, C, D phase. 2. Four-driven approach to making four single-phase, the coil electrifying sequence the following table. Table A first phase coil input drive current, then to B, C, D coil electricity and eventually return to the A-phase coil driven by the rotation order of this switch, the electrical axis by rotating clockwise direction. If electricity in reverse order, the motor shaft by the anti-clockwise rotation.
- 2022-03-20 10:00:53下载
- 积分:1
-
发光二极管矩阵码,不是我的
ARDUINO LED矩阵不是我的
- 2023-05-15 13:45:02下载
- 积分:1
-
对传感器MPU6050进行调试设置参数(硬件IIC)
#include "stm32f10x.h"#include "I2C_MPU6050.h"#include "usart1.h"#include "delay.h"int main(void){ InitMPU6050();/***********************************************************************/while(1){printf("
---------------%d
",GetData(ACCEL_XOUT_H));printf("
----------------%d
",GetData(ACCEL_YOUT_H)); printf("
------------------%d
",GetData(ACCEL_ZOUT_H)); printf("
---------------%d
",GetData(GYRO_XOUT_H)); printf("
-----------------%d
",GetData(GYRO_YOUT_H)); printf("
---------Ã---------%d
",GetData(GYRO_ZOUT_H));delay_ms(500);} }/******************* (C) COPYRIGHT 2012 WildFire Team *****END OF FILE************/
- 2022-01-28 09:30:30下载
- 积分:1
-
DPIC30F6010A的头文件和连接文件,根据这两个文件可以完成寄存器C语言编程与汇编编程的对应!而且是工程中必须包含的文件!...
DPIC30F6010A的头文件和连接文件,根据这两个文件可以完成寄存器C语言编程与汇编编程的对应!而且是工程中必须包含的文件!-DPIC30F6010A header files and link files, according to the two documents to be completed registers C programming and assembly language programming counterparts! But also project must include the file!
- 2022-07-21 16:17:55下载
- 积分:1
-
为优龙公司的2410开发板写的一个的AD采样驱动程序,
为优龙公司的2410开发板写的一个的AD采样驱动程序,-Liuzhou
- 2022-05-16 03:32:03下载
- 积分:1