-
-
13
-
7
-
0430+8025t很省电,15天从4v26掉到4v19
-
0电路学的核心在于基尔霍夫定律 把基尔霍夫定律吃透,整本书都透了。不用管电抗电感、一阶二阶都是一个道理。所有内容都是围绕着这两条展开的。 简单来讲,电路学讲的是电路的某一个瞬间的值。在这个时间点上展开各种计算。电容考虑比电阻提前1/4个周期,电感比电阻滞后1/4个周期。然后比较两个之间量的大小,就成了不同的角度。这样简化后,看到电容电感的相关内容,都按照电阻考虑,只是写的过程中不一样而已,这样就方便学习了。
-
0/* * Copyright (c) 2009-2022 Arm Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissi
-
0#include "lcd.h" #include "lcd_init.h" #include "lcd_init.h" #include "perf_counter.h" #include "stm32f10x_gpio.h" #include "stm32f10x_rcc.h" #include "stm32f10x_spi.h" #include "stm32f10x_rcc.h" #include "stm32f10x_conf.h" #include <stdint.h> #include <stddef.h> #include <stdbool.h> #define SYS_CLOCK_MHZ(36) #define SPI_ST7789_SPISPI1 #define SPI_ST7789_SPI_APBxClock_FUNRCC_APB2PeriphClockCmd #define SPI_ST7789_SPI_CLKRCC_APB2Periph_SPI1 #define SPI_ST7789_GPIO_APBxClock_FUNRCC_APB2Peri
-
0//数组实现链表 typedef int PtrToNode; typedef PtrToNode List; typedef PtrToNode Position; typedef int ElementType; #define SPACESIZE 11 struct Node{ ElementType element; Position next; }; struct Node CursorSpace[SPACESIZE]={{0,1},{0,2},{0,3},{0,4},{0,5},{0,6},{0,7},{0,8},{0,9},{0,10},{0,0}}; static Position CursorAlloc(void){ Position P; P = CursorSpace[0].next; CursorSpace[0].next = CursorSpace[P].next; return P; } static Position CursorFree(Position P){ CursorSpace[P].next = CursorSpace[0].next; CursorSpace[0].next = P; } bool isEmpty(List L){ return CursorSpace[L].next == 0; } //是
-
5记录一些好的名言名句!!!!!!!!
-
0单项链表 typedef int ElementType; struct Node; typedef struct Node* PtrToNode; typedef PtrToNode List; typedef PtrToNode Position; Position Header(List L); Position First(List L); Position Advance(Position P);//前进 ElementType Retrive(Position P);//检索 #endif struct Node{ ElementType element; Position next; }; bool isEmpty(List L){ return L->next == NULL; } //是否是最后一个元素 bool isLast(Position P,List L){ return P->next == NULL; } //查找链表中的元素 Position ListFind(ElementType X,List L){ Position P; P = L ->next; while( P != NULL && P->eleme
-
6可以简单分析赋值语句 如:char a = 10; 生成AST树 const char* const AST_string[] = { "CharDeclaration", "AssignmentExp", "IntLiteral", }; enum syntactic_parser_types{ CharDeclaration = 0, AssignmentExp, Ast_IntLiteral, }syntactic_parser_type; typedef Save_Token_t tokens_fun_t(void); typedef struct tokens_fun{ tokens_fun_t *peek; tokens_fun_t *read; }Token_fun; static int save_token_read_index = 0; Save_Token_t token_peek(void){ if(save_token_read_index >= save_token_index){ //return NULL; } return Mytokens[save_token_read_index]; } Save_Token_t t
-
2简单实现了一个词法分析器,可以解析 money > 45 money >= 45 两条语句 enum token_enum_states{ Init = 0, Id,//abc_ IntLiteral,//1123 GT,//> GE,//>= ERR }token_enum_state = Init; typedef void Fun_append(char ch); typedef struct token{ enum token_enum_states type; char text[20]; Fun_append* append; }Token; Token new_token; static char index = 0; void my_append(char ch){ new_token.text[index] = ch; index++; } void init_index(){ char i; index = 0; for(i = 0; i < 20; i++){ new_token.text[i] = 0; } } #define bool char #define TRUE 1 #define FALSE 0 bool is_alpha(char
-
3在B站BV19v411n7mN基础上添加了充电模块,主控芯片使用ESP32,并配置了调参上位机,可以很方便的通过wifi无线调参。无刷控制使用灯哥开源FOC。制作出一个方便复刻的自平衡莱洛三角形,在桌面上作为一个摆件还是非常不错的。开源链接:https://gitee.com/coll45/foc立创原理图及PCB:https://lceda.cn/45coll/zi-ping-heng-di-lai-luo-san-jiao_10-10-b
-
1入门级foc学习网站 http://simplefoc.cn/#/simplefoc_translation/1首页.md
-
1
-
10
-
0
-
0
-
1#include<reg51.h> #include<lcd.h> sbit P3_3 = P3^3; sbit P2_7 = P2^7; bit pw_flag;//密码正确与否 unsigned char str1[]="password:";//第一行显示的 unsigned char str2[]={0,0,0,0,0,0,0,0};//写入密码 unsigned char str3[]={0,0,0,0,0,0}; //密码初始值 unsigned char KeyDriver(); void KeyAction(unsigned char x); void Passwordsetup(); void delay(unsigned int i) { unsigned int k; for(k=0;k<i;k++); } void main() { unsigned char key; InitLcd1602();//初始化LCD160 LcdShowStr(0,0,str1);//password: ****** 第一行第一列 LcdWriteCmd(0xC0); // LcdShowStr(1,0
-
1#include<reg52.h> #include <intrins.h> #include "stdio.h" #define uchar unsigned char #define uint unsigned int #define LED_DATA P2 sbit SCK= P1^7; sbit RCK= P1^6; sbit SER= P1^5; void delay_ms(uint time){ uint i,j; for(i = 0; i < time; i++){ for(j = 0; j < 10; j++); } } char code font7_8[10][7]={ 0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,//0;"0",0 0xFF,0xFF,0xBD,0xBD,0x81,0xBF,0xBF,//0;"1",1 0xBF,0x93,0x9D,0xAD,0xB5,0x99,0xFF,//0;"2",2 0xDF,0xBB,0xAD,0xAD,0xA5,0xC9,0xFF,//0;"3",3 0xCF,0xD7,0xDB,0x9B,0x81,0xDF,0xDF,//0;"4"
-
0void key_task(); extern uchar condition; //È«¾Ö±äÁ¿ char yun_flag='+';//ÔËËã·ûºÅ yun_flag £¨Ä¬ÈÏΪ+ £© char data c_num[15]=" ";//c_num1 ×Ö·ûÐ͵ÚÒ»²Ù×÷Êý (Êý×é²»¶¨Òå´óСÓëÆäËû±äÁ¿³åÍ») //char data c_num2[15]=" ";//c_num2 ×Ö·ûÐ͵ڶþ²Ù×÷Êý char error;//ÔËËã·¨Ôò´íÎó£» void refresh(); //===================================================== void DelayUs(unsigned char us)//delay us { unsigned char uscnt; uscnt=us>>1; /*12MHzƵÂÊ*/ while(--uscnt); } /**************
-
0void key_task(); extern uchar condition; //È«¾Ö±äÁ¿ char yun_flag='+';//ÔËËã·ûºÅ yun_flag £¨Ä¬ÈÏΪ+ £© char data c_num1[15]=" ";//c_num1 ×Ö·ûÐ͵ÚÒ»²Ù×÷Êý (Êý×é²»¶¨Òå´óСÓëÆäËû±äÁ¿³åÍ») char data c_num2[15]=" ";//c_num2 ×Ö·ûÐ͵ڶþ²Ù×÷Êý char error;//ÔËËã·¨Ôò´íÎó£» void refresh(); //===================================================== void DelayUs(unsigned char us)//delay us { unsigned char uscnt; uscnt=us>>1; /*12MHzƵÂÊ*/ while(--uscnt); } /***************
-
0================================== 考研数学 张宇30讲 武忠祥660 李林880 汤家凤1800 直接660+880+1800,全刷完上个双非没问题 ============================ 自动控制原理呢 卢京潮 ====================== C语言 c primer plus c与指针,c陷阱与缺陷,cppreference cppreference是编译器的实现,在网上搜,有c的实现的 最好这些看完去看汇编,x86的,能够更加深入理解c
-
0void key_task(); extern uchar condition; //È«¾Ö±äÁ¿ char yun_flag='+';//ÔËËã·ûºÅ yun_flag £¨Ä¬ÈÏΪ+ £© char data c_num1[15]=" ";//c_num1 ×Ö·ûÐ͵ÚÒ»²Ù×÷Êý (Êý×é²»¶¨Òå´óСÓëÆäËû±äÁ¿³åÍ») char data c_num2[15]=" ";//c_num2 ×Ö·ûÐ͵ڶþ²Ù×÷Êý char error;//ÔËËã·¨Ôò´íÎó£» void refresh(); //===================================================== void DelayUs(unsigned char us)//delay us { unsigned char uscnt; uscnt=us>>1; /*12MHzƵÂÊ*/ while(--uscnt); } /***************
-
0卡尔曼滤波程序 // Kalman Filter float EstimateErrorLast; float EstimateValueLast; void KalmanFilterInit(void) { EstimateValueLast=80; EstimateErrorLast=10; } int KalmanFilter(int MeasureValue) { float MeasureError; float EstimateValue; float EstimateError; float KalmanGain; int KalmanFilterData; MeasureValue = MeasureValue; MeasureError=MeasureValue*0.2; KalmanGain = EstimateErrorLast/(EstimateErrorLast + MeasureError); EstimateValue = EstimateValueLast + KalmanGain*(MeasureValue-EstimateValueLast); EstimateError = (1-KalmanGain)*EstimateErrorLast; EstimateValueLast = EstimateValue; Es
-
0仿真原理图如下 程序如下 sbit P3_0 =P3^0; unsigned char LedChar[]= //0-F { 0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8, 0x80,0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E }; void delay(unsigned long int i) { unsigned long int k; for(k=0;k<i;k++); } unsigned int KeyDriver(); void KeyAction(unsigned int x); bit flag; void main() { unsigned int A; P0 = 0x0f; P1=LedChar[0]; P3_0 = 1; while(1) { A=KeyDriver(); if(A) KeyAction(A-1); } } #define High_PORT P0 #define Low_PORT P2 unsigned int KeyDriver() { unsigned char i; unsigned int back; unsigned char P2_data = 0; Low_PORT=0xF0;// P2: 1111 0000 if((H
-
0//SCL<->PB7 //SDA<->PB8 //IM<->PB9 sbit IIC_SCL = P1^0; sbit IIC_SDA = P1^1; //???IIC void IIC_Init(void) { IIC_SCL=1; IIC_SDA=1; } void delay_us(char num) { _nop_();_nop_();_nop_();_nop_(); _nop_();_nop_();_nop_();_nop_(); _nop_();_nop_();_nop_();_nop_(); _nop_();_nop_();_nop_();_nop_(); } //??IIC???? void IIC_Start(void) { //SDA_OUT(); //sda??? IIC_SDA=1; IIC_SCL=1; delay_us(4); IIC_SDA=0;//START:when CLK is high,DATA change form high to low delay_us(4); IIC_SCL=0;//??I2C??,????????? } //??IIC???? void IIC_Stop(void) { //SDA_OUT();//sda??? IIC_SCL=0; IIC_SDA=0;//STOP:when C
-
0sbit K0=P3^4; sbit K1=P3^5; sbit K2=P3^2; sbit K3=P3^3; sbit K4=P2^1; sbit K5=P2^2; char get_key0(){ static char key_flag = 0,num=0; switch(key_flag){ case 0: key_flag = 1; num=0; //break; case 1: if((K0 == 0) ){ key_flag = 2; } break; case 2: num++; if(num > 3){ key_flag = 3; } break; case 3: if((K0 == 0) ){ key_flag = 4; }else{ key_flag = 0; } break; case 4: if((K0 == 0)){ num = 1; }else{ key_flag = 0; return 1; } break; } return 0; } char get_key1(){ static char key_flag = 0,num=0; switch(key_flag){ case 0: key_flag = 1; num=0; //break; case 1: if((K1 == 0) ){ key_flag = 2; } break; case
-
1今天跟着大佬学习了一下单片机,开心😁
-
0
-
2有人说 几天就学会单片机,也不是不可以,但需要基础和足够高的领悟能力。单片机毕竟是专业知识, 大部人学习单片机要么是出于爱好,要么是为了工作,不管出于哪种目的,学习必须要循序渐进,可以尝试加快脚步, 但是没有捷径。 欲速则不达,相信大家都明白这个道理,有人说,我马上要做个工程,我要快速学好单片机, 怎么办?仔细想想,拿到一个新买的手机仅仅使用这些功能还要花好长时间操作研究,并且要仔细阅读说明书才行。 何况
-
2有人说 几天就学会单片机,也不是不可以,但需要基础和足够高的领悟能力。单片机毕竟是专业知识,大部人学习单片机要么是出于爱好,要么是为了工作,不管出于哪种目的,学习必须要循序渐进,可以尝试加快脚步,但是没有捷径。# e: E5 j2 _. C 欲速则不达,相信大家都明白这个道理,有人说,我马上要做个工程,我要快速学好单片机,怎么办?仔细想想,拿到一个新买的手机仅仅使用这些功能还要花好长时间操作研究,并且要仔细阅读说明书才
-
0亲爱的各位吧友:欢迎来到嵌入式单片机设计