zoukankan      html  css  js  c++  java
  • 11月-1日

    documentclass[UTF8]{ctexart}

    %documentclass{article}

    itle{2019 年 10 月 23 日---{ oday}实习总结}

    author{雷贻山}

    usepackage[utf8]{inputenc}

    usepackage{ctex}

    date{ oday}

    usepackage{geometry}

    geometry{a4paper,left=1cm,right=2cm,top=2cm,bottom=1cm}

    usepackage{graphicx}

    usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,urlcolor=black]{hyperref}

    egin{document}

    maketitle

    ableofcontents

    section{10月23日}

    subsection{安装了keil软件,st-link驱动}

    subsection{阿波罗板子是程序只能烧录F429的例程}

    subsection{keil串口下载只能一次打开一个,否则串口被占用}

    subsection{学习结构体构造类型}

    includegraphics[scale=0.6]{struct.png}

    subsection{学习位操作基本运算}

    subsection{e.g 1 extless extless3意思是把1左移3位,右边补0,得到1*2*2*2=8}

    section{10月24日}

    subsection{inc ,arc,mise.c文件含义}

    subparagraph{inc里面装的是外设头文件, src里面装的是库函数源文件,中断文件是 mise.c}

    subsection{学习了GPIO常见库函数}

    subparagraph{I/O 引脚可以被软件设置成各种 不同的功能 ,如输入或输出,所以被称为 GPIO(General-purpose I/O)。而 GPIO 引脚又被分为GPIOA、GPIOB,GPIOG 不同的组,每组端口分为 0到15}

    subsection{三个参数}

    egin{center}

    includegraphics[scale=0.8]{gpio.png}

    end{center}

    subsection{串口}

    subparagraph{串口通信(Serial Communications)的概念非常简单,串口按位(bit)发送和接收字节的通信方式

    串行接口是一种可以将接收来自CPU的并行数据字符转换为连续的串行数据流发送出去,同时可将接收的串行数据流转换为并行的数据字符供给CPU的器件。可以串转并,并转串}

    subsection{串口初始化}

    egin{center}

    includegraphics[scale=0.6]{uart_init.png}

    end{center}

    section{10月24日}

    subsection{使用串口助手能打印printf里面的函数是因为,调用了usart.h头文件}

    includegraphics[scale=0.5]{usart_able.png}

    subsection{keil不能使用中文注释}

    includegraphics[scale=0.6]{mess_code.png}

    subparagraph{点击edit,找到最下方的configuration,在Editor页面,可以看到General Editor Setting 下方有一个Encoding,这里有许多的选项,选择Chinese GB2312(Simplified).点击OK即可输入中文注释}

    subsection{串口调试注释要数据位必须是8位才能接收到汉字,否则是乱码}

    includegraphics[scale=0.6]{tiaoshi.png}

    subsection{定时器实验中,while 0 只闪一次,不再循环}

    includegraphics[scale=0.5]{only_one.png}

    subsection{查看pin引脚复用,搜索alternate function}

    includegraphics[scale=0.5]{alternate.png}

    section{10月25日}

    subsection{Keil无法展开HALLIB里面的.c文件里面的.h文件}

    includegraphics[scale=0.5]{build.png}

    subparagraph{重新build 一下就好}

    subsection{keils文件消失不见}

    includegraphics[scale=0.5]{filehide.png}

    section{10月26日-11月1日}

    subsection{以体积,精度,价格三个指标来寻找pm2.5的模块}

    subparagraph{对比了6种pm2.5模块最终确定了sps30}

    subsection{仔细阅读了sps30重要参数}

    section{sps30重要参数}

    subsection{working principle}

    subparagraph{Laser scattering}

    subsection{life span}

    subparagraph{More than eight years}

    subsection{size}

    subparagraph{41 x 41 x 12 mm}

    subsection{Important parameters}

    egin{center}

    egin{tabular}{ p{5cm} p{2cm}p{2cm}p{5cm}p{1cm}}

    hline

    parameter & value & unit & Remarks \

    hline

    voltage& 4.5-5&V & -- \

    Idle current & <8 & mA & Idle mode \

    Average current & 60 & mA & -- \

    Precision & $pm$ 10 & ug/m & 0-100ug/ m \

    concentration & $pm$ 10 & $\%$ & 100-1000ug/ m \

    I/Opin (RX/SDA,TX/SCL) & -0.3-5.5 & V & \

    max IO pin current & 16 & mA & \hline

    end{tabular}

    end{center}

    subsection{Pin parameter}

    egin{center}

    egin{tabular}{ p{1cm} p{2cm}p{5cm}p{6cm}p{1cm}}

    hline

    pin & name & description & remark \

    1 & VDD &Support voltage & 5V $pm$ 10$\%$ \

    2 & RX & UART Communication acceptance pin & TTL 5V and LVTTL 3.3V compatible \

    & SDA & I2CSerial data output pin & TTL 5V and LVTTL 3.3V compatible \

    3 & TX & UART Communication transmit pin & TTL 5V and LVTTL 3.3V compatible \

    & SCL & I2C Serial clock input & TTL 5V and LVTTL 3.3Vcomatible \

    4 & SEL & Interface selection & Floating mode selsection UART \&&&Grounding mode selection I2C \

    5 & GND & Grounding mode selection & -- \

    hline

    end{tabular}

    end{center}

    subsection{ Typical UART application circuit.}

    subparagraph{Both SCL and SDA lines are open drain I/Os. They should be connected to external pull-up resistors (e.g. Rp = 10 $ Omega $).}

    subparagraph{in order to correctly select I2C as interface, the interface select (SEL) pin must be pulled to GND before or at the same time the sensor is powered up.}

    egin{center}

    includegraphics[scale=0.6]{uart.png}

    subsection{Set Pointer Read Data}

    subsection{Set Pointer Write Data}

    subsection{Checksum Calculation}

    subsection{I 2 C Commands}

    subsection{Read Measured Values}

    end{center}

    section{11月1日}

    subsection{u32强制转换成8字节位32位数}

    includegraphics[scale=0.8]{u32trans.png}

    subparagraph{SCB- extgreater AIRCR 是一个整体,是结构体SCB中的一个元素地址等于0x05FA0000}

    subsection{MODER,OSPEEDR,PURDR,寄存器每两位控制一个IO端口}

    includegraphics[scale=0.4]{twocontrol.png}\

    includegraphics[scale=0.5]{move11chen2.png}

    subparagraph{每个寄存器控制一组GPIO16个管脚,所谓管脚的状态 体现在 位运算平移的位置与平移的值,平移的值不同确定状态不同,平移的位置不同决定管脚不同}

    subsection{GPIO端口设置函数}

    includegraphics[scale=0.5]{pinsetfuc.png}

    subparagraph{注意BITx是待测端口pinpos是程序顺序检测的端口}

    subparagraph{嵌入式就是与或非操作寄存器的0和1}

    subparagraph{复用AF是四位一组,寄存器一共32位控制8个IO,IO模式寄存器是2位一组控制16个IO}

    subsection{管脚AF复用状态的设置}

    includegraphics[scale=0.5]{affuc.png}

    subparagraph{GPIO- extgreater AFR[1]是一个结构体~取反的意思就是把第12位寄存器全部变成4个0}

    subparagraph{0x0f extless extless12是把1111送到高8位15送到15 extless3等于pin11的位置去,}

    subparagraph{12 extless extless 12 是要把AF第12个复用状态SDIO送给第12管脚pin11}

    end{document}

  • 相关阅读:
    【剑指Offer】面试题55
    一大波趣图:CSS的力量
    你必须收藏的Github技巧
    3月份GitHub上最热门的Java开源项目
    趣图:快下班了,剩一个bug,修复一下再走
    Java程序员必备的Intellij插件
    为什么前后端分离了,你比从前更痛苦?
    趣图:好好干,今天再加个班
    高并发下的下单功能设计
    Mybatis的基本要素--核心对象
  • 原文地址:https://www.cnblogs.com/china520/p/11778456.html
Copyright © 2011-2022 走看看