為適應(yīng)雙向DC/DC功率變換的電流采樣需求,一種高精度高邊電流采樣電路被提出。其基本思想是在功率電路的高邊串入采樣電阻,借助電流鏡原理并引入偏置電流電路,將雙向電流均轉(zhuǎn)換為正向電壓輸出。通過(guò)理論分析與仿真結(jié)合的方法對(duì)電流鏡采樣原理及4種不同的偏置電流電路方案進(jìn)行對(duì)比,最后通過(guò)實(shí)驗(yàn)數(shù)據(jù)驗(yàn)證了高精度高邊電流采樣電路的有效性。實(shí)驗(yàn)數(shù)據(jù)表明,該采樣電路可在-25~75℃的溫度工作范圍內(nèi),針對(duì)-10~+10 A范圍內(nèi)的電流采樣實(shí)現(xiàn)優(yōu)于5%的采樣精度。Current sensing plays an important role in controlling,monitoring or protection functions of power systems.To meet the current sensing requirement of bidirectional DC/DC converters,a high-accuracy bidirectional current sensing circuit is proposed.The proposed current sensing circuit inserts a resistor in the path of the current to be sensed,while the current mirror and biased current circuit are introduced.Therefore,the bidirectional current can be expressed by positive voltage.By theoretical analysis and simulation,the sampling theory is analyzed and four biased current circuits are compared.At last,experimental results verified the proposed method.It is demonstrated that the proposed current sensing circuit can achi...
上傳時(shí)間: 2022-04-22
上傳用戶:
一本介紹計(jì)算機(jī)底層原理的書(shū)籍,從邏輯門開(kāi)始構(gòu)建一臺(tái)計(jì)算機(jī)!
標(biāo)簽: 計(jì)算機(jī)內(nèi)部原理
上傳時(shí)間: 2022-04-30
上傳用戶:
STM32F103開(kāi)發(fā)板 DHT11溫濕度DS18B20 氣體MQ-2光敏聲控雨滴傳感器實(shí)驗(yàn)程序**--------------------------------------------------------------------------------------------------------** Created by: FiYu** Created date: 2015-12-12** Version: 1.0** Descriptions: DHT11溫濕度傳感器實(shí)驗(yàn) **--------------------------------------------------------------------------------------------------------** Modified by: FiYu** Modified date: ** Version: ** Descriptions: ** Rechecked by: **********************************************************************************************************/#include "stm32f10x.h"#include "delay.h"#include "dht11.h"#include "usart.h"DHT11_Data_TypeDef DHT11_Data;/************************************************************************************** * 描 述 : GPIO/USART1初始化配置 * 入 參 : 無(wú) * 返回值 : 無(wú) **************************************************************************************/void GPIO_Configuration(void){ GPIO_InitTypeDef GPIO_InitStructure; /* Enable the GPIO_LED Clock */ RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE); GPIO_DeInit(GPIOB); //將外設(shè)GPIOA寄存器重設(shè)為缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽輸出 GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_DeInit(GPIOA); //將外設(shè)GPIOA寄存器重設(shè)為缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //推挽輸出 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_SetBits(GPIOB , GPIO_Pin_9); //初始狀態(tài),熄滅指示燈LED1}/************************************************************************************** * 描 述 : 串口顯示實(shí)時(shí)溫濕度 * 入 參 : 無(wú) * 返回值 : 無(wú) **************************************************************************************/void DHT11_SCAN(void){ if( Read_DHT11(&DHT11_Data)==SUCCESS) { printf("\r\n讀取DHT11成功!\r\n\r\n濕度為%d.%d %RH ,溫度為 %d.%d℃ \r\n",\ DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci); //printf("\r\n 濕度:%d,溫度:%d \r\n" ,DHT11_Data.humi_int,DHT11_Data.temp_int); } else { printf("Read DHT11 ERROR!\r\n"); }}/************************************************************************************** * 描 述 : MAIN函數(shù) * 入 參 : 無(wú) * 返回值 : 無(wú) **************************************************************************************/int main(void){ SystemInit(); //設(shè)置系統(tǒng)時(shí)鐘72MHZ GPIO_Configuration(); USART1_Init(); //初始化配置TIM DHT11_GPIO_Config(); // 初始化溫濕度傳感器PB1引腳初始時(shí)為推挽輸出 GPIO_ResetBits(GPIOB , GPIO_Pin_9); delay_ms(500); while(1) { GPIO_SetBits(GPIOB , GPIO_Pin_9); DHT11_SCAN(); //實(shí)時(shí)顯示溫濕度 delay_ms(1500); } }
上傳時(shí)間: 2022-05-03
上傳用戶:得之我幸78
宏晶 STC15F2K60S2開(kāi)發(fā)板配套軟件源碼 基礎(chǔ)例程30例/**********************基于STC15F2K60S2系列單片機(jī)C語(yǔ)言編程實(shí)現(xiàn)使用如下頭文件,不用另外再包含"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和數(shù)碼管選擇引腳 高:LED有效 低:數(shù)碼管有效 // SEL連接的單片機(jī)引腳必須為帶有上拉電阻的引腳 或?qū)⑵渲苯舆B接VCC#define data P2 // 數(shù)據(jù)輸入定義 /**********************函數(shù)名稱:Delay_1ms功能描述:延時(shí)入口參數(shù):unsigned int t 表示要延時(shí)t個(gè)1ms 出口參數(shù):無(wú)備注:通過(guò)參數(shù)t,控制延時(shí)的時(shí)間長(zhǎng)短***********************/void Delay_1ms(uint t){ uchar j; for(;t>0;t--) for(j=110;j>0;j--) ;}/**********************函數(shù)名稱:Led_test功能描述:對(duì)8個(gè)二極管進(jìn)行測(cè)試,依次輪流點(diǎn)亮8個(gè)二極管入口參數(shù):無(wú)出口參數(shù):無(wú)備注: ***********************/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; } }}/***********************主函數(shù)************************/void main(){ ///////////////////////////////////////////////// //注意: STC15W4K32S4系列的芯片,上電后所有與PWM相關(guān)的IO口均為 // 高阻態(tài),需將這些口設(shè)置為準(zhǔn)雙向口或強(qiáng)推挽模式方可正常使用 //相關(guān)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設(shè)為推挽 Led_test(); }
標(biāo)簽: STC15F2K60S2
上傳時(shí)間: 2022-05-03
上傳用戶:
本設(shè)計(jì)由數(shù)據(jù)顯示模塊、溫度采集模塊、時(shí)間處理模塊和調(diào)整設(shè)置模塊四個(gè)模塊組成。系統(tǒng)以AT89S52單片機(jī)為控制器,以串行時(shí)鐘日歷芯片DS1302記錄日歷和時(shí)間,它可以對(duì)年、月、日、時(shí)、分、秒進(jìn)行計(jì)時(shí),還具有閏年補(bǔ)償?shù)榷喾N功能。溫度采集選用DS18B20芯片,萬(wàn)年歷采用直觀的數(shù)字顯示,數(shù)據(jù)顯示采用1602A液晶顯示模塊,可以在LCD上同時(shí)顯示年、月、日、星期、時(shí)、分、秒,還具有時(shí)間校準(zhǔn)等功能。此萬(wàn)年歷具有讀取方便、顯示直觀、功能多樣、電路簡(jiǎn)潔、成本低廉等諸多優(yōu)點(diǎn),具有廣闊的市場(chǎng)前景。//*******************主函數(shù)**************************//***************************************************void main(){uint i;lcd_init(); //調(diào)用液晶屏初始化子函數(shù)ds1302_init(); //調(diào)用DS1302時(shí)鐘的初始化子函數(shù)for(i=0;i<RsBuf_N;i++)RsBuf[i]='0';Uart_init(); //調(diào)用定時(shí)計(jì)數(shù)器的設(shè)置子函數(shù)while(1) //無(wú)限循環(huán)下面的語(yǔ)句:{ keyscan(); //調(diào)用鍵盤掃描子函數(shù)GPS_TIME();//獲取gps時(shí)間 }}
標(biāo)簽: 單片機(jī) gps 萬(wàn)年歷
上傳時(shí)間: 2022-05-07
上傳用戶:
本設(shè)計(jì)由數(shù)據(jù)顯示模塊、溫度采集模塊、時(shí)間處理模塊和調(diào)整設(shè)置模塊四個(gè)模塊組成。系統(tǒng)以AT89S52單片機(jī)為控制器,以串行時(shí)鐘日歷芯片DS1302記錄日歷和時(shí)間,它可以對(duì)年、月、日、時(shí)、分、秒進(jìn)行計(jì)時(shí),還具有閏年補(bǔ)償?shù)榷喾N功能。溫度采集選用DS18B20芯片,萬(wàn)年歷采用直觀的數(shù)字顯示,數(shù)據(jù)顯示采用1602A液晶顯示模塊,可以在LCD上同時(shí)顯示年、月、日、星期、時(shí)、分、秒,還具有時(shí)間校準(zhǔn)等功能。此萬(wàn)年歷具有讀取方便、顯示直觀、功能多樣、電路簡(jiǎn)潔、成本低廉等諸多優(yōu)點(diǎn),具有廣闊的市場(chǎng)前景。 設(shè)計(jì)要求:(1)用4個(gè)按鍵實(shí)現(xiàn)所有功能,計(jì)時(shí)準(zhǔn)確。(2)可以設(shè)定鬧鐘功能。(3)有陰歷功能,平年閏年準(zhǔn)確無(wú)誤。(4)液晶能顯示年、月、日、星期、時(shí)、分、秒、溫度。//*******************主函數(shù)**************************//***************************************************void main(){uint i;lcd_init(); //調(diào)用液晶屏初始化子函數(shù)ds1302_init(); //調(diào)用DS1302時(shí)鐘的初始化子函數(shù)for(i=0;i<RsBuf_N;i++)RsBuf[i]='0';Uart_init(); //調(diào)用定時(shí)計(jì)數(shù)器的設(shè)置子函數(shù)while(1) //無(wú)限循環(huán)下面的語(yǔ)句:{ keyscan(); //調(diào)用鍵盤掃描子函數(shù)GPS_TIME(); }}
上傳時(shí)間: 2022-05-15
上傳用戶:
用的是沁恒CH552e淘寶買的評(píng)估板,USB中斷上傳程序用的是沁恒提供的做了些修改。程序使用2個(gè)端點(diǎn)一個(gè),端點(diǎn)1作為普通鍵盤,端點(diǎn)2作為多媒體按鍵,有詳細(xì)注釋多媒體按鍵報(bào)告,以下是主函數(shù)內(nèi)容。/****主函數(shù)****/main(){ CfgFsys( ); //CH552時(shí)鐘選擇配置 mDelaymS(5); //修改主頻等待內(nèi)部晶振穩(wěn)定,必加 ConfigT0(2); //配置2ms T0中斷 USBDeviceInit(); //USB設(shè)備模式初始化 EA = 1; //允許單片機(jī)中斷 UEP1_T_LEN = 0; //預(yù)使用發(fā)送長(zhǎng)度一定要清空 UEP2_T_LEN = 0; //清空端點(diǎn)2發(fā)送長(zhǎng)度 FLAG = 0; //清空USB中斷傳輸完成標(biāo)志 Ready = 0; LED_VALID = 1; //給一個(gè)默認(rèn)值 P1_DIR_PU &= 0xE0; //在MOD_OC為0時(shí) p1.5 p1.6 P1.7為推挽輸出 P1_MOD_OC = P1_MOD_OC & ~0xE0; //3個(gè)口的bit4 = 0 p1.5 p1.6 P1.7設(shè)置為推挽輸出 P1_DIR_PU = P1_DIR_PU | 0xE0; //3個(gè)口的bit4 = 1 p1.5 p1.6 P1.7設(shè)置為輸出 key1 = 1; key2 = 1; key3 = 1; while(1) { KeyDrive(); //按鍵驅(qū)動(dòng) }}
上傳時(shí)間: 2022-05-15
上傳用戶:
Vivado設(shè)計(jì)分為Project Mode和Non-project Mode兩種模式,一般簡(jiǎn)單設(shè)計(jì)中,我們常用的是Project Mode。在本手冊(cè)中,我們將以一個(gè)簡(jiǎn)單的實(shí)驗(yàn)案例,一步一步的完成Vivado的整個(gè)設(shè)計(jì)流程一、新建工程1、打開(kāi)Vivado 2013.4開(kāi)發(fā)工具,可通過(guò)桌面快捷方式或開(kāi)始菜單中xilinx DesignTools-Vivado 2013.4下的Vivado 2013.4打開(kāi)軟件,開(kāi)啟后,軟件如下所示:2、單擊上述界面中Create New Project圖標(biāo),彈出新建工程向?qū)Вc(diǎn)擊Next.3、輸入工程名稱、選擇工程存儲(chǔ)路徑,并勾選Create project subdirectory選項(xiàng),為工程在指定存儲(chǔ)路徑下建立獨(dú)立的文件夾。設(shè)置完成后,點(diǎn)擊Next注意:工程名稱和存儲(chǔ)路徑中不能出現(xiàn)中文和空格,建議工程名稱以字母、數(shù)字、下劃線來(lái)組成。4、選擇RTL Project一項(xiàng),并勾選Do not specifty sources at this time,勾選該選項(xiàng)是為了跳過(guò)在新建工程的過(guò)程中添加設(shè)計(jì)源文件。點(diǎn)擊Next.IA5、根據(jù)使用的FPGA開(kāi)發(fā)平臺(tái),選擇對(duì)應(yīng)的FPGA目標(biāo)器件。(在本手冊(cè)中,以xilinx官方開(kāi)發(fā)板KC705為例,Nexys4開(kāi)發(fā)板請(qǐng)選擇Artix-7 XC7A100TCSG324-2的器件,即Family和Subfamily均為Artix-7,封裝形式(Package)為cSG324,速度等級(jí)(Speed grade)為-1,溫度等級(jí)(Temp Grade)為C)。點(diǎn)擊Next6、確認(rèn)相關(guān)信息與設(shè)計(jì)所用的的FPGA器件信息是否一致,一致請(qǐng)點(diǎn)擊Finish,不一致,請(qǐng)返回上一步修改。二、設(shè)計(jì)文件輸入1、如下圖所示,點(diǎn)擊Flow Navigator下的Project Manager->Add Sources或中間Sources中的對(duì)話框打開(kāi)設(shè)計(jì)文件導(dǎo)入添加對(duì)話框。2、選擇第二項(xiàng)Add or Create Design Sources,用來(lái)添加或新建Verilog或VHDL源文件,點(diǎn)擊Next
標(biāo)簽: vivado
上傳時(shí)間: 2022-05-28
上傳用戶:默默
#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));}
上傳時(shí)間: 2022-06-01
上傳用戶:kingwide
This manual documents the Microcontroller profile of version 7 of the ARM? Architecture, the ARMv7-M architecture profile. For short definitions of all the ARMv7 profiles see About the ARMv7 architecture, and architecture profiles on page A1-20.ARMv7 is documented as a set of architecture profiles. The profiles are defined as follows: ARMv7-A The application profile for systems supporting the ARM and Thumb instruction sets, and requiring virtual address support in the memory management model. ARMv7-R The realtime profile for systems supporting the ARM and Thumb instruction sets, and requiring physical address only support in the memory management model ARMv7-M The microcontroller profile for systems supporting only the Thumb instruction set, and where overall size and deterministic operation for an implementation are more important than absolute performance. While profiles were formally introduced with the ARMv7 development, the A-profile and R-profile have implicitly existed in earlier versions, associated with the Virtual Memory System Architecture (VMSA) and Protected Memory System Architecture (PMSA) respectively.
標(biāo)簽: arm
上傳時(shí)間: 2022-06-02
上傳用戶:
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1