Embedded System - APS

| visited times

Basic concepts

Definition

Any device contains microprocessor,like digital clock, hand phone, electric appliance

Short History

  • Embedded system : MIT Whirlwind

    • flight simulation
    • 1940s
  • Embedded device : calculator

    • first Intel 4004
    • 1970s

Main Properties

  • Complicated and special calculation
  • real-time feedback
  • low power and energy consumption
  • sensor information input
  • direct control motor or relay
  • communication between chips and outside

Composition

CPU, Flash, memory, I/O port, function module (beeper, digital tube), Auxiliary circuit( connecting ), power

Programming

  • Clock, interrupter and other function part initialize
  • communication inter chip or with outside program
  • power manage program
  • system application algorithm

Communication technology

  • Inter chips

    • SPI (4 lines) Serial Peripheral Interface

      • 1 to multiple
      • full duplex
      • SDI : data in
      • SDO
      • SCLK : clock
      • CS : 片选

    • I2C ( 2 lines, half duplex ) ( synchronous serial ) 8/10bit

      • SDA
      • SCL

      • 传输步骤

        1. Master发起START
        2. Master发送I2C addr ( 7bit ) 和w操作0 ( 1bit ) , 等待ACK
        3. Slave发送ACK
        4. Master发送reg addr ( 8bit ) , 等待ACK
        5. Slave发送ACK
        6. Master发送data ( 8bit ) , 即要写入寄存器中的数据, 等待ACK
        7. Slave发送ACK
        8. 第6步和第7步可以重复多次, 即顺序写多个寄存器
        9. Master发起STOP
    • RS232 ( asynchronous )

  • Outside

    • RS232 : 3-15V 1,-3~-15 0
    • RS422 : 差分
    • RS485 : 差分, 2-6 1, -2~-6 0
    • CAN
    • Ethernet
    • USB

Components

  • circuit symbol
  • electronic parameter
  • footprint

Resistance value

  • resistor color ring 4/5/6

  • Digital symbol
    “XXn” : $XX\times 10^n {\rm\Omega}$
    R: decimal point

  • Footprint
    Paster ( length, width$\mu m$ )

    • 1mil=0.0254mm, round up
    • 0603 60 and 30mil
      | inch | mm |
      | :–: | :–: |
      | 0201 | 0603 |
      | 0402 | 1005 |
      | 03 | 08 |
      | 04 | 10 |
      | 05 | 12 |
      | 06 | 16 |
      | 08 | 20 |
      | 10 | 25 |
      | 12 | 32 |
      | 18 | 48 |
      | 20 | 50 |
      | 25 | 64 |

PCB Print Circuit Board

Electronic connection between components

  • printed wiring
  • boding pad
  • through hole

CCL Copper-clad plate

sheet copper on insulating material

  • single sided board
  • double sided board
  • multilayer boards

Layer definetion

  • Double layer

    1. GTO Gerber Top Overlay : text explain
    2. GTS Gerber Top Solder : green oil
    3. GTL Gerber Top Layer : electronic connect
    4. GBL Gerber Bottom Layer
    5. GBS Gerber Bottom Solder
    6. GBL Gerber Bottom Layer
    7. GKO Gerber KeepOut : shape forming
    8. DRL : drill hole
  • Multilayer +Midlayer Internlayer

    1. Midlayer 1 G1 : 1st electronic connect
    2. Midlayern Gn : nth electronic connect
    3. Internlayer 1 GP1 : 1st information connect
    4. Internlayer n GPn : nth information connect

Make PCB

  • film push
  • develop
  • exposure
  • etching board
  • wipe out

Hand welding

  • Soldering iron
    • cleaning sponge
  • solder wire
    • rosin
    • solder wick : remove redundant soldering tin
    • heat gun
  • tweezer

Standard

surface smooth and blink, the cross section like moon

PCB Design

EDA Electronic Design Automation Softeware: Altium Designer :au:

Cadence Allegro,OrCAD :us:

EAGLE :de:

Design Flow in AltiumDesign

Schematic diagram design

  1. New project
  2. graph size choose A4, A3
  3. Set up component symbol library, choose component
  4. Circuit design, draw schematic diagram
  5. check design rule
  6. choose footprint
  7. create BOM Bill of Material

PCB diagram design

  1. draw new footprint
  2. Design PCB shape, size[Keepout Layer]
    1. 选择单位尺寸
    2. 选Keepout Layer
    3. Place命令绘制边框
    4. Design->Board Shape制作
  3. Input Schematic file information : Design->Input Changeds From…
  4. Layout [modularity, functionalization]
  5. set up wiring rule
  6. manual[first choose layer], automatic
  7. Draw symbol description ( Overlay layer )

All Step

  1. 建立PCB项目(.PCBPRJ)
  2. 设计电路图(.SCHDOC)
  3. 为电路图中所有元器件选择适合的封装
  4. 确定PCB板形状, 尺寸和非布线区域(固定位置等)(.PCBDOC)
  5. 编译导入元器件,并分别设置各个模块中 元件在板上的位置
  6. 手动/自动/半自动布线(电源地点/线可不布)
  7. 生成敷铜层
  8. 增添接地点
  9. 在上下OVERLAYER层添加文字图形说明
  10. 将生成的 FOOL.PCBDOC文件送出,生产样品(打样)
  11. 焊接制作PCB板,测试功能正确性和完整性。若有问题则返回1重新开始
  12. 设计完成后根据设计记录文件写出相关设计技术文档

Digital tube

Communication

Basic concepts

  • definition : object use information to communicate
  • Object : any creature or functional system
  • Communication way
    • human language
    • Computer Protocol
      • protocol format
      • sequence progress

ISO OSI Open System Interconnection

Application User port HTTP / FTP / DNS
Presentation data encode/decode ASCII / JPEG / MP3
Session distinguish data NETBIOS, WINSOCK
Transport reliable/unreliable data transmission TCP / UDP
Network routing IP,ARP
Link bit$\rightarrow$frame SDLC / HDLC
Physical send bit flow 232

Physical

transmission media

  • wireless, wired ( optical fiber /twisted-pair )

  • 连接器类型

  • Protocol : RS232

  • point to point

  • framing : end with wrong check

  • 检错FCS Frame Check Sequence

    • 奇偶校验位Parity Bit
    • 校验和Checksum
    • CRC Cyclic Redundancy Check
  • 透明传输 转译ESCape字符

  • 7E$\rightarrow$7D 5E

  • 7D$\rightarrow$7D 5D

Network

Routing way

  • 版本 : 4 Bit
    • v4 : 4个字节
    • v6 : 16个字节, 128 Bit
  • 首部长度 : 4 Bit
  • 区分服务
  • 总长度
  • 标识
  • 生存时间Time To Live : 8 Bit
  • 协议 :
    • TCP
    • UDP
    • ARP
    • OSPF(Open Shortest Path First开放式最短路径优先 )
  • 首部检验和 : 16Bit+
  • 源地址 : 255.255.255.255 点分十进制
  • 目的地址 :

Transport

Process, Task communication

Port to port communication

端口号

1024-65535, [IP,PORT]

  • 动态分配
  • 其他方式 : pipe管道通信, 共享内存

  • 熟知端口号 : 0-1023

    • 80 : 服务器–总台,
      • 开新进程 : 连接copy版
    • 21 : 邮件
  • 登记端口号 : 1024-49151
  • 客户端口号 : 49152-65535
  • DOS攻击
  • 用完导到另一个服务器

TCP Transmission Control Protocol[Reliable]

  • 打电话, 双方

  • 基于连接

  • 全双工 : 同时相互发送

UDP User Datagram Protocol[unreliable, no response]

  • 信, 到达时间和与否不知道
  • 效率高

Application

  • DNS

  • FTP

  • TELNET

  • SSH

  • SMTP

  • HTTP HyperText Transfer Protocol

  • EMail

    • Send: SMTP
      • To:
      • Subject:
      • Cc:
      • From:
      • Date:
      • Reply- To:
    • Read: POP3, IMAP

      TCP/IP Protocol

ESP8266

  • netassist.exe
  • uartassist.exe