السلام عليكم ورحمه الله و بركاته
لقد قرأت جزء من الكتاب , و خرجت ببعض المعلومات و لخصتها كالأتي :
************************************************** *********
Programming 8051
•
Vcc 5 supply (Input):
No need to program pin 40.
__________________________________________________ ________________
•
segment 7 (output):
Because it's an output, no need to program port 0, .
__________________________________________________ ________________
•
push buttons (Input):
Pins from Port1.4 to Port1.7 should be programmed,
To make port1 an input port, it must programmed as such by writing 1 to all its bits. In the following code port1 is configured first as an input port by writing 1’s to it, then data is received from the port and saved in R7 ,R6 & R5.
MOV A,#0FFH - ;A=FF HEX
MOV P1,A ;make P1 an input port by writing all 1’s to it
MOV A,P1 - ;get data from P1
MOV R7,A - ;save it in register R7
ACALL DELAY - ;wait
MOV A,P1 - ;get another data from P1
MOV R6,A - ;save it in register R6
ACALL DELAY - ;wait
MOV A,P1 - ;get another data from P1
MOV R5,A - ;save it in register R5
__________________________________________________ ________________
•
Analog-to-digital converter (Input):
Pins of Port2 should be programmed,
To make port 2 an input, it must programmed as such by writing 1 to all its bits. In the following code, port 2 is configured first as an input port by writing 1’s to it. Then data is received from that port and is sent to P1 continuously.
MOV A,#0FFH - ;A=FF hex
MOV P2,A - ;make P2 an input port by writing all 1’s to it
BACK: MOV A,P2 - ;get data from P2
MOV P1,A - ;send it to Port1
SJMP BACK - ;keep doing that
__________________________________________________ ________________
•
Analog-to-digital converter (Output):
Pins of Port3.0 to Port3.2 are not programmed .
__________________________________________________ ________________
•
Interfacing fan (Output):
Pin of Port3.3 are not programmed.
************************************************** *********
و لكن اعتقد ان المعلومات هذه لا تمثل 20% من البرنامج الكامل لهذا المشروع.
و الان سأبدأ في طرح الأسئلة, لا تستغربوا ان كانت اسألتي "بدائية" بعض الشيء, فهي اول مرة استخدم لغة الassembly, و اول مرة استخدم المايكروكنترولر.
1/ هل المعلومات التي استنتجتها صحيحة ( بعد المقارنة بالدائرة الموضحة في المشاركة الاولى)؟
2/ ما هو البرنامج (الذي يستخدم في الكمبيوتر) المناسب لاجراء عملية الcompile ؟
3/ كيف اقوم بالبدأ في كتابة البرنامج ؟ و هل هناك أكواد يجب ان تسبق الاخرى ( الترتيب)؟
الرجاء المقارنة بين المعلومات التي جمعتها مع الدائرة الموجودة في بداية الموضوع.
ارجو مشاركتم في هذا الموضوع, و انشاء الله ما تقصروا.
تحياتي لكم.