Cov txheej txheem:
- Kauj Ruam 1: QHOV TSEEB RAU UART Kev Sib Tham
- Kauj Ruam 2: Cov ntaub ntawv ntws los ntawm Tx Pin ntawm UM kis mus rau Rx Pin ntawm Kev Txais UART:
- Kauj ruam 3:
- Kauj ruam 4:
- Kauj Ruam 5: YUAV UA LI CAS YUAV UA LI CAS
- Kauj Ruam 6: Duab Ua Li Cas UART Ua Haujlwm
- Kauj ruam 7:
- Kauj Ruam 8: UART Cov Ntaub Ntawv Tshaj Tawm tau npaj rau hauv Pob Duab
- Kauj ruam 9:
- Kauj Ruam 10: KAUJ RUAM UART TRANSMISSION
- Kauj Ruam 11: Duab Xa UART Tau Txais Cov Ntaub Ntawv Ua Ke Los Ntawm Cov Tsheb Npav
- Kauj Ruam 12: 2. Kev Tshaj Tawm UART Ntxiv Pib Pib, Parity Bit, thiab Stop Bit (s) rau Cov Ntaub Ntawv:
- Kauj Ruam 13: 3. Tag Nrho Cov Pob Tau Xa Los Ntawm Kev Xa UART mus rau Qhov Tau Txais UART. Qhov Tau Txais UART Piv Txwv Cov Kab Kab Lus ntawm Tus Txheej Txheem Ua Ntej Baud Tus Qauv:
- Kauj Ruam 14: 4. Qhov Tau Txais UART Tshem Tawm Qhov Pib Me ntsis, Parity Me ntsis, thiab Nres Me Me Los Ntawm Cov Ntaub Ntawv:
- Kauj Ruam 15: 5. Qhov Tau Txais UART hloov pauv cov ntaub ntawv hauv xov tooj rov qab mus rau qhov sib npaug thiab hloov nws mus rau Cov Tsheb Npav ntawm Qhov Tau Txais Kawg:
- Kauj Ruam 16: Qhov Ua Tau Zoo thiab Qhov Tsis Zoo ntawm UARTS
Video: QHOV TSEEM CEEB NTAWM UART COMMUNICATION: 16 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Nco ntsoov thaum cov tshuab luam ntawv, nas, thiab modems muaj cov hlua tuab nrog cov txuas txuas loj loj? Cov uas yuav tsum tau muab ntsia rau hauv koj lub computer? Cov cuab yeej no tej zaum siv UARTs los tham nrog koj lub khoos phis tawj. Thaum USB tau yuav luag hloov tag cov qub cables thiab cov txuas, UARTs yog qhov tseeb tsis yog ib yam ntawm yav dhau los. Koj yuav pom UARTs tau siv hauv ntau DIY cov phiaj xwm hluav taws xob txhawm rau txuas GPS cov qauv, Bluetooth cov qauv, thiab RFID daim npav nyeem ntawv cov qauv rau koj li Raspberry Pi, Arduino, lossis lwm yam microcontrollers.
UART sawv rau Universal Asynchronous Receiver/Transmitter. Nws tsis yog kev sib txuas lus raws li SPI thiab I2C, tab sis lub cev muaj zog hauv lub microcontroller, lossis IC sawv ib leeg. UART lub hom phiaj tseem ceeb yog xa thiab tau txais cov ntaub ntawv xov xwm.
Ib qhov zoo tshaj plaws txog UART yog tias nws tsuas yog siv ob lub xov hlau los xa cov ntaub ntawv ntawm cov khoom siv. Cov hauv paus ntsiab lus tom qab UART tau nkag siab yooj yim, tab sis yog tias koj tsis tau nyeem ib feem ntawm kab ntawv no, Cov hauv paus ntawm SPI Kev Sib Tham Txheej Txheem, uas yuav yog qhov chaw zoo pib.
Kauj Ruam 1: QHOV TSEEB RAU UART Kev Sib Tham
Hauv UART kev sib txuas lus, ob UARTs sib txuas lus ncaj qha nrog txhua lwm yam. Kev xa UART hloov pauv cov ntaub ntawv sib luag los ntawm kev tswj hwm lub cuab yeej zoo li CPU rau hauv daim ntawv txuas, xa nws hauv cov ntawv mus rau qhov tau txais UART, uas tom qab ntawd hloov cov ntaub ntawv hauv xov tooj rov qab rau hauv cov ntaub ntawv sib luag rau cov khoom siv tau txais. Tsuas yog ob lub xov hlau xav tau los xa cov ntaub ntawv ntawm ob UARTs. Cov ntaub ntawv ntws los ntawm Tx tus pin ntawm kev xa UART mus rau Rx tus pin ntawm qhov tau txais UART:
Kauj Ruam 2: Cov ntaub ntawv ntws los ntawm Tx Pin ntawm UM kis mus rau Rx Pin ntawm Kev Txais UART:
Kauj ruam 3:
UARTs xa cov ntaub ntawv asynchronously, uas txhais tau tias tsis muaj lub moos teeb liab los ua ke cov khoom tawm los ntawm kev xa UART mus rau qhov piv txwv ntawm cov khoom los ntawm kev tau txais UART. Hloov chaw ntawm lub moos teeb liab, kis UART ntxiv qhov pib thiab nres cov khoom mus rau cov ntaub ntawv pob ntawv raug xa mus. Cov khoom no piav qhia qhov pib thiab qhov kawg ntawm cov ntaub ntawv pob kom tau txais UART paub thaum pib nyeem cov khoom.
Thaum qhov tau txais UART pom qhov pib me ntsis, nws pib nyeem cov khoom nkag ntawm qhov tshwj xeeb zaus hu ua tus nqi baud. Baud tus nqi yog ntsuas ntawm qhov nrawm ntawm cov ntaub ntawv hloov pauv, qhia tawm hauv cov khoom ib ob (bps). Ob UARTs yuav tsum ua haujlwm ntawm kwv yees li tus nqi baud. Tus nqi baud nruab nrab ntawm kev xa thiab tau txais UARTs tuaj yeem sib txawv li ntawm 10% ua ntej lub sijhawm ntawm cov khoom tau dhau mus deb heev.
Kauj ruam 4:
Ob qho UARTs tseem yuav tsum tau teeb tsa kom xa thiab tau txais tib cov ntaub ntawv pob ntawv qauv.
Kauj Ruam 5: YUAV UA LI CAS YUAV UA LI CAS
UART uas yuav xa cov ntaub ntawv tau txais cov ntaub ntawv los ntawm cov tsheb npav. Cov tsheb npav siv los xa cov ntaub ntawv mus rau UART los ntawm lwm lub cuab yeej zoo li CPU, nco, lossis microcontroller. Cov ntaub ntawv raug xa los ntawm cov tsheb npav mus rau kis UART hauv daim ntawv sib luag. Tom qab kis UART tau txais cov ntaub ntawv sib luag los ntawm cov tsheb npav, nws ntxiv qhov pib me ntsis, sib npaug me ntsis, thiab nres me ntsis, tsim cov pob ntawv cov ntaub ntawv. Tom ntej no, cov ntaub ntawv pob ntawv raug tso tawm ib ntus, me ntsis ntawm Tx tus pin. Qhov tau txais UART nyeem cov ntaub ntawv pob me ntsis ntawm nws tus lej Rx. Qhov tau txais UART tom qab ntawd hloov cov ntaub ntawv rov qab rau hauv daim ntawv sib luag thiab tshem tawm qhov pib me ntsis, sib luag me ntsis, thiab tso tseg cov khoom. Thaum kawg, qhov tau txais UART hloov cov ntaub ntawv pob ntawv ua ke mus rau cov ntaub ntawv tsheb npav ntawm qhov kawg tau txais:
Kauj Ruam 6: Duab Ua Li Cas UART Ua Haujlwm
Kauj ruam 7:
UART cov ntaub ntawv xa tawm tau teeb tsa rau hauv pob ntawv. Txhua pob ntawv muaj 1 qhov pib me ntsis, 5 txog 9 cov ntaub ntawv me me (nyob ntawm UART), xaiv qhov sib luag me ntsis, thiab 1 lossis 2 nres cov khoom:
Kauj Ruam 8: UART Cov Ntaub Ntawv Tshaj Tawm tau npaj rau hauv Pob Duab
Kauj ruam 9:
Pib QHIA
UART cov ntaub ntawv xa kab yog ib txwm muaj nyob ntawm qib siab thaum nws tsis xa cov ntaub ntawv. Txhawm rau pib hloov pauv cov ntaub ntawv, kev xa xov UART rub cov kab sib kis los ntawm qhov siab mus rau qis rau ib teev ntawm lub moos. Thaum qhov tau txais UART pom qhov hloov pauv mus rau qhov siab thiab qis, nws pib nyeem cov khoom hauv cov ntaub ntawv ntawm qhov zaus ntawm tus nqi baud.
DATA NTAWV
Cov ntaub ntawv muaj cov ntaub ntawv raug xa mus. Nws tuaj yeem yog 5 khoom mus txog 8 ntsis ntev yog siv qhov sib luag me ntsis. Yog tias tsis siv qhov sib luag me ntsis, cov ntaub ntawv tuaj yeem yog 9 ntsis ntev. Feem ntau, cov ntaub ntawv raug xa nrog qhov tsawg kawg tseem ceeb me ntsis ua ntej.
PARITY
Parity piav qhia qhov sib npaug lossis qhov txawv ntawm tus lej. Qhov sib npaug me ntsis yog ib txoj hauv kev tau txais UART los qhia yog tias muaj cov ntaub ntawv tau hloov pauv thaum kis. Cov khoom tuaj yeem hloov pauv los ntawm hluav taws xob hluav taws xob, tsis sib xws baud tus nqi, lossis cov ntaub ntawv xa mus deb deb. Tom qab tau txais UART nyeem cov ntaub ntawv, nws suav tus lej ntawm cov khoom nrog tus nqi 1 thiab kos yog tias tag nrho yog tus lej lossis tus lej. Yog tias qhov sib npaug sib npaug yog 0 (txawm tias sib npaug), 1 cov khoom hauv cov ntaub ntawv yuav tsum tag nrho rau tus lej sib npaug. Yog tias qhov sib npaug sib npaug yog 1 (khib sib npaug), 1 cov khoom hauv cov ntaub ntawv yuav tsum tag nrho rau tus lej khib. Thaum qhov sib npaug sib npaug sib phim cov ntaub ntawv, UART paub tias kev sib kis tsis muaj qhov yuam kev. Tab sis yog tias qhov sib npaug me ntsis yog 0, thiab tag nrho yog khib; lossis qhov sib npaug sib npaug yog 1, thiab tag nrho yog txawm tias, UART paub tias cov khoom hauv cov ntaub ntawv tau hloov pauv.
NIAJ HNUB QHOV TSEEB
o teeb tsa qhov kawg ntawm cov ntaub ntawv pob, xa UART tsav cov ntaub ntawv xa kab los ntawm qhov hluav taws xob qis mus rau qhov hluav taws xob siab tsawg kawg yog ob ntu me ntsis.
Kauj Ruam 10: KAUJ RUAM UART TRANSMISSION
1. Kev xa UART tau txais cov ntaub ntawv ua ke los ntawm cov tsheb npav:
Kauj Ruam 11: Duab Xa UART Tau Txais Cov Ntaub Ntawv Ua Ke Los Ntawm Cov Tsheb Npav
Kauj Ruam 12: 2. Kev Tshaj Tawm UART Ntxiv Pib Pib, Parity Bit, thiab Stop Bit (s) rau Cov Ntaub Ntawv:
Kauj Ruam 13: 3. Tag Nrho Cov Pob Tau Xa Los Ntawm Kev Xa UART mus rau Qhov Tau Txais UART. Qhov Tau Txais UART Piv Txwv Cov Kab Kab Lus ntawm Tus Txheej Txheem Ua Ntej Baud Tus Qauv:
Kauj Ruam 14: 4. Qhov Tau Txais UART Tshem Tawm Qhov Pib Me ntsis, Parity Me ntsis, thiab Nres Me Me Los Ntawm Cov Ntaub Ntawv:
Kauj Ruam 15: 5. Qhov Tau Txais UART hloov pauv cov ntaub ntawv hauv xov tooj rov qab mus rau qhov sib npaug thiab hloov nws mus rau Cov Tsheb Npav ntawm Qhov Tau Txais Kawg:
Kauj Ruam 16: Qhov Ua Tau Zoo thiab Qhov Tsis Zoo ntawm UARTS
Tsis muaj txheej txheem kev sib txuas lus zoo tag nrho, tab sis UARTs zoo nkauj heev ntawm qhov lawv ua. Nov yog qee qhov zoo thiab qhov tsis zoo los pab koj txiav txim siab seb lawv puas haum rau qhov xav tau ntawm koj txoj haujlwm:
ADVANTAGES
Tsuas yog siv ob lub xov hlau Tsis muaj lub teeb liab xav tau Muaj qhov sib npaug me ntsis tso cai rau kev txheeb xyuas qhov ua yuam kev Tus qauv ntawm pob ntawv cov ntaub ntawv tuaj yeem hloov pauv tsuav yog ob tog tau teeb tsa rau nws Cov ntaub ntawv zoo thiab dav siv txoj kev DISADVANTAGES
Qhov loj ntawm cov ntaub ntawv thav duab tau txwv rau qhov siab kawg ntawm 9 khoom Tsis txhawb nqa ntau tus qhev lossis ntau tus tswv tswv Lub baud tus nqi ntawm txhua UART yuav tsum tsis pub dhau 10% ntawm ib leeg ntxiv mus rau ntu peb ntawm cov kab lus no, I2C Kev Sib Txuas Lus Sib Tham kom paub txog lwm txoj hauv kev siv cov khoom siv hluav taws xob sib txuas lus. Lossis yog tias koj tseem tsis tau muaj, txheeb xyuas ib feem, Cov hauv paus ntawm SPI Kev Sib Tham Txheej Txheem.
Thiab zoo li ib txwm, qhia rau kuv paub hauv cov lus yog tias koj muaj lus nug lossis lwm yam ntxiv! Yog tias koj nyiam kab lus no thiab xav pom ntau dua li nws, nco ntsoov Ua raws
Hais txog
M. Junaid
Pom zoo:
LED Snapper: Tej zaum Qhov Tseem Ceeb Tshaj Plaws Ntawm Cov Khoom Siv Koj Yuav Ua Tau: 3 Kauj Ruam
LED Snapper: Tej zaum Qhov Tseem Ceeb Tshaj Plaws Ntawm Cov Khoom Siv Koj Yuav Ua Tau: Tso cai rau kuv qhia rau koj txog LED Snapper. Ib qho yooj yim, tab sis muaj txiaj ntsig zoo ntawm cov cuab yeej ntsuas uas koj tuaj yeem tsim los pab koj daws koj cov phiaj xwm hluav taws xob. LED Snapper yog qhov qhib qhov luam tawm Circuit board uas tso cai rau koj kom yooj yim ntxiv de
SmartHome Wireless Kev Sib Txuas Lus: Cov hauv paus tseem ceeb ntawm MQTT: 3 Cov Kauj Ruam
SmartHome Kev Sib Txuas Lus Tsis Txaus Siab: Qhov Tseem Ceeb ntawm MQTT: MQTT Cov Hauv Paus: ** Kuv tab tom yuav ua Lub Tsev Automation series, Kuv yuav mus dhau cov kauj ruam uas kuv tau ua los kawm txhua yam kuv tau ua yav tom ntej. Cov Lus Qhia no yog lub hauv paus ntawm yuav teeb tsa MQTT rau kev siv rau yav tom ntej Cov Lus Qhia. Ua cas
Yuav Ua Li Cas Nyeem Ntau Qhov Analog Qhov Tseem Ceeb Siv Ib Tus Pin Pin: 6 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Nyeem Ntau Qhov Analog Tus Nqi Siv Ib Tus Pin Pin: Hauv qhov kev qhia no, kuv yuav qhia koj yuav ua li cas nyeem ntau yam sib piv qhov txiaj ntsig siv tsuas yog ib tus lej nkag nkag
Kawm Ntawm No Txog Qhov Tseem Ceeb Tseem Ceeb!: 11 Kauj Ruam
Kawm Ntawm No Txog Ntawm Qhov Tseem Ceeb Tseem Ceeb!: Koj tuaj yeem paub dab tsi txog qib dej hauv lub taub dej? Txhawm rau saib xyuas yam khoom no, koj tuaj yeem siv lub ntsuas siab. Qhov no yog cov cuab yeej muaj txiaj ntsig zoo rau kev lag luam automation, feem ntau. Hnub no, peb tab tom tham txog tsev neeg tseeb ntawm MPX
Kuv Qhov Kaum Yam Tseem Ceeb Tshaj Plaws Cov Lus Qhia thiab cov lus qhia: 9 Kauj Ruam (nrog Duab)
Kuv Top Ten Qhov Siv Tau Zoo Tshaj Plaws Cov Lus Qhia thiab Cov Lus Qhia: Muaj 6 ntiv tes los daus hauv av, thiab koj tau koom nrog hauv tsev. Koj tau poob ib ntus koj qhov kev mob siab rau ua haujlwm ntawm koj li GPS-coj ua hlau txiav laser. Tsis tau muaj ib qhov haujlwm tshiab ntawm koj qhov chaw koj nyiam uas tau ua rau koj nyiam