Cov txheej txheem:
Video: 0-9 Segment Counter With CloudX Microcontroller: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv qhov haujlwm no peb siv xya-ntu ntu LED suav los ntawm 0 txog 9.
Ib ntu xya-ntu LED suav nrog yim LEDs thiab nws yog qhov zoo tshaj rau tso saib tus lej. Ua kom txo tus lej pins siv los ntawm cov zaub, txhua qhov anodes lossis cathodes ntawm LEDs tau txuas ua ke thiab hu ua common-anode lossis common- cathode, feem. Rau peb tes num peb siv hom cathode ntau. Lub 8 LEDs tau sau lo lus A rau G thiab DP (rau tus lej cim zauv). Rau peb cov qauv cathode ntau, muaj tus pin anode rau txhua ntu LED. Piv txwv li, yog tias koj xav qhia tus lej 4, tom qab ntawd koj yuav siv tam sim no rau ntu B, C, F thiab G. CloudX Segment Library ua rau siv 7 ntu ntu yooj yim dua.
Kauj Ruam 1: Sau Cov Cheeb Tsam no
1. CLOUDX MICROCONTROLLER
2. CLOUDX SOFTCARD
3. V3 USB CORD
4. 7 SEGMENT (cathode)
5. JUMPER WIRE
6. 330ohm resistor
Kauj ruam 2: HARDWARE SET-UP
Ua raws cov kauj ruam no:
txuas rau:
Pin A ntawm ntu rau pin1 ntawm CloudX
Pin B ntawm ntu rau pin2 ntawm CloudX
Pin DP ntawm ntu rau pin3 ntawm CloudX
Pin C ntawm ntu rau pin4 ntawm CloudX
Pin D ntawm ntu rau pin5 ntawm CloudX
Pin E ntawm ntu rau pin6 ntawm CloudX
Pin F ntawm ntu rau pin7 ntawm CloudX
Pin G ntawm ntu rau pin9 ntawm CloudX
txuas cov cathode tus pin rau GND
Tom qab kev sib txuas, cia mus rau qhov coding:
download Cloudx IDE ntawm no
Kauj ruam 3: CODING
Luam cov cai no rau CloudX IDE
#ncig #ncig char NumberOfDigit = 1; // teeb tus lej ntawm 7 ntu qhia siv
// txuas cov CloudX pins rau Cov Ntaub Ntawv Pins A, B, C, D, E, F, G thiab H pins ntawm Zaub
char segmentDataPins = {1, 2, 3, 4, 5, 6, 7, 8};
// txuas cov CloudX pins mus rau Common Anode lossis Cathode ntawm txhua 7-ntu tso saib
char segmentScanPins = 0; // kom txuag pins peb txuas ncaj qha rau hauv av (cathode) teeb tsa () {// teeb tsa ntawm no // pib 7 ntu Qhia nrog cov ntaub ntawv Segment_setting (CCathode, NumberOfDigit, segmentScanPins, segmentDataPins); loop () {// Qhov program no Segment_write (0, 1000); // sau 0 ntawm 7-ntu zaub rau 1 sec Segment_write (1, 1000); // sau 1 ntawm 7-ntu zaub rau 1 sec Segment_write (2, 1000); // sau 2 ntawm 7-ntu zaub rau 1 sec Segment_write (3, 1000); // sau 3 ntawm 7-ntu zaub rau 1 sec Segment_write (4, 1000); // sau 4 ntawm 7-ntu zaub rau 1 sec Segment_write (5, 1000); // sau 5 ntawm 7-ntu zaub rau 1 sec Segment_write (6, 1000); // sau 6 ntawm 7-ntu zaub rau 1 sec Segment_write (7, 1000); // sau 7 ntawm 7-ntu zaub rau 1 sec Segment_write (8, 1000); // sau 8 ntawm 7-ntu zaub rau 1 sec Segment_write (9, 1000); // sau 9 ntawm 7-ntu zaub rau 1 sec}}
Pom zoo:
AVR Microcontroller Fuse Cov Khoom Kho. Tsim thiab Tshaj Tawm hauv Flash Nco ntawm Microcontroller LED Blinking Program: 5 Kauj Ruam
AVR Microcontroller Fuse Cov Khoom Kho. Tsim thiab Tshaj Tawm hauv Flash Nco ntawm Microcontroller LED Blinking Program: Hauv qhov no peb yuav tsim cov phiaj xwm yooj yim hauv C code thiab hlawv nws mus rau hauv lub cim xeeb ntawm microcontroller. Peb yuav sau peb tus kheej txoj haujlwm thiab suav sau cov ntawv hex, siv Atmel Studio ua kev txhim kho kev sib koom ua ke. Peb yuav teeb tsa fuse ob
Sib cuam tshuam 7-Segment Zaub Nrog Hloov Sau Npe Siv CloudX Microcontroller: 5 Kauj Ruam
Sib cuam tshuam 7-Segment Zaub Nrog Hloov Sau Npe Siv CloudX Microcontroller: Hauv qhov haujlwm no peb tau tshaj tawm cov lus qhia yuav ua li cas cuam tshuam xya ntu ntu LED zaub nrog CloudX microcontroller. Xya ntu qhia tau siv nyob rau hauv ntau qhov system thiab cov ntawv thov kev lag luam uas qhov ntau ntawm cov txiaj ntsig yuav tsum tau qhia yog paub
Ntau 7 Segment Display Counter Nrog CloudX Microcontroller: 4 Cov Kauj Ruam
Ntau 7 Segment Display Counter Nrog CloudX Microcontroller: Txoj Haujlwm no piav qhia yuav ua li cas tso saib cov ntaub ntawv ntawm Ob 7-Segment siv CloudX microcontroller
Kev cuam tshuam 8051 Microcontroller Nrog 7 Segment Display: 5 Cov Kauj Ruam (nrog Duab)
Kev cuam tshuam 8051 Microcontroller Nrog 7 Segment Display: Hauv qhov haujlwm no peb yuav qhia koj txog yuav ua li cas peb tuaj yeem cuam tshuam 7 ntu zaub nrog 8051 microcontroller
Yuav Suav Li Cas Los Ntawm 0 txog 99 Siv 8051 Microcontroller Nrog 7 Segment Display: 5 Cov Kauj Ruam (nrog Duab)
Yuav Suav Li Cas Los Ntawm 0 txog 99 Siv 8051 Microcontroller Nrog 7 Segment Display: Nyob zoo txhua tus, Hauv qhov kev qhia no peb yuav qhia koj txog yuav suav li cas los ntawm 0 txog 99 siv ob 7 ntu qhia