Cov txheej txheem:

Atmega16/32 Development Board With LCD: 8 Kauj Ruam
Atmega16/32 Development Board With LCD: 8 Kauj Ruam

Video: Atmega16/32 Development Board With LCD: 8 Kauj Ruam

Video: Atmega16/32 Development Board With LCD: 8 Kauj Ruam
Video: Interface Lcd With AVR atmega8 atmega16 atmega 32 2024, Hlis ntuj nqeg
Anonim
Atmega16/32 Development Board With LCD
Atmega16/32 Development Board With LCD
Atmega16/32 Development Board With LCD
Atmega16/32 Development Board With LCD
Atmega16/32 Development Board With LCD
Atmega16/32 Development Board With LCD

Cov lus qhia no qhia, yuav ua li cas ua koj tus kheej pawg thawj coj loj rau Atmega16 lossis Atmega32 tus txheej txheem. Qhov Internet muaj cov laug cam tsim hauv tsev, tab sis kuv xav tias, muaj chav nyob rau lwm qhov. Pawg thawj coj no tau muaj txiaj ntsig zoo rau kuv cov phiaj xwm thiab kuv tau tsim thiab ua nws los ua haujlwm rau ib qho ntawm kuv txoj haujlwm. Nws muab dab tsi?- ISP-txuas.- Hloov kho qhov ntsuas hluav taws xob rau AREF nrog trimmer. yog li koj tuaj yeem siv leds kuj nrog lwm qhov chaw nres nkoj.- Spike tuav rau PORTA, PORTB, PORTC thiab PORTD. (ntu rau pawg thawj coj)- 1x Atmega16 lossis Atmega32 processor- 1x siv lead ua (Nws yog qhov koj xaiv ntau npaum li cas Mhz nws yuav yog)- 2x 27 pF capacitors rau siv lead ua- 1x 7805 tus tswj hluav taws xob- 1x 47uF 16V capacitor- 3x 100nF capacitor- 1x DC-jack 2, 1mm lossis 2, 5mm (yam koj xav tau siv)- 1x 1K potentiometer- 8x coj (txhua xim)- 8x 330 Ohm resistors- ntau qhov ntsia hlau tuav Qhov chaw rau rs232 module- Max232 IC- 4x 0, 1uF capacitors - 2x coj (ntsuab thiab liab)- 2x 330 Ohm resistors- Spike bar- D9-txuas

Kauj ruam 1: Lub Rooj Tswjhwm Saib Circuit

Cov Circuit Board
Cov Circuit Board
Cov Circuit Board
Cov Circuit Board

Muaj cov kab hluav taws xob los ntawm ob lub laug cam thiab pdf-file muaj luam tawm cov ntaub ntawv los ntawm cov laug cam no. Koj tuaj yeem kos koj cov laug cam los ntawm cov duab no. Zip-file muaj tag nrho Eagle-cov ntaub ntawv los ntawm cov laug cam no. Xav tias dawb los hloov cov no koj xav li cas.

Kauj Ruam 2: Etching lossis Milling

Etching los yog Milling
Etching los yog Milling
Etching los yog Milling
Etching los yog Milling

Muaj ob txoj hauv kev los ua cov laug cam no, kos los yog milling. Kuv tsis yog kws tshuaj, yog li kuv siv qhov kev xaiv kawg. Kuv tau ua kuv lub zeb los ntawm cov lus qhia zoo, yog li yog tias ib tus neeg tseem muaj nc-zeb thiab xav siv nws los ua cov laug cam no, tsuas yog qhia rau kuv paub thiab kuv yuav xa G-lej.

Kauj ruam 3: Soldering

Soldering
Soldering
Soldering
Soldering

Daim duab hauv qab no yuav qhia lub npe ntawm cov khoom thiab nws yuav tsum nyob ntawm lub nkoj.

Kauj ruam 4: Xeem

Kev Xeem
Kev Xeem

Ua ntej peb tuaj yeem sim peb lub rooj tsav xwm txhim kho, peb yuav xav tau AVR-programmer cable. Nov yog cov lus qhia zoo txog cov phiaj xwm cable. Peb xav tau tsuas yog 6 xov hlau. SCK, MISO, MOSI, RST, Hauv av thiab +5V thiab yog vim li cas kuv cov khoom txuas tsuas muaj 6 tus pin. TSEEM CEEB! SCK, MISO, MOSI thiab RST cov cim xav tau 390 Ohm resistors uas feem ntau tau muab tso rau ntawm lub nkoj, tab sis kuv xav txuag qee qhov chaw los ntawm pawg thawj coj saib thiab yog vim li cas cov resistors nyob hauv kab. Yog tias tsis muaj cov txheej txheem tiv thaiv no yuav tsis ua haujlwm. Peb tseem yuav tsum ua ib txoj kab nruab nrab ntawm rs232 module thiab lub rooj tsav xwm tseem ceeb.

Kauj Ruam 5: Qhov Kev Kawm Txuj Ci thiab Qhov Kev Xeem Yooj Yim

Programming thiab Kev Xeem Yooj Yim
Programming thiab Kev Xeem Yooj Yim

Tom ntej no peb yuav xav tau qee qhov "xeem" cov haujlwm rau kev sim peb pawg thawj coj. TSEEM CEEB! Peb yuav tsum kaw JTAG los ntawm PORTC, yog tias peb tsis ua li ntawd, lcd -module yuav tsis ua haujlwm, yog li nws tsim nyog. lfuse: w: 0xe4: m -U hfuse: w: 0xd9: m Cov lus txib no xiam JTAG thiab teeb tsa 8Mhz sab hauv oscillator thiab siv. Peb lub rooj tsav xwm muaj cov siv lead ua sab nraud, tab sis tib neeg siv qhov sib txawv me me ntawm cov nplais, yog li cov lus txib no muaj kev nyab xeeb rau txhua tus. Yog tias koj xav siv koj cov siv lead ua sab nraud ntawm no yog qhov chaw rau suav qhov tseeb fuses. IMPORTATNT! Ceev faj nrog fuse programming. Yog tias koj teeb tsa qhov tsis raug fuse qhov tseem ceeb, koj lub khoos phis tawj yuav tsis ua haujlwm. Muaj ib txoj hauv kev rov qab tau nws nrog cov mem tes sab nraud, tab sis cia siab tias koj tsis tas yuav ua qhov ntawd =) Qhov kev sim yooj yim:#suav nrog (avr/io.h) int main (void) {DDRA = 0xff; // teeb tsa chaw nres nkoj raws li outputDDRB = 0xff; DDRC = 0xff; DDRD = 0xff; PORTA = 0x00; // lov tes taw tag nrho rub-upsPORTB = 0x00; PORTC = 0x00; PORTD = 0x00;} Nws yog lub sijhawm los txhawb lub rooj tsavxwm thiab xa qhov kev sim me me no rau tus ua haujlwm nrog winavr lossis yam twg koj xav siv tam sim no peb tuaj yeem sim qhov ntawd peb cov chaw nres nkoj ua haujlwm raug. Muab ib qho kawg los ntawm xaim mus rau ib qho ntawm lub leds pinhead thiab kov nrog lwm qhov kawg txhua qhov chaw nres nkoj ntsia hlau loj zuj zus. Cov coj yuav tsum ci txhua lub sijhawm. Yog tias nws tsis ci, tom qab ntawd muaj qee yam tsis raug ntawm qhov siv. Nco ntsoov xeem kuj tias txhua tus coj ua haujlwm.

Kauj Ruam 6: Xeem Chaw Nkag Nkag

Kev Xeem Chaw Nkoj
Kev Xeem Chaw Nkoj
Kev Xeem Chaw Nkoj
Kev Xeem Chaw Nkoj

Yog tias txhua yam ua haujlwm tau zoo, nws yog lub sijhawm los sim peb cov rs232 module. Muaj ib qho program me me uas ntsuas tias peb TX thiab RX ua haujlwm. Usage hauv Linux: Tsim cov ntaub ntawv hu ua Makefile thiab luam hauv qab cov ntawv hauv cov ntawv. Qhov Makefile code xav tias koj siv Atmega16 thiab koj lub xov tooj cua txuas yog stk200 Nco ntsoov teeb tsa kev tso cai kom raug koj qhov chaw nres nkoj/dev/ttyS0CC =/usr/bin/avr -gccCFLAGS = -g -Os -Wall -mcall -prologues -mmcu = atmega16 -std = gnu99OBJ2HEX =/usr/bin/avr -objcopy AVRDUDE =/usr/bin /avrdude: $ (TARGET).hex $ (AVRDUDE) -p m16 -P /dev /parport0 -c stk200 -u -U flash: w: test.hex %.obj: %.o $ (CC) $ (CFLAGS) $ <-o $@%.hex: %.obj $ (OBJ2HEX) -R.eeprom -O ihex $ <$@clean: rm -f *.hex *.obj *.oDownload tau koom nrog cov ntaub ntawv serial.c thiab muab tso rau nws nyob rau hauv tib lub nplaub tshev qhov twg Makefile is. Power koj li kev txhim kho pawg thawj coj saib thiab muab cable ntawm rs232 module thiab lub rooj tsavxwm loj. Cov coj ntawm tus qauv yuav tsum pom tam sim no. Muab cov xaim xaim nruab nrab ntawm PA0 tus pin thiab qee tus coj tus pin. Use koj lub davhlau ya nyob twg thiab mus rau daim nplaub tshev qhov twg yog test.c thiab Makefile. Txuas ISP-programmer rau lub rooj tsavxwm. Tam sim no nws yog lub sijhawm xa peb cov lej hauv tus txheej txheem thiab nws tshwm sim nrog lub davhlau ya nyob twg hais kom ua: rub tawm software hu ua GTKterm (Serial Port Terminal). Fedora: yum nruab gtktermUbuntu: sudo apt-get install gtkterm Pib GTKterm thiab format nws siv 9600Kbs ceev, 8 cov ntaub ntawv me me, 1 nres me ntsis, tsis muaj qhov sib npaug, tsis muaj ib yam yog tias txhua yam ua haujlwm, nws yuav tsum sau "ua haujlwm!" ntawm GTKterm npo thaum koj nias lub pob "z" thiab thaum koj nias "x" khawm coj ntawm lub nkoj yuav tsum qhib thiab thaum koj nias "c" nws yuav tsum tua.

Kauj Ruam 7: LCD-module Test

LCD-module xeem
LCD-module xeem
LCD-module xeem
LCD-module xeem

Tam sim no nws yog lub sijhawm los sim peb lub LCD-module. Kuv txuas cov software zoo rau kev tswj hwm LCD-screen. Kuv rub tawm cov cai los ntawm Scienceprog.com thiab hloov kho nws me ntsis. Program tus txheej txheem nrog tus lej no thiab ntsaws koj lub lcd-module rau ntawm board. LCD-module tus pin txuas: 1 = VSS (Hauv av) 2 = VDD (5V) 3 = VO (Hauv av) 4 = RS5 = R/W6 = E11 = PC412 = PC513 = PC614 = PC7My lcd-module muaj 2 tus txuas (saib daim duab), vim tias cov ntawv mus rau sab qis yog tias koj tso tus qauv raws li nws yuav tsum tau ua. Kuv tsom iav thiab glued txuas tshiab rau lwm sab. Tam sim no nws ua haujlwm ob txoj kev.

Kauj Ruam 8: Qee Cov Yeeb Yaj Kiab

Dimmer accelerometers

Pom zoo: