Cov txheej txheem:

KIM Uno - 5 € Microprocessor Dev Kit Emulator: 13 Kauj Ruam (nrog Duab)
KIM Uno - 5 € Microprocessor Dev Kit Emulator: 13 Kauj Ruam (nrog Duab)

Video: KIM Uno - 5 € Microprocessor Dev Kit Emulator: 13 Kauj Ruam (nrog Duab)

Video: KIM Uno - 5 € Microprocessor Dev Kit Emulator: 13 Kauj Ruam (nrog Duab)
Video: doubling the drop every time the PC survives #shorts 2024, Kaum ib hlis
Anonim
Image
Image
KIM Uno - 5 € Microprocessor Dev Kit Emulator
KIM Uno - 5 € Microprocessor Dev Kit Emulator
KIM Uno - 5 € Microprocessor Dev Kit Emulator
KIM Uno - 5 € Microprocessor Dev Kit Emulator

KIM Uno yog lub khoos phis tawj, txhais cov khoom siv dev rau (retro) microprocessors. Tab sis cia kuv qhia lub tswv yim ntawm nws los ntawm kev rov qab mus rau lub sijhawm:

Rov qab los lig xyoo 2018 nws los rau kuv lub siab, tias kuv xav tsim lub me me microprocessor dev cov khoom siv, ib yam li KIM-1 nto moo los ntawm MOS Technology, Inc. thiab tsim los ntawm Chuck Peddle uas tseem koom nrog tsim 6502 CPU.

Tab sis tsim "pob txha liab qab" dev cov khoom siv nrog cov khoom siv tsis sib xws tsis muaj qhov kev xaiv txij li nws xav tau lub zog loj (txij li cov cuab yeej qub qub yuav siv qee qhov hnyav tam sim no) thiab tseem txhim kho yuav siv sijhawm ntau. Thiab kuv xav tau tam sim no!

Yog li ntawd, kuv tsim KIM Uno ua lub cuab yeej nqa tau, uas haum rau hauv ib txhais tes thiab tau siv los ntawm ob lub roj teeb CR2032. Nws siv ATMega328p ("Arduino") microcontroller khiav ntawm 8 MHz kom ua raws (lossis simulate) lub CPU xav tau. Qhov kev tsim qauv no tseem ua kom ntseeg tau, tias cov qauv CPU tau hloov pauv mus rau txhua yam uas haum rau sab hauv microcontroller lub cim xeeb flash. Yog li nws yog lub cuab yeej siv ntau lub hom phiaj.

Los ntawm qhov xwm txheej kuv tom qab tau saib cov lus tham zoo tiag tiag - hu ua Qhov Tseeb Apollo Kev Qhia Khoos Phis Tawj Tham (34C3) - hauv YouTube qhov twg "Ib qho Kev Qhia Teeb Khoos Phis Tawj" lossis OISCs tau hais. Kuv tsis tau paub txog lawv thiab pom qhov no yog tus neeg sib tw zoo tshaj plaws los siv nws.

KIM Uno ua raws CPU nrog tsuas yog ib qho kev qhia: subleq - rho tawm thiab ceg yog tsawg dua lossis sib npaug rau xoom.

Yog tias koj ua raws nrog kuv dhau ntawm Cov Lus Qhia no, koj tuaj yeem tsim koj tus kheej KIM Uno tsis muaj sijhawm. Thiab qhov zoo tshaj plaws - ib sab ntawm qhov tseeb tias koj tuaj yeem hloov kho nws kom koj nyiam - yog, nws tsuas yog tus nqi 4, 75 € los ua (raws li qhov kawg xyoo 2018).

Ib qho hint: muaj Git chaw cia khoom uas muaj txhua cov ntaub ntawv muab los ntawm cov kauj ruam sib txawv ntawm cov lus qhia no. Yog tias koj xav hloov kho qee cov peev txheej thiab faib rau peb nrog txhua yam koj tuaj yeem ua PR. Tab sis koj tseem tuaj yeem rub tawm txhua cov ntaub ntawv ib zaug nyob ntawd. Cias rau https://github.com/maxstrauch/kim-uno. Ua tsaug!

Muaj lwm qhov haujlwm zoo nkauj ntxim nyiam, hu ua zoo ib yam (KIM Uno), uas ua qhov zoo ib yam ntawm 6502 KIM Uno. Txheeb nws tawm ntawm no. Tus tsim txawm muag cov khoom siv. Yog li yog tias koj txaus siab rau 6502 thiab nyiam txoj haujlwm no, koj yuav tsum ua tib zoo saib!

Kauj Ruam 1: Nrhiav PCB

Kev xa khoom PCB
Kev xa khoom PCB
Kev xa khoom PCB
Kev xa khoom PCB

Raws li koj tuaj yeem pom, Kuv siv lub sijhawm los tsim PCB thiab cia nws ua haujlwm zoo. Txij li kev tsim nws sab nrauv thiab xa nws mus rau koj yuav siv sijhawm ntau (nyob ntawm seb koj nyob qhov twg hauv ntiaj teb;-)), tau txais nws xaj nws yog thawj kauj ruam. Peb tuaj yeem txuas ntxiv nrog lwm cov kauj ruam thaum PCB tau tsim thiab xa tuaj rau koj.

Kuv xaj kuv cov PCBs hauv Suav teb ntawm PCBWay tsuas yog $ 5. Kuv tsis tau txais txiaj ntsig los nthuav qhia PCBWay raws li kuv lub chaw tsim khoom rau PCBs, nws tsuas yog tias nws ua haujlwm zoo rau kuv thiab tseem yuav ua haujlwm zoo rau koj. Tab sis koj tuaj yeem xaj lawv ntawm lwm qhov chaw xws li JLCPCB, OSH Park lossis ib lub tuam txhab PCB hauv zos.

Tab sis yog tias koj txaus siab xaj lawv ntawm PCBWay koj tuaj yeem rub cov ntawv ZIP uas txuas nrog "kim-uno-rev1_2018-12-12_gerbers.zip" thiab xa ncaj qha mus rau PCBWay yam tsis muaj kev hloov pauv. Nov yog thawj daim ntawv kuv siv xaj PCBs koj tuaj yeem pom hauv cov duab.

Yog tias koj tau xaj lawv los ntawm lwm lub chaw tsim khoom koj yuav xav tau rov xa lawv los ntawm thawj qhov chaw KiCad, vim tias kuv tau tsim lawv nrog cov lus qhia tshwj xeeb los ntawm PCBWay koj tuaj yeem pom ntawm no. Txog thawj qhov chaw KiCad, rub tawm "kim-uno-kicad-sources.zip" thiab rho tawm nws.

Tab sis tseem muaj txoj hauv kev thib ob: yog tias koj tsis xav xaj PCB, koj tuaj yeem tsim koj tus kheej cov ntawv siv perfboard lossis txawm tias yog daim txiag ntoo.

Xijpeem: txij li tam sim no PCBs tab tom los, peb tuaj yeem tsom mus rau lwm qhov! Los, raws kuv qab.

Kauj Ruam 2: Nrhiav cov khoom siv

Nrhiav cov khoom
Nrhiav cov khoom
Nrhiav cov khoom
Nrhiav cov khoom
Nrhiav cov khoom
Nrhiav cov khoom

Tam sim no koj yuav tsum tau txais cov khoom siv. Txog qhov no koj yuav pom cov duab ntxaws ntxaws ntawm txhua qhov khoom siv thiab ntau npaum li cas koj xav tau, txuas nrog cov kauj ruam no ntxiv rau BOM (daim nqi ntawm cov ntaub ntawv).

BOM muaj cov txuas rau eBay. Txawm hais tias cov kev muab yuav raug kaw thaum koj nyeem qhov no, koj tuaj yeem siv nws los ua qhov pib. Cov khoom siv siv yog tus qauv zoo nkauj.

Hauv qab no kuv yuav piav qhia rau koj txhua yam khoom siv xav tau:

  • 7x 1 kΩ resistors rau xya ntu qhia. Koj tuaj yeem txo tus nqi (piv txwv li 470 Ω) kom ua rau lawv ci dua, tab sis txo nws kom tsis ntau npaum li cas cov LEDs yuav tuag lossis lub roj teeb tau nrawm heev. Kuv pom tias tus nqi no ua haujlwm rau kuv
  • 1x 10 kΩ raws li rub tawm tus tiv thaiv rau RESET kab ntawm lub microcontroller
  • 1x 100nF lub tshuab hluav taws xob kom ua kom zoo tawm qhov hluav taws xob nrawm (uas yuav tsum tsis txhob tshwm sim txij li peb tab tom siv roj teeb, yog, tab sis rau kev ntsuas zoo …)
  • 1x ATMega328P hauv DIP-28 pob (feem ntau hu ua ATMega328P-PU)
  • 1x lub ntsiab PCB - saib cov kauj ruam dhau los; los yog xaj los yog ua los ntawm koj tus kheej
  • 2x CR2032 cov roj teeb tuav
  • 1x SPDT (ib tus ncej, muab ob npaug rau) hloov pauv uas ib txwm muaj peb tus neeg sib tham thiab hauv txhua ntawm nws ob lub xeev (txawm nyob lossis tawm) nws txuas ob tus neeg
  • 20x tactile laub khawm rau cov keyboard. Txhawm rau siv sab nraub qaum ntawm PCB Kuv tau siv SMD tactile laub khawm (tus qauv 6x6x6 mm sawv daws yuav) - lawv zoo nkauj yooj yim rau solder zoo li koj yuav pom
  • YOOJ YIM: 1x 1x6 tus pin header rau txuas tus programmer, tab sis qhov no yog nyob ntawm yeem raws li koj yuav pom tom qab
  • 1x xya ntu qhia nrog 4 tus lej thiab 1x xya ntu ntu nrog 2 tus lej - pawg thawj coj yuav siv tsuas yog 0.36 nti (9, 14 mm) cov ntsiab lus nrog cov kab hluav taws xob sib txuas. Ob qhov kev xav tau yog qhov tseem ceeb txhawm rau kom tau txais chav ua haujlwm. Tab sis kuj tseem muaj hom xya ntu ntu pom ntau heev

Txuas nrog cov theem no koj tuaj yeem pom cov ntawv "tivthaiv-datasheets.zip" uas muaj cov ntaub ntawv qhia meej ntxiv txog qhov ntev thiab hom ntawm cov khoom siv. Tab sis feem ntau ntawm cov khoom siv yog tus qauv zoo heev thiab tuaj yeem nrhiav tau yooj yim rau nyiaj tsawg.

Tam sim no koj yuav tsum tau tos kom txog thaum koj muaj tag nrho cov khoom npaj kom txuas ntxiv mus rau qhov muag. Lub sijhawm no koj tuaj yeem dhia mus rau qhov kawg thiab nyeem me ntsis txog kev siv KIM Uno yog tias koj nyiam.

Kauj Ruam 3: Txheej Txheem Txheej Txheem Cuab Yeej

Soldering Tool Txheej txheem cej luam
Soldering Tool Txheej txheem cej luam
Soldering Tool Txheej txheem cej luam
Soldering Tool Txheej txheem cej luam

Rau kev xau thiab tsim KIM Uno koj xav tau cov cuab yeej qhia los ntawm cov duab:

  • Cutter hlau (los txiav qhov kawg ntawm cov khoom siv sib txuas)
  • Tiaj tus pliers
  • Pair ntawm tweezers
  • (tsim nyog) Cov laug uas tsis yog tuab - Kuv siv 0.56 hli cov laug
  • Cov hlau txuas - koj tsis xav tau cov hlau txuas siab (vim tias peb kuj tseem tsis ua foob pob hluav taws kev tshawb fawb ntawm no) - Kuv siv Ersa FineTip 260 tau ntev lawm tam sim no thiab nws zoo heev
  • Tus cwj mem flux: ntxiv cov dej ntws mus rau cov khoom siv thiab cov ntaub qhwv ua rau nws yooj yim dua los txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhawm rau txhaws, tom qab ntawd "ntws" los ntawm nws tus kheej mus rau qhov chaw raug*
  • Xaiv tau: daim txhuam cev (los ntawm cov hlau) rau koj cov hlau txuas

Txhawm rau tom qab program KIM Uno koj tseem yuav xav tau:

  • lub khoos phis tawj nrog AVR-GCC cov cuab yeej siv thiab avrdude los rub tawm cov firmware
  • tus ISP (programmer) - zoo li koj tuaj yeem pom ntawm daim duab Kuv siv kuv Arduino Uno ua tus ISP nrog cov duab tshwj xeeb - yog li tsis tas yuav yuav ib qho khoom siv zoo nkauj

* qee qhov kev taw qhia los ntawm tib neeg xav tau;-)

Koj puas npaj tau? Hauv kauj ruam tom ntej peb yuav pib sib sau ua ke KIM Uno.

Kauj Ruam 4: Soldering #1: Ntxiv Resistors thiab Capacitors

Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors
Soldering #1: Ntxiv Resistors thiab Capacitors

Koj yuav tsum ua haujlwm tas li los ntawm qhov tsawg tshaj plaws (hais txog qhov siab qhov siab) cov khoom ua ntej, mus rau cov khoom siab tshaj plaws kawg. Yog li ntawd, peb pib los ntawm kev ntxiv cov resistors thiab khoov ob txhais ceg ntawm nraub qaum kom cov resistors tau yooj yim rau solder thiab nyob hauv qhov chaw. Tom qab ntawd txiav cov xov hlau ntev.

Tsis tas li, tsis pom hauv cov duab, ntxiv me me 100 nF capacitor tib txoj kev.

Ib qho lus qhia: khaws cov hlua hlau hauv cov thawv me me, qee zaum lawv tuaj yeem siv tau.

Kauj Ruam 5: Soldering #2: Sib Sau Cov Keyboard

Soldering #2: Sib dhos Keyboard
Soldering #2: Sib dhos Keyboard
Soldering #2: Sib dhos Keyboard
Soldering #2: Sib dhos Keyboard
Soldering #2: Sib dhos Keyboard
Soldering #2: Sib dhos Keyboard

Cov kauj ruam tom ntej yog txhawm rau txhawm rau 20 SMD cov cuab yeej siv tau yooj yim. Txij li qhov haujlwm no yog me ntsis fiddly, peb ua tam sim no, thaum PCB tso ncaj rau ntawm lub rooj ua haujlwm.

Peb yuav ua haujlwm los ntawm sab saum toj mus rau hauv qab (lossis los ntawm sab laug mus rau sab xis yog tias PCB tau qhia raws li pom hauv cov duab) thiab pib nrog thawj kab: xaiv ib qho ntawm plaub daim ntaub rau txhua qhov hloov pauv thiab ntub nws nrog tus cwj mem flux.

Tom qab ntawd siv ob tus tweezers txhawm rau rub tus tes hloov thiab tso nws kom zoo zoo rau ntawm plaub daim ntaub qhwv. Tom qab ntawd muab tshuaj txhuam tsuas yog txhais ceg ntawm qhov hloov pauv uas nyob ntawm lub ncoo uas koj tau xaiv thiab npaj nrog flux. Rau qhov no koj yuav tsum "lob" qee cov laug nrog koj cov hlau ua ntej pib. Siv txoj hauv kev no, ua kom tiav txhua kab ntawm cov hloov pauv, tsuas yog siv ib txhais ceg.

Cov duab nrog cov xib xub qhia txog kev nthuav dav li cas cov laug tau ua tiav raws nraim.

Tom qab koj tau siv tag nrho kab (ib tus pin nkaus xwb) koj tuaj yeem hloov kho me ntsis los ntawm kev ua kom sov tus pin rov qab thiab rov tso qhov hloov pauv. Nco ntsoov, tias cov hloov pauv tau ua haujlwm zoo li ua tau.

Yog tias koj zoo siab nrog kev sib koom ua ke, koj tuaj yeem ntub tag nrho lwm cov pins nrog tus cwj mem flux thiab tom qab ntawd muab lawv los ntawm kov nws nrog cov hlau txuas thiab ntxiv me ntsis solder los ntawm kov nws kuj. Koj yuav pom tias cov laug tau nqus ncaj qha mus rau lub ncoo.

Tom qab soldering kab lossis yog li koj yuav pom tias koj tau dai ntawm nws thiab nws tsis yog qhov nyuaj tab sis rov ua dua. Yog li tsuas yog ua tus so thiab koj yuav xaus nrog cov keyboard tiav tsis muaj sijhawm.

Kauj Ruam 6: Soldering #3: Xya Segment Display, Hloov thiab Pin Header

Soldering #3: Xya Segment Display, Hloov thiab Pin Header
Soldering #3: Xya Segment Display, Hloov thiab Pin Header
Soldering #3: Xya Segment Display, Hloov thiab Pin Header
Soldering #3: Xya Segment Display, Hloov thiab Pin Header
Soldering #3: Xya Segment Display, Hloov thiab Pin Header
Soldering #3: Xya Segment Display, Hloov thiab Pin Header

Tam sim no koj tuaj yeem ntxiv qhov hloov pauv thiab tus pin header (xaiv tau) los ntawm kev tuav nws nrog koj tus ntiv tes thiab siv ib tus pin los tuav nws rau PCB, yog li koj tuaj yeem muab lwm tus pin thiab thaum kawg kov thawj tus pin tuav.

Ua tib zoo saib xyuas tias koj tsis hlawv koj tus kheej nrog cov hlau kub yaj. Yog tias koj tsis xis nyob nrog qhov no, koj tuaj yeem siv daim kab xev me ntsis (piv txwv li tus neeg pleev xim daim kab xev) los tuav cov khoom. Txoj kev no koj muaj ob txhais tes dawb txav mus.

Xya qhov kev nthuav qhia tau muab muag tib yam nkaus (saib duab): koj muab tso rau hauv, tuav nws nrog koj txhais tes lossis daim kab xev thiab muab ob lub pins sib dhos los tuav nws nyob rau hauv qhov chaw thaum koj tuaj yeem txuas lwm tus pin.

Tab sis ceev faj thiab muab xya ntu tso rau hauv qhov yog (nrog cov lej zauv tig mus rau cov keyboard). Txwv tsis pub koj muaj teeb meem …

Kauj Ruam 7: Soldering #4: Soldering Microcontroller

Soldering #4: Soldering Microcontroller
Soldering #4: Soldering Microcontroller

Tam sim no koj muaj kev xyaum ntau, koj tuaj yeem mus tom ntej thiab tso rau hauv lub microcontroller nrog lub thais rau saum (lossis tus pin thawj) tig mus rau qhov hloov. Siv lub tiaj tus pliers koj tuaj yeem ua tib zoo khoov ob txhais ceg ntawm lub microcontroller me ntsis hauv, kom lawv sib phim lub qhov ntawm PCB.

Txij li nws yog qhov haum, koj xav tau qee lub zog tswj kom tso lub microcontroller rau hauv. Qhov kom zoo dua yog, nws tsis poob tawm. Qhov no txhais tau tias, koj tuaj yeem siv koj lub sijhawm thiab muab nws tso rau tom qab.

Kauj Ruam 8: Soldering #5: Ntxiv Cov Roj Teeb (Cov Kauj Ruam kawg)

Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)
Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)
Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)
Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)
Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)
Soldering #5: Ntxiv Cov Tuav Roj Teeb (Kauj Ruam kawg)

Thaum kawg koj yuav tsum tau ntxiv cov tuav lub roj teeb rau sab nraub qaum. Rau qhov no koj tsuas yog siv tus cwj mem flux thiab ntub tag nrho plaub lub pawm thiab tom qab ntawd tau txais qee qhov laug ntawm koj cov hlau. Teem tus tuav lub roj teeb kom zoo ntawm ob daim ntaub qhwv. Ntawm ob qho kawg ntawm kev sib cuag yuav tsum muaj tib qho nyiaj ntawm PCB ncoo pom. Kov PCB ncoo thiab txhais ceg ntawm lub roj teeb nrog koj cov hlau. Cov laug yuav ntws hauv qab lub ncoo thiab hla nws thiab ruaj ntseg nws hauv qhov chaw raws li qhia hauv daim duab. Yog tias koj muaj teeb meem nrog qhov no, koj tuaj yeem ntxiv ntau ntxiv nrog tus cwj mem.

Kauj ruam 9: Qhib lub Emulator

Flashing lub Emulator
Flashing lub Emulator
Flashing lub Emulator
Flashing lub Emulator
Flashing lub Emulator
Flashing lub Emulator

Hauv cov ntawv zauv zauv txuas "kim-uno-firmware.zip" koj tuaj yeem nrhiav qhov chaws rau tus emulator nrog rau twb tau suav ua "main.hex" uas koj tuaj yeem ncaj qha upload rau lub microcontroller.

Ua ntej koj tuaj yeem siv nws tiag tiag, koj yuav tsum teeb tsa lub fuse me me ntawm lub microcontroller, yog li nws siv sab hauv 8 MHz moos yam tsis faib nws ib nrab. Koj tuaj yeem ua txoj haujlwm tiav nrog cov lus txib hauv qab no:

avrdude -c stk500v1 -b 9600 -v -v -P /dev/cu.usbmodem1421 -p m328p -U lfuse: w: 0xe2: m -U hfuse: w: 0xd9: m -U efuse: w: 0xff: m

Yog tias koj tsis paub avrdude: nws yog ib qho program rau upload cov program rau microcontroller. Koj tuaj yeem kawm paub ntau ntxiv txog nws ntawm no. Yeej koj nruab nws thiab tom qab ntawd nws tau npaj siv. Rau koj teeb tsa koj yuav xav hloov qhov kev sib cav ntawm "-P" mus rau lwm qhov chaw nres nkoj. Thov txheeb xyuas koj lub khoos phis tawj uas siv chaw nres nkoj txuas (piv txwv li hauv Arduino IDE).

Tom qab qhov no koj tuaj yeem nyem lub firmware rau lub microcontroller nrog cov lus txib no:

avrdude -c stk500v1 -b 9600 -v -v -P /dev/cu.usbmodem1421 -p m328p -U nyem: w: main.hex

Ib zaug ntxiv: tib yam siv rau "-P" raws li saud.

Txij li thaum kuv tsis muaj tus "kws tshaj lij" ISP (In-System Programmer) Kuv ib txwm siv kuv Arduino UNO (saib duab) thiab kos duab kuv txuas ("arduino-isp.ino", los ntawm Randall Bohn). Kuv paub tias muaj qhov hloov tshiab dua, tab sis nrog cov ntawv no kuv tsis muaj teeb meem pes tsawg nrog tsib xyoos dhau los, yog li kuv khaws nws. Nws tsuas yog ua haujlwm. Siv cov lus pom hauv lub taub hau ntawm daim duab kos koj tau txais pinout ntawm Arduino UNO thiab siv cov txheej txheem ntawm KIM Uno (saib txuas nrog) koj tuaj yeem tau txais pinout ntawm 1x6 ISP header ntawm KIM Uno. Tus lej tus pin, nyob ze rau xya ntu ntu yog tus pin 1 (GND). Cov pins hauv qab no yog (hauv txoj cai xaj): RESET, MOSI, MISO, SCK, VCC. Koj tuaj yeem txuas VCC ib qho rau 3V3 lossis 5V.

Yog tias koj tsis tau ntxiv 1x6 tus pin header koj tuaj yeem siv cov xov tooj cua hauv xov tooj thiab muab tso rau hauv qhov txuas sib txuas thiab tig lawv nrog koj tus ntiv tes - ib yam li qhia hauv daim duab. Qhov no ua kom muaj kev sib cuag txaus kom nyem lub firmware thiab teeb tsa lub fuses. Tab sis yog tias koj nyiam kev teeb tsa tas mus li, koj yuav tsum tau ntxiv qhov ntxiv 1x6 tus pin headers.

Kuv muaj ob lub cuab yeej: cov khoom tsim tawm yam tsis muaj tus pin headers thiab kev txhim kho nrog pin headers uas kuv tawm txuas nrog thiab siv nws ntau thiab ntau dua thaum lub sijhawm txhim kho. Qhov no yooj yim dua.

Kauj ruam 10: Tiav lawm

Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm

Tam sim no koj ua tiav thiab tuaj yeem pib sau koj tus kheej cov haujlwm subleq ntawm daim ntawv, sib dhos nws thiab tom qab ntawd nkag mus rau hauv lub cim xeeb.

KIM Uno los nrog kev npaj ua ntej Fibonacci kev suav pib ntawm qhov chaw nco 0x0a. Nws tau teeb tsa los ntawm lub hauv paus rau n = 6 yog li yuav tsum ua rau tus nqi ntawm 8. Nias "Mus" los pib suav.

Kauj Ruam 11: Kev Txheeb Xyuas PCB Tsim

Kev Txheeb Xyuas PCB Tsim
Kev Txheeb Xyuas PCB Tsim
Kev Txheeb Xyuas PCB Tsim
Kev Txheeb Xyuas PCB Tsim

Tom qab ua tiav txoj haujlwm no kuv pom ob peb lub ntsiab lus uas tseem ceeb thiab yuav tsum tau hais hauv qhov kev hloov kho tshiab ntawm pawg thawj coj:

  • ATMega328p lub vijtsam txhob lo lo ntxhuav tsis muaj qhov zoo li niaj zaus qhov twg tus thawj tus pin nyob. DIP-28 hneev taw tsis txawm tias muaj lub ncoo plaub fab uas tus thawj tus pin nyob. Qhov no yuav tsum tau txhim kho nrog cov ntxaws ntxaws ntxaws ntxaws kom tiv thaiv tsis meej pem
  • ISP lub taub hau tsis muaj daim ntawv lo sib txuas ntawm daim kab xev. Qhov no ua rau nws nyuaj rau lees paub yuav ua li cas txuas nws mus rau ISP
  • ISP lub taub hau tuaj yeem hloov pauv mus rau 2x6 tus pin header nrog tus qauv tus qauv teeb tsa los tiv thaiv kev tsis meej pem

Sib nrug los ntawm cov ntsiab lus no kuv zoo siab heev li cas nws tshwm sim thiab ua haujlwm thawj zaug.

Kauj Ruam 12: Yuav Ua Li Cas Program SUBLEQ?

Image
Image
Yuav Ua Li Cas Program SUBLEQ?
Yuav Ua Li Cas Program SUBLEQ?
Yuav Ua Li Cas Program SUBLEQ?
Yuav Ua Li Cas Program SUBLEQ?

Raws li tau hais thaum pib, lub khoos phis tawj tam sim no ntawm KIM Uno ua raws ib qho Kev Qhia Teeb Khoos Phis Tawj (OISC) thiab muab cov lus qhia subleq los ua cov lej.

Cov lus qhia subleq sawv rau kev rho tawm thiab ceg yog tsawg dua lossis sib npaug rau xoom. Hauv pseudo-code qhov no zoo li cov hauv qab no:

subleq A B C mem [B] = mem [B] - mem [A]; yog (mem [B] <= 0) tau txais C;

Txij li thaum KIM Uno ua raws lub tshuab 8-ntsis, txhua qhov kev sib cav A, B thiab C yog 8 qhov txiaj ntsig thiab yog li nws tuaj yeem hais txog tag nrho lub cim xeeb tseem ceeb ntawm 256 byte. Pom tseeb qhov no tuaj yeem txuas ntxiv, los ntawm kev ua A, B thiab C ntau-byte qhov tseem ceeb. Tab sis tam sim no cia ua kom yooj yim.

KIM Uno kuj tseem muaj "cov khoom siv": cov zaub thiab cov keyboard. Nws siv lub cim nco mapped architecture los cuam tshuam cov khoom siv no, txawm hais tias daim ntawv qhia kev nco yog yooj yim heev:

  • 0x00 = Z sau npe (xoom) thiab yuav tsum tau khaws cia xoom.
  • 0x01 - 0x06 = rau bytes uas sawv cev rau tus nqi ntawm txhua ntu ntawm cov zaub (ntawm sab xis mus rau sab laug). Tus nqi 0xf - saib qhov chaws (main.c) kom paub meej ntxiv.
  • 0x07, 0x08, 0x09 = peb bytes qhov twg txhua byte sawv cev rau ob xya ntu ntu qhia (ntawm sab xis mus rau sab laug). Qhov chaw nco no tso cai yooj yim tso saib qhov tshwm sim yam tsis faib qhov tshwm sim rau hauv ob qho nibbles los tso nws rau hauv ib tus lej cim cim qhov chaw 0x01 - 0x06.
  • 0x0a+ = A program pib ntawm 0x0a. Tam sim no qhov "Mus" qhov tseem ceeb ua los ntawm 0x0a tsau.

Nrog cov ntaub ntawv no ib tus tuaj yeem tam sim no sau ib qhov program hauv kev sib sau thiab sau cov lus qhia rau hauv lub cim xeeb thiab tom qab ntawd ua nws. Txij li tsuas muaj ib qho kev qhia, tsuas yog cov lus sib cav (A, B thiab C) nkag mus. Yog li tom qab peb qhov chaw nco nco cov lus qhia ntxiv tom ntej pib thiab lwm yam.

Txuas nrog cov kauj ruam no koj tuaj yeem pom cov ntawv "fibonacci.s" thiab tseem muaj cov duab ntawm qhov kev zov me nyuam sau uas yog piv txwv siv Fibonacci. Tab sis tos: muaj peb daim ntawv qhia siv - tshwj xeeb ADD, MOV thiab HLT - uas tsis yog subleq. "Qhov kev pom zoo yog dab tsi? Koj tsis tau hais tias tsuas muaj ib qho kev qhia, subleq?" koj nug? Nws yog qhov yooj yim heev: nrog subleq ib tus tuaj yeem ua raws cov lus qhia yooj yim heev:

MOV a, b - luam cov ntaub ntawv ntawm qhov chaw a rau b tuaj yeem tsim los ntawm:

  1. subleq b, b, 2 (cov lus qhia tom ntej)
  2. subleq a, Z, 3 (cov lus qhia tom ntej)
  3. subleq Z, b, 4 (cov lus qhia tom ntej)
  4. subleq Z, Z, np. 5 (cov lus qhia tom ntej)

Siv cov lej rho tawm ntawm subleq, uas ua mem - mem [a] thiab rov sau dua mem nrog qhov tshwm sim, tus nqi raug theej siv cov ntawv sau xoom. Thiab "subleq Z, Z, …" tsuas yog rov pib sau npe xoom rau 0, tsis hais tus nqi Z.

ADD a, b - ntxiv qhov muaj txiaj ntsig a + b thiab khaws cov lej hauv b tuaj yeem ua los ntawm:

  1. subleq a, Z, 2 (cov lus qhia tom ntej)
  2. subleq Z, b, 3 (cov lus qhia tom ntej)
  3. subleq Z, Z, np. 4 (cov lus qhia tom ntej)

Cov lus qhia no yooj yim xam mem - (- mem [a]) uas yog mem + mem [a] los ntawm kev siv cov lej rho tawm.

HLT - nres CPU thiab xaus qhov ua tiav:

Los ntawm kev txhais tus emulator paub tias CPU xav kom txiav tawm yog tias nws dhia mus rau 0xff (lossis -1 yog hu nkauj). Yog li yooj yim

subleq Z, Z, -1

ua txoj hauj lwm thiab qhia rau tus emulator, tias nws yuav tsum xaus emulation.

Siv peb qhov lus qhia yooj yim no, Fibonacci algorithm tuaj yeem ua tiav thiab ua haujlwm tau zoo. Qhov no yog, vim tias OISC tuaj yeem suav txhua yam hauv lub computer "tiag" tuaj yeem suav nrog tsuas yog cov lus qhia subleq. Tab sis ntawm chav kawm, muaj ntau qhov kev sib pauv los ua - zoo li txoj cai ntev thiab nrawm. Txawm li cas los xij nws yog txoj hauv kev zoo los kawm thiab sim nrog qib qis software programming thiab khoos phis tawj.

Txuas nrog cov kauj ruam no koj tseem tuaj yeem pom zip archive "kim_uno_tools.zip". Nws suav nrog qee qhov kev sib dhos yooj yim thiab ua piv txwv rau KIM Uno. Lawv tau sau hauv NodeJS - nco ntsoov tias koj tau teeb tsa nws.

Sib sau ua ke cov haujlwm

Yog tias koj saib "fibonacci/fibonacci.s" koj yuav pom tias nws yog qhov chaws rau kev tham txog kev siv fibonacci. Txhawm rau sib sau nws thiab ua qhov program tawm ntawm nws, tias KIM Uno tuaj yeem ua haujlwm, koj nkag mus rau cov lus txib hauv qab no (hauv lub hauv paus ntawm kev rho tawm "kim_uno_tools.zip" archive):

node assemble.js fibonacci/fibonacci.s

thiab nws yuav luam ib qho yuam kev yog tias koj ua yuam kev lossis nchuav tawm cov txiaj ntsig tau tshwm sim. Txhawm rau txuag nws, koj tuaj yeem luam cov ntawv tso tawm thiab khaws nws rau hauv cov ntawv lossis yooj yim khiav cov lus txib no:

node assemble.js fibonacci/fibonacci.s> yourfile.h

Cov zis tau muab tso rau hauv ib txoj hauv kev uas nws tuaj yeem suav nrog ncaj qha rau hauv KIM Uno firmware raws li C header file, tab sis qhov kev sim kuj tseem tuaj yeem siv nws los simulate. Tsuas nkag mus:

node sim.js yourfile.h

Thiab koj yuav raug nthuav tawm nrog qhov kev sim sim thiab cov txiaj ntsig xav tau los ntawm KIM Uno ntawm cov zaub.

Nov yog cov lus qhia luv luv rau cov cuab yeej no; Kuv qhia koj kom ua si ib puag ncig nrog lawv thiab saib lawv ua haujlwm li cas. Txoj hauv kev no koj tau txais kev paub tob thiab kawm paub cov ntsiab cai ua haujlwm tom qab CPUs, cov lus qhia, sib sau ua ke thiab emulators;-)

Kauj ruam 13: Outlook

Outlook
Outlook
Outlook
Outlook
Outlook
Outlook

Nrog koj zoo siab

Yog tias koj nyeem qhov no tej zaum koj yuav hla qhov kev qhia no thiab tsim koj tus kheej KIM Uno. Qhov no zoo heev.

Tab sis txoj kev taug mus tsis xaus ntawm no - muaj ntau txoj hauv kev xaiv yuav ua li cas koj tuaj yeem hloov kho KIM Uno thiab kho nws raws li koj xav tau thiab nyiam.

Piv txwv li KIM Uno tuaj yeem nruab nrog "tiag tiag" retro CPU emulator uas yuav ua raws MOS 6502 lossis Intel 8085, 8086 lossis 8088. Tom qab ntawd nws yuav mus rau kuv qhov kev pom thawj zaug, ua ntej kuv kawm txog OISCs.

Tab sis muaj lwm qhov siv tau, txij li kev tsim kho vajtse zoo nkauj heev. KIM Uno tuaj yeem siv ua…

  • … cov chaw taws teeb xws li rau CNCs lossis lwm yam khoom siv. Tej zaum wired lossis nruab nrog IR diode lossis lwm tus xa xov wireless
  • … A (hexadecimal) lub tshuab xam zauv hnab tshos. Lub khoos phis tawj tuaj yeem hloov kho tau yooj yim heev thiab tsim lub rooj tsavxwm tsis tas yuav hloov pauv ntau. Tej zaum silkscreen tuaj yeem hloov kho nrog kev ua lej thiab qhov sib txawv ntawm ntu tuaj yeem raug tshem tawm. Sib nrug ntawm qhov no, nws twb tau npaj rau qhov kev hloov pauv no

Kuv vam tias koj muaj kev lom zem ntau ntxiv tom qab thiab cia siab tias tsim KIM Uno li kuv tau tsim thiab npaj nws. Thiab yog tias koj txuas ntxiv lossis hloov kho nws - thov qhia rau kuv paub. Cheers!

Kev sib tw PCB
Kev sib tw PCB
Kev sib tw PCB
Kev sib tw PCB

Khiav Tawm Hauv Kev Sib Tw PCB

Pom zoo: