Cov txheej txheem:

USB rau Serial TTL: 3 Cov Kauj Ruam
USB rau Serial TTL: 3 Cov Kauj Ruam

Video: USB rau Serial TTL: 3 Cov Kauj Ruam

Video: USB rau Serial TTL: 3 Cov Kauj Ruam
Video: 🟡 POCO X5 PRO - САМЫЙ ДЕТАЛЬНЫЙ ОБЗОР и ТЕСТЫ 2024, Hlis ntuj nqeg
Anonim
USB rau Serial TTL
USB rau Serial TTL

Rau qee qhov ntawm kuv cov phiaj xwm PIC Kuv xav tau cov ntawv txuas (RS232) txhawm rau luam qee cov lus ntawm lub vijtsam ntawm kuv lub computer. Kuv tseem muaj lub khoos phis tawj desktop uas muaj ib qho RS232 interface tab sis tam sim no cov khoos phis tawj feem ntau muaj USB interface hloov chaw. Koj tuaj yeem yuav cov cuab yeej uas hloov pauv - TTL - RS232 cov cim rau USB uas ntau txoj haujlwm tau tshaj tawm rau ntawm Instructables tab sis kuv txiav txim siab tsim ib qho rau kuv tus kheej. Qhov laj thawj rau qhov ntawd yog qhov kuv nyiam tsim cov khoom tab sis kuj hais tias cov ntawv no tsis xav tau tus tsav tshwj xeeb rau Windows 10 vim nws siv tus qauv Microchip tus qauv piav qhia uas twb tau txhawb nqa los ntawm Windows 10.

Txij li qhov xav tau rau baudrate tuaj yeem sib txawv Kuv txiav txim siab los txhawb cov baudrates hauv qab no siv cov dhia hauv pawg thawj coj: 9600, 19200, 57600 thiab 115200. Cov cuab yeej ib txwm siv 8 khoom, 1 nres thiab tsis muaj qhov sib npaug rau nws kis.

Raws li koj tuaj yeem paub koj tsis tuaj yeem siv TTL cov cim kom tsav RS232 interface yog li kuv kuj tsim RS232 pawg thawj coj saib raws li MAX232 nti uas hloov cov cim mus rau qib raug. Hauv Cov Lus Qhia no kuv kuj tau tshaj tawm daim duab qhia chaw ntawm RS232 pawg thawj coj txij li thaum kuv siv nws los ntsuas kuv li USB rau Serial TTL hloov pauv.

Kuv siv PIC 16F1455 ua lub cuab yeej los tswj lub USB chaw nres nkoj thiab hloov tag nrho cov ntaub ntawv los ntawm USB mus rau ntu siv JAL cov lus programming.

Kauj Ruam 1: Cov Khoom Siv Hluav Taws Xob

Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics

Daim duab qhia chaw qhia cov khoom siv hluav taws xob uas koj xav tau. Nco ntsoov tias kuv kuj tau tshaj tawm daim duab qhia chaw ntawm RS2323 pawg thawj coj uas hloov TTL cov cim rau RS232 cov cim tab sis qhov no tsuas yog cov ntaub ntawv ntxiv. Cov npe hauv qab no tsuas yog siv USB rau Serial TTL hloov pauv.

Koj xav tau cov khoom siv hluav taws xob hauv qab no rau qhov haujlwm no:

  • 1 PIC microcontroller 16F1455 nrog lub qhov (socket)
  • Cov khoom siv hluav taws xob: 1 * 470 nF, 1 * 100nF, 2 * 22 pF
  • 1 siv lead ua 12 MHz
  • 1 Electrolytic capacitor ntawm 10 uF/25V
  • Resistors: 2 * 10k, 3 * 330 Ohm, 2 * 22 Ohm
  • LEDs: 1 Amber, 1 Daj, 1 Ntsuab
  • 1 USB txuas
  • 2 Dhia
  • 1 kab, 4 pin

Koj tuaj yeem tsim lub Circuit Court ntawm daim ntawv qhia zaub mov, raws li qhia hauv daim duab. Lub Circuit Court yog siv los ntawm USB txuas. Kuv siv USB 5 Volt rau kev txhawb nqa lub rooj tsav xwm RS232.

Kauj ruam 2: Software

Lub software ua cov haujlwm hauv qab no:

  • Ua haujlwm USB interface. Txog qhov no kuv siv tus qauv JAL USB cov ntawv xov xwm txuas
  • Tom qab USB rau Serial TTL hloov pauv tau teeb tsa, lub teeb daj yuav qhib
  • Thaum tus ua cim tau txais los ntawm USB nws tau theej rau cov ntawv sib txuas
  • Thaum tus cim tau txais los ntawm cov ntawv sib txuas nws tau theej rau USB
  • Txhua lub sijhawm tau txais tus cim los ntawm ob sab, LED ntsuab qhib sai sai los qhia cov ntaub ntawv raug xa mus
  • Teem lub baudrate ntawm cov ntawv sib txuas uas siv cov teeb tsa jumper. Tus baudrate tuaj yeem hloov pauv txhua lub sijhawm

Ua ntej USB interface tuaj yeem siv tau nws yuav tsum tau teeb tsa los ntawm lub tshuab computer. Qhov no yog ua tiav los ntawm teeb tsa txoj cai tsis nyob hauv qhov davhlau ya nyob twg emulator program hauv PC thiab ua kom RTS/CTS ntws ntws. Baudrate ntawm USB interface tuaj yeem teeb tsa tus nqi thaum lub baudrate ntawm tus lej sib cuam tshuam tau txiav txim siab los ntawm jumper teeb tsa. Nco ntsoov tias ob qho baudrates tsis tas yuav zoo ib yam.

Cov ntaub ntawv JAL thiab cov ntaub ntawv Intel Hex rau kev ua haujlwm PIC tau txuas nrog.

Kauj Ruam 3: Qhov Kawg

Image
Image

Txog qhov kev nthuav qhia no kuv txuas USB rau Serial TTL hloov pauv rau kuv lub rooj tsav xwm RS232. Qhov laj thawj rau qhov ntawd yog qhov uas kuv tuaj yeem pom qhov ua haujlwm ntawm kuv lub khoos phis tawj desktop uas muaj ob qho chaw nres nkoj USB thiab chaw nres nkoj RS232.

Hauv cov vis dis aus koj pom 2 lub davhlau ya nyob twg emulator windows qhib. Lub qhov rai sab laug qhia cov ntaub ntawv ntawm qhov chaw nres nkoj RS232 thaum lub qhov rai sab xis qhia cov ntaub ntawv ntawm USB chaw nres nkoj. Rau qhov chaw nres nkoj RS232 tsis xav tau kev tswj ntws. Rau USB chaw nres nkoj, USB rau Serial TTL hloov pauv tau teeb tsa los ntawm kev ua kom RTS/CTS ntws tswj tom qab uas cov xim daj yuav qhib.

Nco ntsoov tias rau qhov ua piv txwv no kuv siv baudrate ntawm 9600 baud rau qhov chaw nres nkoj RS232 thiab baudrate ntawm 115200 yog USB chaw nres nkoj.

Yog tias koj xav siv PIC microcontroller nrog JAL - Pascal zoo li cov lus programming - mus ntsib JAL lub vev xaib

Muaj kev lom zem ua Cov Lus Qhia thiab tos ntsoov rau koj cov kev xav thiab txiaj ntsig.

Pom zoo: