虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

STRING-include

  • 宏晶 STC15F2K60S2开发板配套软件源码 基础例程30例

    宏晶 STC15F2K60S2开发板配套软件源码 基础例程30例/**********************基于STC15F2K60S2系列单片机C语言编程实现使用如下头文件,不用另外再包含"REG51.H"#include <STC15F2K60S2.h>***********************/#include "STC15F2K60S2.H"//#include "REG51.H" //sfr P4   = 0xC0;#define  uint unsigned int  #define  uchar unsigned char  /**********************引脚别名定义***********************/sbit SEL=P4^3; // LED和数码管选择引脚 高:LED有效 低:数码管有效 // SEL连接的单片机引脚必须为带有上拉电阻的引脚 或将其直接连接VCC#define data P2 // 数据输入定义  /**********************函数名称:Delay_1ms功能描述:延时入口参数:unsigned int t 表示要延时t个1ms 出口参数:无备注:通过参数t,控制延时的时间长短***********************/void Delay_1ms(uint t){ uchar j;   for(;t>0;t--)       for(j=110;j>0;j--)     ;}/**********************函数名称:Led_test功能描述:对8个二极管进行测试,依次轮流点亮8个二极管入口参数:无出口参数:无备注:  ***********************/void Led_test(){    uchar G_value=0x01; // 给变量赋初值 SEL=1;    //高电平LED有效   while(1) { data=G_value; Delay_1ms(10000); G_value=G_value<<1; if(G_value==0x00) { data=G_value; Delay_1ms(10000); G_value=0x01;      } }}/***********************主函数************************/void main(){ ///////////////////////////////////////////////// //注意: STC15W4K32S4系列的芯片,上电后所有与PWM相关的IO口均为 //      高阻态,需将这些口设置为准双向口或强推挽模式方可正常使用 //相关IO: P0.6/P0.7/P1.6/P1.7/P2.1/P2.2 //        P2.3/P2.7/P3.7/P4.2/P4.4/P4.5 ///////////////////////////////////////////////// P4M1=0x00; P4M0=0x00; P2M0=0xff; P2M1=0x00; //将P2设为推挽 Led_test();  }

    标签: STC15F2K60S2

    上传时间: 2022-05-03

    上传用户:

  • 51单片机TLC2543电压表相关资料

    说明:  基于51单片机的数字直流电压表相关材料,内容有原理图,仿真文件,论文材料,程序源码等。(The related materials of digital DC voltmeter based on 51 single chip computer include schematic simulation files, paper materials, program source code, etc.)

    标签: 51单片机 tlc2543 电压表

    上传时间: 2022-05-16

    上传用户:fliang

  • PID-小车类-基于Cortex-M0的BLDC电机驱动

    #include "NUC1xx.h"#include "Hal.h"#include "pwm.h"//wait current PWM cycle done, otherwise there maybe short pulse on FETvoid PWM_Stop(U8 ch){ switch(ch) { case PWM_CHANNEL_A: PWMA->u32CNR1 = 0; PWMA->u32CMR1 = 0; while(PWMA->u32PDR1 != 0); break; case PWM_CHANNEL_B: PWMA->u32CNR2 = 0; PWMA->u32CMR2 = 0; while(PWMA->u32PDR2 != 0); break; case PWM_CHANNEL_C: PWMA->u32CNR3 = 0; PWMA->u32CMR3 = 0; while(PWMA->u32PDR3 != 0); break; default: while(1); } PWMA->u32POE &= ~(1<<ch); PWMA->u32PCR &= ~(1<<(ch*8));}

    标签: pid 电机 bldc

    上传时间: 2022-06-01

    上传用户:kingwide

  • (网盘)C#串口通讯

    源码string和byte的转换(c#).txt - 3.84KBSerialPort相关.txt - 397bytesC#字符串与_byte数据的互相转换.txt - 2.44KBC#串口通信代码.docx - 88.53KBC#串口通信程序.pdf - 354.04KBC#SerialPort通信详细介绍.pdf - 183.38KBC#NET串口通信技术资料汇总.part3.rar - 1.19GBC#NET串口通信技术资料汇总.part2.rar - 2.00GBC#NET串口通信技术资料汇总.part1.rar - 2.00GBC#.NET串口通信设计实例.rar - 40.47MBWindowsFormsApplication1WindowsApplication1简易串口调试助手.rar - 46.78KB

    标签: C# 串口通讯

    上传时间: 2022-06-05

    上传用户:trh505

  • AT89C51单片机编写的C代码,用proteus设计电路仿真案例

    采用C代码编写的8位LED流水灯程序,附件是用PROTEUS设计的仿真电路工程,直接可以使用。请用Proteus 8以上版本。下面是验证好的源代码,供大家参考学习:------------------------------------------#include <reg51.h>void main(){LED;t0,t1,t2,t3,t4,t5,t6,t7;LED=P1;P1=0xFF;while(10){P1=0xFE;for(t0=10;t0<25000;t0++){;}P1=0xFD;for(t1=0;t1<25000;t1--) {;}P1=0xFB;for(t2=0;t2<25000;t2++) {;}P1=0xF7;for(t3=0;t3<25000;t3--) {;}P1=0xEF;for(t4=0;t4<25000;t4++) {;}P1=0xDF;for(t5=0;t5<25000;t5--){;}P1=0xBF;for(t6=0;t6<25000;t6++){;}P1=0x7F;for(t7=0;t7<25000;t7++){;}P1=0xBF;for(t6=0;t6<25000;t6++){;}P1=0xDF;for(t5=0;t5<25000;t5++){;}P1=0xEF;for(t4=0;t4<25000;t4++) {;}P1=0xF7;for(t3=0;t3<25000;t3++) {;}P1=0xFB;for(t2=0;t2<25000;t2++) {;}P1=0xFD;for(t1=0;t1<25000;t1++){;}P1=0xFE;}} ----------------------------------------------------

    标签: at89c51 单片机 proteus 电路仿真

    上传时间: 2022-06-09

    上传用户:zhanglei193

  • STM32F103驱动W5500网络程序

    #include "W5500.h"/***************----- 网络参数变量定义-----***************/unsigned char Gateway_IP[4];// 网关IP 地址unsigned char Sub_Mask[4]; // 子网掩码unsigned char Phy_Addr[6]; // 物理地址(MAC)unsigned char IP_Addr[4]; // 本机IP 地址unsigned char S0_Port[2]; // 端口0 的端口号(5000)unsigned char S0_DIP[4]; // 端口0 目的IP 地址unsigned char S0_DPort[2]; // 端口0 目的端口号(6000)unsigned char UDP_DIPR[4]; //UDP( 广播)模式,目的主机IP 地址unsigned char UDP_DPORT[2]; //UDP( 广播)模式,目的主机端口号/***************----- 端口的运行模式-----***************/unsigned char S0_Mode =3; // 端口0 的运行模式,0:TCP 服务器模式,1:TCP 客户端模式,2:UDP(广播)模式#define TCP_SERVER 0x00 / /TCP服务器模式#define TCP_CLIENT 0x01 / /TCP客户端模式#define UDP_MODE 0x02 / /UDP(广播)模式

    标签: stm32f103 驱动 w5500

    上传时间: 2022-06-23

    上传用户:

  • FreeRTOS移植PIC18F25K22全过程详解

    1 准备1.1 硬件和编译环境1.1.1 开发板硬件选用PIC18F25K22,在淘宝上可以买到开发板, LIXUE 工作室出品的。价格在140 左右。1.1.2 IDE编译环境为MPLAB IDE V8.87C 编译器为MCC18,版本号为3.38(以上编译环境均由开发板中的光盘提供)1.1.3 仿真器PICkit3,同一家店买的1.2 FreeRTOS 相关移植文件准备1.2.1 下载移植文件在Microchip 官网下载通用移植文件http://embeddedcodesource.com/rtos我是选了下面这个,点击download 即可下载,解压后里面存在如下文件,1.2.2 查找有用的文件下载到的FreeRTOS为6.0.4 版本1)找到三个.c 文件如上图所示,解压后,主要的文件在FreeRTOS\Source文件夹中,如下所示:其中list.c , queue.c ,tasks.c 无需修改,作为主要的FreeRTOS的文件,2)找到与.c 文件对应的.h 文件如下图所示,与之对应的在FreeRTOS\Source\include文件夹中:找到list.h , queue.h ,tasks.h,也无需修改。3)另外还有用的文件包括FreeRTOS.h , portable.h ,projdef.h4)找到heap_1.c找到FreeRTOS\Source\portable\MemMang文件夹里面5)移植修改文件主要包括port.c portmacro.h,在找到FreeRTOS\Source\portable\MPLAB\PIC18F文件夹里面6)其他文件在FreeRTOS_C18\FreeRTOS PrimerEjemplo文件夹中包含了主体的Demo 工程文件,关注FreeRTOSConfig.h,还有两个.lkr 链接文件。2 示例Demo 说明点开FreeRTOS_C18\FreeRTOS PrimerEjemplo 文件夹中的.mcw 工程文件,发现提示丢失文件,如下所示,其实是定位出现文件,依次对应步骤1.2.2 中的各个文件夹位置查找,重新定位即可,定位好之后,编译即可通过,

    标签: freertos

    上传时间: 2022-06-24

    上传用户:

  • Keil环境中建立带FreeRTOS的STM32L项目.

    Keil环境中建立带FreeRTOS的STM32L项目1、先把source文件夹复制至project目录,然后在keil中添加RTOS文件,如图:其中heap_2.c按需选择,可以是heap_1.c等,若需 croutine型任务则还需添加croutine.c文件。2、添加include目录,位于 source下的include文件夹。3、把FreeRTOSConfig.文件复制到source下的indude文件夹,或者其他用户文件夹下也可,这是FreeRTOS的功能配置文件,要按需修改的。4、为了能连接到portmacro.h文件,还需添加include路径Source lportable\RVDS\ARM_CM35、以下移植步骤细节需参考“FreeRTOS在STM32上的移植V1.0”。首先修改PORTMACRO.H文件。基本不用修改。6、port.c文件也基本不用修改。7、PORTASM.S文件在keil环境是不需要的,相关的函数放在了portc文件中。8、修改startup文件(要选择对应芯片的文件,并且要先取消其只读属性):SVC_Handler修改为vPortSVCHandler PendSV_Handler 修改为xPortPendSVHandler SysTick_Handler修改为xPortSys TickHandler

    标签: keil freertos stm32

    上传时间: 2022-06-27

    上传用户:

  • STM8库编程的方法总结

    经过几天的摸索我终于掌握用STM8库的方法,但我还认为不用库也很好,1.首先要装好ST8的开发环境,一个是ST Visual Develop一个是COSMIC stm8C语言编译器.第三把STM8的库下下来2.建立一个新的环境和一个工程,当然工程和环境可同名3.这一点是关键,把STM8库下的*FWLib/project\STVDCosmic STM8_interrupt_vetor.c考到你的新工程目录下4.打开库中的example目录下的一个例子,把除了STM8_interrupt_vetor.c的所有东东考到你的工程下边5,然后把要涉及的文件包进去,这里注意当编译时提示,没有函数时,大家把函数名考一下,到库CHM文件索引下,然后把C文件包含到include6.这时编译大功告成了

    标签: stm8

    上传时间: 2022-07-06

    上传用户:

  • 4G移动通信技术权威指南:LTE与LTE-Advanced.4G LTE.LTE

    PrefaceDuring the past years, there has been a quickly rising interest in radio access technologies for providingmobile as well as nomadic and fixed services for voice, video, and data. The difference indesign, implementation, and use between telecom and datacom technologies is also becoming moreblurred. One example is cellular technologies from the telecom world being used for broadband dataand wireless LAN from the datacom world being used for voice-over IP.Today, the most widespread radio access technology for mobile communication is digital cellular,with the number of users passing 5 billion by 2010, which is more than half of the world’s population.It has emerged from early deployments of an expensive voice service for a few car-borne users,to today’s widespread use of mobile-communication devices that provide a range of mobile servicesand often include camera, MP3 player, and PDA functions. With this widespread use and increasinginterest in mobile communication, a continuing evolution ahead is foreseen.This book describes LTE, developed in 3GPP (Third Generation Partnership Project) and providingtrue 4G broadband mobile access, starting from the first version in release 8 and through the continuingevolution to release 10, the latest version of LTE. Release 10, also known as LTE-Advanced,is of particular interest as it is the major technology approved by the ITU as fulfilling the IMTAdvancedrequirements. The description in this book is based on LTE release 10 and thus provides acomplete description of the LTE-Advanced radio access from the bottom up.Chapter 1 gives the background to LTE and its evolution, looking also at the different standardsbodies and organizations involved in the process of defining 4G. It also gives a discussion of the reasonsand driving forces behind the evolution.Chapters 2–6 provide a deeper insight into some of the technologies that are part of LTE and itsevolution. Because of its generic nature, these chapters can be used as a background not only for LTEas described in this book, but also for readers who want to understand the technology behind othersystems, such as WCDMA/HSPA, WiMAX, and CDMA2000.Chapters 7–17 constitute the main part of the book. As a start, an introductory technical overviewof LTE is given, where the most important technology components are introduced based onthe generic technologies described in previous chapters. The following chapters provide a detaileddescription of the protocol structure, the downlink and uplink transmission schemes, and the associatedmechanisms for scheduling, retransmission and interference handling. Broadcast operation andrelaying are also described. This is followed by a discussion of the spectrum flexibility and the associated

    标签: 4g 移动通信

    上传时间: 2022-07-08

    上传用户: