Cov txheej txheem:

Pheej Yig STK500 AVR Programmer rau Atmel Studio: 7 Kauj Ruam
Pheej Yig STK500 AVR Programmer rau Atmel Studio: 7 Kauj Ruam

Video: Pheej Yig STK500 AVR Programmer rau Atmel Studio: 7 Kauj Ruam

Video: Pheej Yig STK500 AVR Programmer rau Atmel Studio: 7 Kauj Ruam
Video: Seev pheej yig teev ntshav cawm seej Daim 126 2024, Hlis ntuj nqeg
Anonim
Pheej Yig STK500 AVR Programmer rau Atmel Studio
Pheej Yig STK500 AVR Programmer rau Atmel Studio

Atmel Studio yog lub cuab yeej muaj zog rau kev ua AVR cov haujlwm, tab sis sau cov program yog thawj kauj ruam. Txhawm rau siv koj txoj haujlwm, koj yuav tsum ua lub Circuit Court thiab hloov koj cov cai rau hauv lub microcontroller. Koj tuaj yeem tsim kho koj li AVR los ntawm Atmel Studio los ntawm kev siv STK500 kho vajtse. Vim li cas koj thiaj tsis tuaj yeem ua haujlwm MCU ncaj qha los ntawm khoos phis tawj los ntawm cov cuab yeej pheej yig xws li PIC microcontrollers? Cov lus teb yog tias yuav hloov koj qhov program mus rau IC koj yuav tsum siv SPI kev txuas, tab sis tsis muaj chaw nres nkoj SPI ntawm lub PC. Muaj ntau qhov software uas siv RS232 chaw nres nkoj ua SPI, tab sis koj tsis tuaj yeem tsim kho koj AVR ncaj qha los ntawm Atmel Studio zoo li lawv. Ntawm no kuv qhia koj software uas sim ua STK500 kho vajtse ntawm PC thiab xa cov ntaub ntawv mus rau lub microcontroller siv RS232 ntawm cov khoom siv yooj yim thiab pheej yig. Nco ntsoov tias siv PC RS232 raws li chaw nres nkoj SPI qeeb thiab ua haujlwm lub nti yuav siv sijhawm ntau dua li STK500 ntaus ntawv.

Kauj Ruam 1: Ua Cov Khoom Kho Vajtse

Ua Hardware
Ua Hardware
Ua Hardware
Ua Hardware
Ua Hardware
Ua Hardware

Txhawm rau tsim kho vajtse koj xav tau:

  • Txog 1 meter cable nrog 5 xov hlau lossis ntau dua
  • DB9 poj niam txuas
  • Tus pin header
  • 3 x 4.7K resistors
  • 3 x 5.1V Zener diodes
  • Cuab yeej cuab yeej

Solder resistors rau pins 3, 4, 6 thiab 7 ntawm DB9 txuas, txuas N tus pin ntawm diodes mus rau lwm qhov kawg ntawm cov resistors thiab muab lwm tus ceg ntawm diodes rau tus pin 5 ntawm DB9 txuas. Cov kab hluav taws xob txuas hluav taws xob ntawm cov tiv thaiv thiab diodes thiab tus pin 4 thiab 5 ntawm DB9 txuas. Siv lwm qhov kawg ntawm cov xov hlau txuas rau tus poj niam ntawm Pin header.

Saib ntawm daim duab qhia chaw yuav pab koj ntau thaum ua cov cuab yeej.

Nco ntsoov tias RESET tus pin ntawm microcontroller yuav tsum txuas nrog +5V ntawm 10K tus tiv thaiv hauv koj lub Circuit Court yog tias tsis muaj qhov rub tawm tus neeg tawm tsam hauv lub microcontroller nws tus kheej.

Kauj ruam 2: Virtual Ports

Virtual Ports
Virtual Ports

Ua ntej siv WinSTK500 software koj xav tau ib khub ntawm cov chaw nres nkoj virtual. Muaj ntau ntau qhov chaw nres nkoj virtual emulator software zoo li Virtual Serial Ports Emulator, com0com (daim iav) thiab lwm yam Ntawm no kuv tau siv com0com software. Tom qab txhim kho com0com, tsim ib khub ntawm cov chaw nres nkoj virtual zoo ib yam ntawm daim duab.

Kauj Ruam 3: Txhim Kho WinSTK500

Txhim kho WinSTK500
Txhim kho WinSTK500
Txhim kho WinSTK500
Txhim kho WinSTK500
Txhim kho WinSTK500
Txhim kho WinSTK500

Rub tawm WinSTK500 los ntawm https://www.dihav.com/winstk500/, thiab teeb nws rau hauv koj lub PC.

Yog tias koj xav nkag mus WinSTK500 yooj yim, khiav Atmel Studio thiab los ntawm Cov Cuab Yeej ntawv qhia zaub mov xaiv Sab Nraud Cov Cuab Yeej …, ntxiv cov cuab yeej tshiab, teeb lub npe rau WinSTK500, xaiv [Install Location] dihav / WinSTK500 / WinSTK500.exe raws li cov lus txib thiab nyem OK. Tam sim no koj tuaj yeem pom WinSTK500 ntawm cov cuab yeej ntawv qhia zaub mov.

Kauj Ruam 4: Txuas rau WinSTK500

Txuas rau WinSTK500
Txuas rau WinSTK500
Txuas rau WinSTK500
Txuas rau WinSTK500
Txuas rau WinSTK500
Txuas rau WinSTK500

Txuas koj MCU rau kho vajtse thiab txuas nws mus rau RS232 chaw nres nkoj txuas. Khiav Atmel studio, xaiv WinSTK500 los ntawm cov cuab yeej ntawv qhia zaub mov, xaiv CNCB0 li STK chaw nres nkoj, xaiv koj lub computer qhov chaw nres nkoj (feem ntau yog COM1) ua chaw nres nkoj SPI thiab nyem Start khawm. Nyem rau Ntxiv phiaj … los ntawm Cov cuab yeej ntawv qhia zaub mov thiab ntxiv cov cuab yeej STK500 ntawm CNCA0 chaw nres nkoj. Xaiv Cov Cuab Yeej Cuab Yeej los ntawm Cov cuab yeej ntawv qhia zaub mov, xaiv STK500 CNCA0 los ntawm Cov cuab yeej poob rau hauv cov ntawv qhia zaub mov, xaiv koj lub microcontroller thiab siv ISP interface, tom qab ntawv nyem khawm. Atmel Studio yuav txuas nrog WinSTK500.

Kauj ruam 5: WinSTK500 Chaw

WinSTK500 Chaw
WinSTK500 Chaw
WinSTK500 Chaw
WinSTK500 Chaw

Tom qab txuas mus rau WinSTK500, koj tuaj yeem pom 3 yam cuam tshuam nrog cov cuab yeej nyob rau sab saum toj ntawm cov khoom nyob ntawm sab laug vaj huam sib luag ntawm Lub Tshuab Ntaus Ntawv Qhov rai.

  1. Koj tuaj yeem hloov pauv SPI moos zaus ntawm Interface settings, tab sis nco ntsoov tias WinSTK500 yog lub cuab yeej siv qeeb thiab tsuas yog txhawb nqa 10-25 KHz, lub sijhawm pib yog li 16 KHz uas tau pom zoo kom tsis txhob hloov nws.
  2. Cov ntaub ntawv xov xwm tsuas yog qee cov ntaub ntawv hais txog lub cuab yeej.
  3. Kev teeb tsa Pawg Thawj Coj tsuas yog qee qhov hloov pauv uas tsis cuam tshuam rau WinSTK500.

Kuj tseem muaj ob txoj kev xaiv ntawm WinSTK500 qhov rai:

  1. Kev hais kom ua tsis tau zoo Rov pib txhais tus cwj pwm ntawm WinSTK500 thaum cov lus txib tsis ua thiab feem ntau teeb tsa rau SCK Pin. Yog tias koj tau sim ua haujlwm ntau zaus thiab koj tau ntsib lub sijhawm yuam kev thiab txhua qhov kev sib txuas yog OK, sim hloov qhov kev xaiv no. Koj tseem tuaj yeem pom qee cov ntaub ntawv hais txog qhov kev xaiv no ntawm koj daim ntawv qhia khoom microcontroller.
  2. Yog tias tom qab txuas rau WinSTK500, Atmel Studio tau hais tias STK firmware yuav tsum tau hloov kho kom nce Software Version kom tsis txhob muaj cov lus no.

Kauj Ruam 6: Ua Haujlwm Rau Koj Microcontroller

Programming Koj Microcontroller
Programming Koj Microcontroller

Tom qab txuas koj lub microcontroller mus rau Atmel Studio ntawm WinSTK500 koj tuaj yeem ua haujlwm nws los ntawm Lub Tshuab Ntaus Ntawv qhov rai. Nco ntsoov tias tom qab kev teeb tsa lub RESET tus pin yuav tsis nce siab, yog li txhawm rau ua haujlwm qhov program txoj haujlwm cable yuav tsum raug txiav tawm.

Kauj Ruam 7: Puas WinSTK500 Program AT89?

Puas WinSTK500 Program AT89?
Puas WinSTK500 Program AT89?

Qhov sib txawv ntawm cov phiaj xwm AVR thiab AT89 yog RESET tus pin polarity. Yog li koj yuav tsum siv lwm yam khoom siv uas kuv tau tso nws daim duab qhia chaw ntawm no. Kuv tsis tau sim nws kuv tus kheej, tab sis nws yuav tsum ua haujlwm kom raug. Yog tias koj ua nws thiab nws ua haujlwm tau zoo qhia rau kuv thiab lwm tus nyeem hauv cov lus.

Pom zoo: