Új hozzászólás Aktív témák
-
goodluckbenc
csendes tag
tudna valaki segiteni, egy programot kell irnom ami 1234-et mutat ezt csinaltam eddig de nem akar mukodni.
/*************************************************************************
* A Program for the 7-Segmen Display Module – Task 4 *
*************************************************************************/
#include <reg51.h>
#include <string.h>
/* Declaration of the Data and Clock Bits for the M5450 */
sbit Data = P1^4 ;
sbit Clock = P1^6 ;
//sbit Enable = ? ; /* Only on some Modules but not all */
/* A very short Delay of about 10 microseconds */
/* This doesn’t have to be accurate as explained in the lecture classes */
void M5450_Delay(void)
{
int i;
for (i=0;i<10000; i++)
{
;
}
}
void M5450_Pulse(void)
{
/* This function sends a single clock pulse to the M5450 Driver */
Clock=0;
Clock=1;
M5450_Delay(); /* A short Delay */
Clock=0;
}
void M5450_Send (void)
{
int D0,D1,D2,D3;/* This function sends the 8-bit (byte) D to the M5450 in serial form */
/* with the least significant bit first */
D0=0x66;
D1=0x4F;
D2=0x5B;
D3=0x06;}
/* The following function sends a start pulse to the M5450 */
void M5450_Start(void)
{
//Enable = 0; /* Eliminate this line if there is no Enable pin defined */
Data = 0;
M5450_Pulse();
Data = 1;
M5450_Pulse();
}
/* The Main Program */
void main (void)
{
/* Declaration of all local variables in the main part of the program */
/* First Send a Start Pulse to the M5450 */
M5450_Start();
for(;
{
M5450_Send(0x66);
M5450_Send(0x4F);
M5450_Send(0x5B);
M5450_Send(0x06);
/* Send a further Three Clock Pulses to Complete the 35 Pulses */
M5450_Pulse();
M5450_Pulse();
M5450_Pulse();
}
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Dacia topic
- Sony WF-1000XM6 – ez évi etalon?
- Mobil flották
- Döbbenetes csörte zajlott le az AMD és a SemiAnalysis között
- Kínai és egyéb olcsó órák topikja
- Azonnali fáradt gőzös kérdések órája
- Mikrotik routerek
- Gumi és felni topik
- Abarth, Alfa Romeo, Fiat, Lancia topik
- AI okozta csődhullámra figyelmeztett a Phison vezetője
- További aktív témák...
- Dell Latitude 5510 - 15.6" FHD IPS - i5-10210U - 16GB - 512GB SSD - Win11 PRO + Office
- Gamer PC-Számítógép! Csere-Beszámítás! R5 3600X / GTX 1080Ti 11GB / 16GB DDR4 / 512 Nvme SSD
- szinteÚJ 2030 Gar! Dell Pro Max 14 Ryzen AI 9 HX PRO 370 32GB LPDDR5X 512GB NVMe SSD
- Dell Pro Plus 14 Core Ultra 5 238V 32GB 1000GB FHD+ TouchScreen ProSupport Plus gar: 2028.10.07
- Apple iPhone 13 128 GB 88%
- G.Skill Aegis 16GB DDR4 3200MHz VADIÚJ, GARANCIÁS, UTOLSÓ DARAB!
- Samsung Galaxy S20 Ultra / 12/128GB / Kártyafüggetlen / 12Hó Garancia
- Samsung Galaxy Book 3 Amoled 360 i5 13.gen, 16GB RAM, 512GB SSD, érintőkijelzős kedvező áron!
- Samsung Galaxy A56 5G, Kártyafüggetlen, 1 Év Garanciával
- 188 - Lenovo LOQ (15IRX10) - Intel Core i5-13450HX, RTX 5060
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
*************************************************************************/


