Cov txheej txheem:

Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino: 5 Kauj Ruam
Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino: 5 Kauj Ruam

Video: Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino: 5 Kauj Ruam

Video: Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino: 5 Kauj Ruam
Video: Mus nuv ntses tau ntses loj heev 2024, Hlis ntuj nqeg
Anonim
Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino
Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino
Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino
Txoj Haujlwm 8051 (AT89 Series) Nrog Arduino

Phau ntawv qhia no muab kev daws teeb meem tiav rau program AT89S51 lossis AT89S52 (cov no yog qhov kuv tau sim) nrog Arduino. Ntau qhov teeb tsa tau suav nrog hauv phau ntawv qhia no; teeb tsa yooj yim yuav tsum tsis muaj software ntxiv uas tsis yog Arduino IDE.

Kauj Ruam 1: Hlau AT89S52 Raws li Koj Ib txwm Ua

Hlau AT89S52 Raws li Koj Ib txwm Ua
Hlau AT89S52 Raws li Koj Ib txwm Ua
Hlau AT89S52 Raws li Koj Ib txwm Ua
Hlau AT89S52 Raws li Koj Ib txwm Ua

Xav tias dawb hla cov kauj ruam no yog tias nws twb tau txuas lawm.

Dab tsi koj ib txwm xav tau los teeb tsa qhov tsawg kawg nkaus rau AT89S52:

Rau lub moos: 1x Crystal Oscillator, tsawg dua 33Mhz2x Capacitors, txog 33pF nyob ntawm seb koj siv Crystal li cas

Rau qhov rov pib dua Circuit: 1x 10kOhm Resistor1x 10μF Capacitor

Lub microcontroller tuaj yeem ua tiav yam tsis muaj kev rov pib dua, koj tsuas yog yuav tsum rov pib dua nws tom qab ua kom nws zoo.

Koj tseem tuaj yeem siv ib qho ntawm cov txheej txheem txheej txheem yam tsawg kawg no. Yog tias qhov no tshwm sim, mus tom ntej thiab hla mus rau kauj ruam tom ntej.

Kauj Ruam 2: Hlau AT89S52 mus rau Arduino

Hlau AT89S52 rau Arduino
Hlau AT89S52 rau Arduino

AT89S52 (AT89S51 ib yam nkaus) siv SPI raws li ISP raws tu qauv. Nws nkag mus rau ISP hom thaum RST tus pin rub siab.

Kev txuas ntxiv rau ntawm Kauj Ruam 1: RST tus pin ntawm 8051 rau tus pin 10 ntawm Arduino; Tus Pin 8 (P1.7) ntawm 8051 rau tus pin 13 ntawm Arduino (SCK); Tus Pin 7 (P1.6) ntawm 8051 rau tus pin 12 ntawm Arduino (MISO); Pin 6 (P1.5) ntawm 8051 rau tus pin 11 ntawm Arduino (MOSI).

Kauj Ruam 3: Kev Siv Kuv Lub Software (Hla mus rau Kauj Ruam 4 Yog Koj Xav Siv Avrdude)

Los ntawm no:

Rub tawm cov duab kos uas muaj nyob hauv qhov chaw cia khoom thiab koj tuaj yeem pib tsim koj li AT89S51 (52)!

Kauj ruam 4: Programming Siv Avrdude

Arduino IDE los nrog avrdude preinstalled. Txawm tias zoo dua, ArduinoISP, uas tseem los nrog IDE, txhawb nqa AT89S51 (AT89S52).

Ua ntej tshaj, rub cov duab kos npe "ArduinoISP" mus rau koj cov arduino. Cov duab kos tuaj yeem pom nyob hauv "File" -> "Piv txwv" -> "11. ArduinoISP" hauv Arduino IDE.

Tom qab ntawd, koj yuav tsum hloov kho cov ntaub ntawv teeb tsa ntawm avrdude txhawm rau txhawm rau pab txhawb rau peb AT89S51 (52). Koj tuaj yeem rub tawm qhov kev hloov pauv hloov pauv ntawm nplooj ntawv no.

Txheeb xyuas koj cov thaiv, yog tias txhua yam zoo li OK, ua cov hauv qab no:

"C: / Program Files (x86) Arduino / hardware / tools / avr / bin / avrdude.exe" -C E: /avrdude8051.conf -c stk500v1 -P COM3 -p 89s51 -b 19200

(Koj yuav xav hloov txoj hauv kev rau "avrdude.exe" nrog koj txoj kev teeb tsa ntawm Arduino IDE. Hloov "COM3" nrog lub npe chaw nres nkoj ntawm arduino koj siv ua tus programmer. Hloov 89s51 nrog 89s52 yog tias koj muaj AT89S52 Hloov "E: /avrdude8051.conf" nrog txoj hauv kev teeb tsa koj nyuam qhuav rub tawm.)

Kauj Ruam 5: Kev Sau Ntawv Siv Avrdude (Txuas Ntxiv)

Programming Siv Avrdude (Txuas Ntxiv)
Programming Siv Avrdude (Txuas Ntxiv)

Koj teeb tsa raug yog tias avrdude tso tawm lub cuab yeej kos npe kom raug.

Txhawm rau rub tawm qhov program, khiav cov lus txib hauv qib dhau los nrog ib qho kev xaiv ntxiv:

-U nyem: w: YOURPROGRAM. HEX

Txhawm rau txheeb xyuas, khiav avrdude nrog:

-U nyem: v: YOURPROGRAM. HEX

Yog xav paub ntxiv txog kev siv avrdude, sab laj nws phau ntawv ntawm:

www.nongnu.org/avrdude/user-manual/avrdude_…

Pom zoo: