Cov txheej txheem:

Handheld BASIC Computer: 6 Kauj Ruam (nrog Duab)
Handheld BASIC Computer: 6 Kauj Ruam (nrog Duab)

Video: Handheld BASIC Computer: 6 Kauj Ruam (nrog Duab)

Video: Handheld BASIC Computer: 6 Kauj Ruam (nrog Duab)
Video: Hwm Pheej Thoj - Rov Mus Txog Vib Nais 2024, Kaum ib hlis
Anonim
Handheld BASIC Computer
Handheld BASIC Computer
Handheld BASIC Computer
Handheld BASIC Computer

Cov Lus Qhia no piav qhia kuv txheej txheem ntawm kev tsim lub khoos phis tawj me me uas siv BASIC. Lub khoos phis tawj tau tsim nyob ib puag ncig ATmega 1284P AVR nti, uas tseem tau tshoov lub npe ua dag rau lub khoos phis tawj (HAL 1284).

Qhov kev tsim no yog HAVILY tau tshoov siab los ntawm txoj haujlwm zoo kawg nyob ntawm no thiab SuperCON BASIC Badge.

Lub khoos phis tawj khiav hloov kho ntawm TinyBasic, txawm hais tias feem ntau ntawm cov software yog ua raws txoj haujlwm los ntawm dan14. Koj tuaj yeem ua tau raws li Cov Lus Qhia no, lossis tseem zoo dua, txhim kho nws txij li kuv tau ua qee qhov yuam kev.

Txog qhov haujlwm no, kuv kuj tau tsim phau ntawv qhia. Nws hais txog qee qhov kab thiab qhov tshwj xeeb rau tus saib xyuas xaiv tab sis qhov tseem ceeb tshaj plaws, nws muaj cov npe ntawm BASIC cov haujlwm.

Tom qab qhov no tau tshaj tawm, Kuv tau ua yeeb yaj kiab qhia txog qhov project.

Kauj Ruam 1: Qhov Chaw Kuv Siv

Qhov Chaw Kuv Siv
Qhov Chaw Kuv Siv
Qhov Chaw Kuv Siv
Qhov Chaw Kuv Siv
Qhov Chaw Kuv Siv
Qhov Chaw Kuv Siv

Rau lub ntsiab IC:

  • AWM 1284 P
  • 16 MHz Crystal
  • 2x 22pf Ceramic Capacitor
  • 10KΩ Resistor (Rau rov pib rub tawm)
  • 4-pin khawm (Rau rov pib dua)
  • 470Ω Reistor (Rau cov vis dis aus sib xyaw)
  • 1kΩ Resistor (Rau kev sib xyaw ua ke video)
  • 3-tus pin jumper (Rau lub teeb liab video)
  • Passive Buzzer

Rau keybaord tswj:

  • ATmega 328P (Zoo li cov uas siv hauv Arduino Uno)
  • 16 MHz Crystal
  • 2x 22pf Ceramic Capacitor
  • 12x 10KΩ Resistor (Rau rov pib rub thiab khawm)
  • 51x 4-pin khawm (Rau cov keyboard tiag)

Rau lub zog:

  • L7805 Voltage Regulator
  • 3 hli LED
  • 220Ω Resistor (Rau LED)
  • 2x 0.1µF Electrolytic Capacitor
  • 0.22 µF Electrolytic Capacitor (Koj tuaj yeem hloov qhov no 0.22 thiab ib qho 0.1 rau ib 0.33. Kuv kuj tau raug hais tias qhov txiaj ntsig tsis muaj teeb meem tiag tiag, tab sis kuv tsis zoo nrog cov capacitors)
  • 2x 2-tus pin jumper (Rau lub hwj chim nkag thiab rau lub ntsiab hloov)

GPIO (Tej zaum ntxiv ob peb yam ntxiv):

  • 7-tus pin Jumper
  • 2 x 8-pin Jumper
  • 2-pin Jumper (Rau 5V thiab GND)
  • 3-4-pin Jumper (Rau Kev Sib Txuas Lus)

Tsis-PCB:

  • 4 "LCD Zaub nrog Composite Video (Kuv tau muaj qhov hluav taws xob nkag nruab nrab ntawm 7-30V)
  • 3D luam yas dhos rau zaub
  • Qee yam hloov

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit

Lub Circuit Court tsis zoo nkauj heev thiab ntau ntawm IC-cheeb tsam tseem ceeb tau tshwm sim los ntawm dan14. Uas tau hais, nws yog qhov ncaj ncaj rau pem hauv ntej Arduino ntawm Breadboard-Circuit. Cov keyboard yog kab sib chaws yooj yim thiab tswj los ntawm ATmega328. Ob lub AVR chips sib tham ntawm UART Serial pins.

Ob daim duab thiab kuv Eagle-cov ntaub ntawv tau txuas nrog thiab vam tias yuav txaus kom rov tsim lub Circuit Court. Yog tias tsis yog, thov qhia rau kuv thiab kuv yuav hloov kho Cov Lus Qhia.

Kauj Ruam 3: PCB

Cov PCB
Cov PCB
Cov PCB
Cov PCB

PCB yog 2-txheej thiab tsim siv Auto Route (Oh, dab tsi yog ** qhov!). Nws muaj cov nyees khawm thiab lub zog ntsuas LED nyob rau sab xub ntiag thiab tus so nyob tom qab. Kuv muaj kuv li PCB ua nrog JCL PCB, thiab lawv tau ua haujlwm zoo nrog nws. Cov ntaub ntawv xav tau los rov tsim dua PCB yuav tsum nyob hauv Eagle-files los ntawm ua ntej.

Kuv xav qhia tias koj rov tsim kho PCB, vim tias kuv muaj qee yam uas kuv xav tau ua txawv. Yog tias koj nyiam kuv tus qauv, kuv tseem muaj (raws li kev sau ntawv) plaub daim ntawv tsis siv uas kuv ntau dua txaus siab muag.

Lub rooj tsavxwm muaj plaub qhov qhov uas kuv tau siv rau kev teeb tsa LCD Zaub.

Kauj Ruam 4: Xa Cov Cai

Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code

Ob qho 1284 thiab 328 ntawm chav kawm xav tau tus lej thiab tus lej kuv siv tuaj yeem pom ntawm no: https://github.com/PlainOldAnders/HAL1284 hauv ArduinoSrc/src. Kuv yooj yim siv Arduino IDE rau kev hloov kho thiab xa cov cai tab sis ua ntej uas tuaj yeem ua tiav, koj yuav tsum tau hlawv bootloaders ntawm ICs:

ATMega328:

Nov yog ib qho yooj yim, hauv qhov kev nkag siab tias muaj kev txhawb nqa ntau heev yuav ua li cas hlawv lub bootloader thiab xa cov lej rau IC no. Kuv feem ntau ua raws phau ntawv qhia no, feem ntau vim tias kuv tsis nco qab qhov tshwj xeeb.

Txoj cai rau 328 (hauv qab ArduinoSrc/keypad) yog qhov yooj yim haum. Nws tag nrho tso siab rau Adafruit_Keypad-master-library. Yog tias muaj dab tsi hloov pauv txog lib, Kuv tau suav nrog cov version uas kuv siv ntawm kuv github-nplooj ntawv hauv ArduinoSrc/lib.

ATmega1284: Cov

Qhov no nyuaj me ntsis rau kuv thaum kuv xub tau txais IC. Kuv pib tawm los ntawm kev tau txais lub bootloader los ntawm no, thiab ua raws li kev teeb tsa-qhia. Txhawm rau hlawv lub bootloader, kuv tsuas yog ua tib yam li nrog 328 thiab tau txais kev pab los ntawm no. Rau ob qho ICs Kuv tsuas yog siv Arduino Uno rau ob qho tib si hlawv lub bootloader thiab xa cov cai (tshem IC los ntawm Arduino Uno thaum rub tawm).

Cov cai (hauv qab ArduinoSrc/HAL1284Basic) yog qhov nyuaj heev rau kuv tab sis kuv tuaj yeem hloov kho qee qhov ntawm cov cai:

Kuv ntxiv ob peb ntawm cov lus txib (cov cim nrog [A] hauv phau ntawv qhia.pdf), thiab kuv kuj hloov lwm cov lus txib:

Tone: Lub suab hais kom ua tsuas yog siv Arduino lub suab ua haujlwm ua ntej, tab sis thaum siv TVout tsev qiv ntawv, qhov no ua rau lub suab nrov tsis ua haujlwm raug. Kuv hloov nws los siv TVout lub suab-ua haujlwm, tab sis qhov no txhais tau tias lub suab tus pin HAS yuav tsum yog tus pin 15 (rau atmega1284)

Kev Sib Txuas Txuas: Txij li cov keyboard yog DIY, nws siv kev sib txuas lus txuas rau kev nyeem cov cim. Txij li thaum atmega1284 tau siv ntawm no, muaj ob txoj kab sib txuas lus sib txuas, thiab thaum "sercom" tau qhib, cov cai kuj tseem tso cai sau ntawv los ntawm chaw nres nkoj txuas (los ntawm khoos phis tawj lossis lwm yam).

Kev daws teeb meem: Tus saib xyuas siv rau txoj haujlwm no zoo nkauj heev, thiab xav tau kev daws teeb meem me me, lossis lwm yam duab flickers. Yog tias siv lub ntsuas saib zoo dua, Kuv xav qhia tias koj hloov qhov kev daws teeb meem hauv teeb tsa ua haujlwm.

Kauj ruam 5: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Nrog cov cai tau tshaj tawm thiab PCB thiab cov khoom npaj tau, tam sim no yog lub sijhawm los sib dhos. Txhua feem uas kuv siv tau dhau los ntawm qhov, yog li ntawd cov khoom siv tsis yooj yim heev (tsis zoo li cov neeg phem-SMD-soldering-fellas nyob ntawd). Tus saib tau txuas mus rau plaub lub qhov tho hauv PCB nrog lub tshuab luam ntawv 3D. Yog tias siv lwm tus saib, plaub lub qhov tho qhov tuaj yeem cia siab tias yuav siv rau kev txhim kho qhov no.

Tus tuav lub tshuab siv ntawm no, kuj tseem tsim los ua lub tsev hloov pauv (txuas nrog "hloov" jumper ntawm PCB) thiab peb lub khawm tswj rau tus saib. Tus tuav tau nrawm nrog yas M3 ntsia liaj qhov rooj thiab qhov txuas.

Rau lub hwj chim ntsaws kuv tau siv JST PCB txuas, txawm hais tias lub khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khoob khawm ໄຟ ຟ້າ) Txhawm rau ua kom lub rooj tsavxwm, Kuv hloov ntawm 12V lub zog siv lossis peb lub 18650 roj teeb ua ke. Ib tus menyuam nyuj nyoos du dua kuv tus kheej tuaj yeem tsim tsim cov roj teeb uas nplua rau lub rooj tsavxwm.

Kauj Ruam 6: Kab thiab Ua Haujlwm Yav Tom Ntej

Cov Xauv Xauv: Cov xub-khawm tau ua yuam kev thiab tsis ua haujlwm ntau. Qhov no ua rau navigation nyuaj

Cov Ntaub Ntawv I/O: Muaj qhov muaj peev xwm File I/O tab sis cov no tsis tau ua tiav. Txhawm rau tawm tsam qhov no, HAL1284Com software tuaj yeem xa cov ntaub ntawv mus rau pawg thawj coj saib. Nws tseem tuaj yeem tso rau hauv EEPROM.

PEEK/POKE: PEEK thiab POKE tsis tau sim, thiab kuv tsis paub meej tias cov chaw nyob yog dab tsi.

So: So (Esc) qee zaum tau ua rau tag nrho cov cai, thaum nyob hauv qhov tsis muaj qhov kawg.

Pin 7: Tus PWM tus pin 7 tuaj yeem nyuaj thaum sim DWRITE Siab lossis AWRITE 255. Nws ua haujlwm zoo nrog AWRITE 254.

Idiot: Nws yuav zoo tagnrho tseem tuaj yeem rub tawm ntawm UART1 tab sis kev tshaj tawm tsuas yog ua tau ntawm UART0, yog li upload yuav tsum ua tiav los ntawm kev rho tawm lub ntsiab IC. Lub Vijtsam thiab Tus Tswj Hluav Taws Xob 5 tau kub me ntsis thaum ua haujlwm ntev.

Pom zoo: