:: مهندس ::
تاريخ التسجيل: Jun 2015
المشاركات: 3
|
|
نشاط [ وسام الكوثر ]
قوة السمعة:0
|
|
13-06-2015, 02:58 PM
المشاركة 1
|
|
السلام عليكم ورحمة الله وبركاته.....لدي سؤالان وأتمنى أن أجد الإجابة منكم ف أقرب وقت ممكن ولكم جزيل الشكر
السؤال الأول:
ArrayA of the four data words CA45H,DA97H and 6B87H is stored in data memory starting with address 0090:20.
Array B of the four data words 93C0H,FAA7H,ECA1H and 3D56H is stored in data memory starting with address 0090:30.
Write a program that multiples each of word from array A by the corresponding word from array B.The program stores the results in data memory starting with address 0090:40
السؤال الثاني:
Write a program using MikroBasic Pro for PIC programming language to run the following application on PIC 16F887 microcontroller:
a.As show in the figure below, 4 LED Common Cathode 7-Segment Display are connected to RD0-RD7 of 16F887. Multiplexed-Scanned Displays method is used to display the number 0 to 3 on the displays(0 on Least Significant Display up to 3on the Most Significant Display).The 7-Segment codes for the numbers 0 to 3 are 0x3F, 0x06,0x5B,0x4F respectively.
The program output these codes on RD0-RD7 continuously and sequentially separated by 10 msec.period.
The display on which the number will be displayed will be enabled by outputting the logic 1 on the corresponding enable line of RA0-RA3.(For example: to display the number on the LSD the program will output 1 on RA0 while it will output 0 on RA1-RA3.).The enabling of the displays will also be separated by 10 msec.period.
b.Develop your program to include that four switches (S0-S3) are connected to RB0-RB3 respectively. By these switches you can select the LSD on which the number 0 will be displayed.By turning S0 ON and S1-S3 OFF, the LSD will be the first rightmost display. By turning S1 ON and the others OFF, the LSD will the second from right display and so on.
Note : You must use For..Next loop in the program in order to reduce the size of the code.
|