Giter Club home page Giter Club logo

uart2capturewith8bitsmcu's Introduction

※UART2CAPTUREwith8bitsMCU

  • Useing HT66F318 UART access to GPIO, LED matrix, EEPROM, ADC, I2C...internal resource (Same RS-485 port)

  • 此專案利用PC軟件通過UART port下達指令以存取MCU內部的EEPROM(64bytes), ADC(8ch 12bits), PWM output(10bit), Capture...

  • 後續還可以持續增加I2C(Hi resolution adc), SPI(OLED display) 都透過UART port

  • Project Option:
    HXT (External 8MHz X'tal): 可選項有:HXT(400K~16Mhz),HIRC4M,HIRC8M,HIRC12M
    LICR (Low speed internal RC for TB0/TB1): 可選項有:LXT(32.768Khz),LIRC(32Khz)
    WatchDog: enable

  • UART port baudrate setting 9600,N,8,1 ;Protocol format refer RS-485 Modbus & CRC-16
    通訊協議格式參照RS-485通訊協議格式(Modbus & CRC-16).

  • TB0,1 enable LIRC interrupt for 0.514sec, 0.514sec

  • TM0 enable HXT interrupt for 200us

  • ADC輸入控制 ADC設置直接透過AN0~AN7讀取外部輸入,或AVDD,AVDD1/2,AVDD1/4讀取內部輸入

  • 訊號輸入捕捉 Capture(HT66F317)設置TP1當輸入條件16bit+16bit counting
    Capture(HT66F318)設置TP1當輸入條件10bit+16bit counting

  • HT-IDE3000 HT66F317/HT66F318 28ssop with HT-IDE3000 & e-Link & e-WriterPro
    文件HT66F318 Document
    模擬&除錯Development & DebugIDE3000 & ICE
    燒入器Progrmming & writerHOPE3000 & e-WriterPro

Relevant information

  • HT-IDE3000 V8.02 Image
  • HOLTEK C Compiler V3/Assembly Image
  • HT66F318 Config, used 8Mhz X'tal external, VDD/VDDA binding Image Image Image Image
  • HT66F318 28ssop Schematic Diagram Image Image

How to test or used

利用PC通訊軟件做為主動工具, 協議(9600,n,8,1), 格式比照RS-485格式(PC指令CRC用 A0 0A代替, MCU反饋的為CRC-16)

  • For Example:

  • UART Formate(Get from MCU): 44 03 00 00 00 04 A0 0A #讀取EEPROM位址0x0000,4組(共計8個bytes) MCU return設計最大每次讀取四組(8byte) 所以反饋時: 44 03 08 00 01 02 03 04 05 06 07 CRC CRC

  • UART Formate(Write to MCU): 44 06 00 0A EE FF A0 0A #寫入EEPROM位址0x000A,資料為0xEEFF MCU return: 44 06 00 0A EE FF CRC CRC

  • UART Formate(Get from MCU): 44 03 03 00 00 02 A0 0A #讀取Capture通道0, 1組4個bytes MCU return Capture: 44 03 04 03 FF FF FF CRC CRC MCU return Capture: 44 03 04 08 00 00 00 EC 97

Other applications

  • UART access to ADC converter(HY3118 24bit ADC) via I2C bus.
  • UART access to OLED 16x2 display driver via SPI bus.

uart2capturewith8bitsmcu's People

Contributors

louisopen avatar tsmt-tw avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.