Cov txheej txheem:

Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Qhia Tus lej Pin: 7 Cov Kauj Ruam
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Qhia Tus lej Pin: 7 Cov Kauj Ruam

Video: Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Qhia Tus lej Pin: 7 Cov Kauj Ruam

Video: Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Qhia Tus lej Pin: 7 Cov Kauj Ruam
Video: Hmong new song 2016 - Yog dab tsi - Xub Hluav Taws (Official MV) 2024, Hlis ntuj nqeg
Anonim
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus Kheej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus Kheej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code
Kev Ruaj Ntseg Hauv Hluav Taws Xob Nrog RTC thiab Tus Neeg Siv Tus lej Pin Code

Nyob Zoo Cov Menyuam!

Nov yog qhov haujlwm uas kuv tau siv pic pic microcontroller nws yog Electronic PIN Code Security System nrog lub sijhawm tiag tiag thiab tus neeg siv txhais tus lej tus lej tus lej, nplooj ntawv no muaj txhua yam ntxaws kom ua rau koj tus kheej.

Ua haujlwm thiab xav:

Zoo los ntawm kev qhib Kev Ruaj Ntseg rau, nws yuav thov kom PINCODE qhib lub qhov rooj, (nws 140595) yog tias koj nkag mus rau qhov raug, lub qhov rooj yuav qhib. Lub qhov rooj qhib rau 1 feeb nkaus xwb, tom qab ntawd nws kaw dua. Yog tias koj nkag mus rau tus lej tsis raug Tus Txheej Txheem Kev Ruaj Ntseg yuav muab rau koj 3 txoj hauv kev ntxiv, yog tias txhua txoj hauv kev raug pov tseg tom qab ntawd nws hloov lub suab nrov, thiab thov kom muaj lwm txoj cai kom tsis txhob buzzer, yog tias lwm txoj cai (piv txwv li 1984) tau nkag mus raug yog:

1) Nws nres buzzer

2) Rov pib dua tus lej qub uas yog 140595

3) Nug cov cai tshiab los hloov tus lej qub uas yog 140595 (tsis ntau dua 6 tus lej)

tam sim no lub qhov rooj yuav qhib los ntawm txoj cai tshiab no.

Piv txwv tias tsis raug lwm txoj cai tau muab tso rau tom qab ntawd System nug kom tos kom suav rov qab ntawm 1 feeb thaum lub sijhawm tag nrho cov nyees khawm tsis taus thiab lub suab nrov nrov nrov.

YEEB YAJ:

www.youtube.com/watch?v=O0lYVIN-CJY&t=5s

OKAY LETS Ua Ib Leeg …

Ua ntej peb pib, Kuv xav tias koj twb muaj kev paub yooj yim ntawm C lus thiab tau ua haujlwm ntawm MikroC pro ua ntej thiab koj paub yuav ua li cas ci LED, yuav ua li cas cuam tshuam LCD nrog PIC Microcontroller. Okay cia pib ua!

Kauj Ruam 1: Sib Sau Ua Ke

Sib sau ua ke
Sib sau ua ke

Rau qhov project: S. No. | NQI | KAWG | INFO

1) 1 16x2 LCD Pin 14 rau Pin 1 ces Pin 15 thiab Pin 16 pins pob.

2) 1 PIC18F4550 Microcontroller

3) 1 PCF8583 Lub Sijhawm Tiag (RTC) IC

4) 14 Rov Pib Dua Cov Hloov Hloov ntawm Keypad Kuv siv cov khawm pib dua

5) 1 9v Roj teeb Lub hwj chim tseem ceeb.

6) 1 10K Ohm Pot Rau teeb sib piv ntawm LCD

7) 2 3.5mm audio jacks rau sab nrauv txuas lub buzzer thiab lub qhov rooj

8) 1 100uF Capacitor Ceremic cap rau siv nrog tus pin1 ntawm tus tswj.

9) 1 32.682kHz Crystal Rau PCF8583 IC

10) 1 DC Power Jack Yog siv qhov project nrog DC adapter

11) 1 IC7805 Rau hloov 9V rau 5V

12) 1 1K Ohm resistor rau siv nrog tus pin1 ntawm tus tswj.

13) 3 10K Ohm resistor rau siv nrog tus pin1 ntawm tus tswj thiab RTC IC

14) 13 220 Ohm resistor txhua khawm yuav siv 1 220 Ohm Kuv yuav piav qhia tom qab

15) 1 3V Cell rau siv nrog RTC IC

16) 1 TICK TICK Hloov

17) 1 Lub Rooj Tswjhwm Saib PCB koj xaiv yog tias koj nyiam ntawm qhov tseeb nws zoo.

18) 18 tus pin DIP rau RTC IC

19) 1 40 tus pin DIP rau PIC184550 lossis koj tuaj yeem Zip lub qhov (socket) yog tias koj xav tau

20) 1 3V tus tuav tes

21) 1 9V tus tuav lub roj teeb

22) 1 tus txiv neej lub taub hau rau cov laug nrog LCD

23) 1 tus poj niam lub taub hau rau qhov muag ntawm PCB lossis verro qhov twg LCD yuav muab tso rau.

Lwm yam:

20) Breadboard rau kev sim

21) Cov hlau phom

22) Soldering hlau

23) PIC Programmer (lossis PICKIT2)

24) Etching solution (rau PCB)

25) PCB Laum

26) Multimeter

Ib tus xav tias koj yuav pom tias kuv tsis suav nrog ib qho siv lead ua rau PIC Microcontroller txoj cai? Zoo tias yog vim kuv siv sab hauv oscillator ntawm PIC18F4550

TAB SIS …! Tam sim no nws ua nws…!

Kauj Ruam 2: TESTING PROTEUS

Xeem ntawm PROTEUS
Xeem ntawm PROTEUS
Xeem ntawm PROTEUS
Xeem ntawm PROTEUS

Koj tuaj yeem kuaj qhov Circuit Court ntawm proteus, yog li koj tuaj yeem tau txais lub tswv yim hais txog txoj haujlwm.

Cov ntaub ntawv tiv thaiv yuav xav tau cov ntaub ntawv hex rau PIC microcontroller.

Ob cov ntaub ntawv raug muab.

Kauj Ruam 3: Ua PCB

Ua PCB
Ua PCB

Kuv yuav qhia koj kom tsim txoj haujlwm no ntawm PCB tsis txhob siv verroboard.

Luam tawm PCB no, nws tau tsim los ntawm Cadsoft Eagle los ntawm kuv. Yog tias koj muaj cadsoft eagle tau teeb tsa qhib brd cov ntaub ntawv (rub tawm hauv qab) thiab tsim cov ntawv raws li koj xav tau ntawm nplooj ntawv loj.

Txwv tsis pub kuv tau txuas ob daim ntawv ntawm yog ntawm A4 thiab lwm qhov yog A5, luam tawm thiab txheeb xyuas cov cheeb tsam tom qab ntawv luam koj li PCB. Kuv nug qhov no vim tias tej zaum yuav muaj nplooj ntawv teev npe.

NCO TSEG: Koj tuaj yeem tsim lub phiaj xwm los ntawm ib lub roj teeb uas yuav tsum txuas nrog lub txuas ze rau 7805, saib xyuas kom meej. LOSSIS koj tuaj yeem ua lub zog los ntawm qhov hloov pauv los ntawm DC Power jack. Cov peev txheej tuaj yeem hloov pauv los ntawm cov zuam zuam, thaum khawm raug thawb sab hauv lub zog hluav taws xob los ntawm cov khoom siv sab nraud los ntawm txuas, thaum khawm raug thawb sab nraum lub zog hluav taws xob nce los ntawm DC lub zog.

Kauj Ruam 4: Cov Khoom Siv Hluav Taws Xob

Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob
Cov Khoom Siv Hluav Taws Xob

Solder tag nrho cov khoom, saib cov duab txuas nrog.

Ntawm qhov kuv yuav tsum qhia koj, txij li tus tiv thaiv yog qhov zoo tagnrho yog vim li cas cov nyees khawm tau txuas ncaj qha rau tus pin microcontroller yam tsis muaj tus tiv thaiv.

Tab sis hauv lub neej tiag muaj lub suab nrov.

Zoo li xav tias, hauv txoj haujlwm no yog tias koj nias lub pob 4 ib zaug, ntawm tus tiv thaiv koj yuav tau 4 ntawm LCD, tab sis yog koj nias nws hauv lub neej tiag koj yuav tau txais 44444444 ntawm LCD vim muaj suab nrov. ITo tshem qhov no pcb muaj 220 Ohm resistor nrog txhua khawm.

Kauj Ruam 5: RTC IC PCF8583

Programming RTC IC PCF8583
Programming RTC IC PCF8583

Okay qhov no yog qhov nyuaj me ntsis tab sis txij li tau muab cov cai nws yuav tsis yog qhov nyuaj. Kuv tsis tau muab.hex cov ntaub ntawv rau kev ua haujlwm RTC IC txij li koj yuav tsum tsim nws los teeb tsa koj lub sijhawm xav tau, thiab xyoo tau teeb tsa rau xyoo 2015 koj tsis tas yuav teeb nws.

Qhib mikroC Pro fro PIC thiab xaiv PIC18F4550, luam thiab muab cov cai hauv qab no:

// LCD module txuas txuas me ntsis LCD_RS ntawm RB2_bit;

sbit LCD_EN ntawm RB3_bit;

sbit LCD_D4 ntawm RB4_bit;

sbit LCD_D5 ntawm RB5_bit;

sbit LCD_D6 ntawm RB6_bit;

sbit LCD_D7 ntawm RB7_bit;

sbit LCD_RS_Direction ntawm TRISB2_bit;

sbit LCD_EN_Direction ntawm TRISB3_bit;

sbit LCD_D4_Direction ntawm TRISB4_bit;

sbit LCD_D5_Direction ntawm TRISB5_bit;

sbit LCD_D6_Direction ntawm TRISB6_bit;

sbit LCD_D7_Direction ntawm TRISB7_bit;

// Xaus LCD module sib txuas

void main () {

ADCON1 = 0x0F;

CMCON | = 7; // Disable Comparators

OSCCON = 0b01111111; // Siv sab hauv Oscilator @ 8MHz

TSIB = 0x00; // PORTB rau cov zis (LCD)

LATB = 0xFF; // PORTC rau kev tawm tswv yim

LATC = 0xFF; // PORTD rau cov tswv yim

TRISA. RA2 = 0; // RA2 rau cov zis

TRISA. RA3 = 0; // RA3 rau cov zis

UCON. USBEN = 0; // Disable usb UCFG. UTRDIS = 1;

TRISD = 0xF9; // PORTD cov zis

Lcd_Init (); // Pib LCD

Lcd_Cmd (_LCD_CLEAR); // Clear zaub

Lcd_Cmd (_LCD_CURSOR_OFF); // Cursor tawm

Lcd_Out (1, 1, "Teeb Sijhawm …");

Ncua_ms (1000);

I2C1_Init (100000); // initialize puv tswv hom

I2C1_Start (); // teeb meem pib teeb liab

I2C1_Wr (0xA0); // chaw nyob PCF8583

I2C1_Wr (0); // pib los ntawm lo lus ntawm chaw nyob 0 (lo lus teeb tsa)

I2C1_Wr (0x80); // sau $ 80 rau kev teeb tsa. (ncua lub txee…)

I2C1_Wr (0); // sau 0 rau xees lo lus

I2C1_Wr (0); // sau 0 rau lo lus thib ob

I2C1_Wr (0x10); // Hloov qhov no 10 rau feeb twg koj xav teeb tsa

I2C1_Wr (0x17); // Hloov qhov no 17 mus rau teev twg koj xav teeb tsa

I2C1_Wr (0x23); // Hloov qhov no 23 mus rau hnub tim twg koj xav teeb tsa

I2C1_Wr (0x2); // Hloov qhov no 2 mus rau lub hli twg koj xav teeb tsa

I2C1_Stop (); // teeb meem nres teeb liab

I2C1_Start (); // teeb meem pib teeb liab

I2C1_Wr (0xA0); // chaw nyob PCF8530

I2C1_Wr (0); // pib los ntawm lo lus ntawm chaw nyob 0

I2C1_Wr (0); // sau 0 rau teeb tsa lo lus (pab kom suav)

I2C1_Stop (); // teeb meem nres teeb liab

Lcd_Cmd (_LCD_CLEAR);

Lcd_Out (1, 1, "Sijhawm Teeb.!");

Ncua_ms (500);

}

_END CODE _

Tsim kom muaj cov ntaub ntawv hex los ntawm Mikroc Pro rau PIC tom qab suav sau cov cai saum toj no ces hlawv nws mus rau pic microcontroller PIC18F4550

Muab nws tso rau ntawm pcb soldered nrog txhua yam khoom siv, tig nws. LCD yuav tsum tso saib "Teeb Sijhawm …" tom qab ntawd thaum nws qhia "Teeb Sijhawm!" tua hluav taws. Tshem PIC microcontroller los ntawm DIP koj tau ua tiav txoj haujlwm PCF8583 RTC IC.:)

Kauj Ruam 6: Ua Haujlwm PIC18F4550

Lub cajmeem PIC18F4550
Lub cajmeem PIC18F4550

Zoo cov ntaub ntawv hex twb tau muab hauv Step2 koj tuaj yeem hlawv nws rau koj PIC18F4550 los ntawm PIC Programmer.

Kauj Ruam 7: Kauj Ruam Kawg & Kawg Kawg …

Txuas ib qho LED mus rau sab xis 3.5mm lub suab nkaus thiab lub suab nrov rau sab xis 3.5mm nkaus. Muab koj qhov program PIC18F4550 tso rau hauv pcb thiab qhib lub zog.

Thaum qhov chaws raug nkag mus nws muab logic 1 rau qis coj, Kuv xav tias thaum muab logic 1 coj nws qhib lub qhov rooj.

Koj Cov Khoom Siv Hluav Taws Xob yuav tsum tau npaj tam sim no …! Thiab yog tias koj tau ua txhua yam yog lawm nws yuav tsum ua haujlwm zoo.

Thov pab like thiab ຕິດ ຕາມ kuv tus facebook page:

www.facebook.com/pg/ElectronicProjectsbySh…

Kuv qhov chaw blog:

epshahrukh.blogspot.com/

Pom zoo: