شكرا لجميع الإخوة الكرام على حسن المتابعة
وشكرا للمهندس صهيب على حسن العرض والصور المتحركة الفعالة والمجهود الواضح .
|
السلام عليكم ورحمة الله وبركاته
مشكورة أخوي على الموضوع وإستفادة الأعضاء من الموضوع الطيب
بس أرجو منك المساعدة
عندي مشروع تخرج ومرتبط ببرنامج المايكروكنترولر
لكن عندي بعض الأخطاء فالكودات
لأن المشروع عبارة عن Electronic Voting Machine
والتصويت لثلاث أشخاص وفي كل مرة يزداد عدد الأصوات
باستخدام شاشة LCD
لكن المشكلة عندي البرنامج يظهر فيه أخطاء
فا ممكن تساعدني
وهذه هي الكودات
program finalproject
dim LCD_RS as sbit at RB4_bit
dim LCD_EN as sbit at RB5_bit
dim LCD_D4 as sbit at RB0_bit
dim LCD_D5 as sbit at RB1_bit
dim LCD_D6 as sbit at RB2_bit
dim LCD_D7 as sbit at RB3_bit
dim LCD_RS_Direction as sbit at TRISB4_bit
dim LCD_EN_Direction as sbit at TRISB5_bit
dim LCD_D4_Direction as sbit at TRISB0_bit
dim LCD_D5_Direction as sbit at TRISB1_bit
dim LCD_D6_Direction as sbit at TRISB2_bit
dim LCD_D7_Direction as sbit at TRISB4_bit
dim txt1 as char[10]
dim txt2 as char[13]
dim key1 as sbit at porta.0
dim key2 as sbit at porta.1
dim key3 as sbit at porta.2
dim key4 as sbit at porta.3
dim buzzer as sbit at porta.4
dim i as byte
i=0
main:
trisa=%00111
trisb=%00000000
porta=%00000
portb=%00000000
txt1="Electronic"
txt2="Voting Machine"
lcd_init()
lcd_cmd(_lcd_clear)
lcd_cmd(_lcd_cursor_off)
lcd_out(1,6,txt1)
lcd_out(2,3,txt2)
delay_ms(3000)
txt1="Designed by"
txt2="Mari"
lcd_cmd(_lcd_clear)
lcd_cmd(_lcd_cursor_off)
lcd_out(1,6,txt1)
lcd_out(2,3,txt2)
delay_ms(2000)
if porta.1 or porta.2 or porta.3=1 then goto ss
ss:
lcd_cmd(_lcd_clear)
xxx:
lcd_out(1,6,"vote")
lcd_out(2,1,"ALi"
for i=1 to 9
porta= porta+1
delay_m(1000)
next i
key1= key1+1
else key1=0
if borta.1=9 then goto stop
end if
goto ss
stop:
lcd_out(1,6,"vote")
lcd_out(2,7,"Mohammed")
for i=1 to 9
porta= porta+1
delay_m(1000)
next i
key2= key2+1
if porta.2=9 then goto stop
end if
goto ss
stop:
lcd_out(1,6,"vote")
lcd_out(2,13,"Faisal")
for i=1 to 9
porta= porta+1
delay_m(1000)
next i
key3= key3+1
if porta.3=9 then goto stop
end if
goto ss
stop:
end.
|
عليكم السلام ورحمة الله وبركاته
بالنسبة لموضوع الشاشة لم نلقى الضوء عليه حتى الآن ولذلك لا نستطيع القفز للرد على سؤال خارج مواضيع الدورة ، فأستأذن حضرتك فتح موضوع خارج الدورة جديد به السؤال لمناقشته إن شاء الله أو الإنتظار حتى نصل لهذه الجزئية كى لا يتشتت الإخوة وأرجو دمج ملفات المشروع فى ملف وينرار كى أرى الكود الحقيقى كما تمت كتابته للتحقق منه ومتابعة المشكلة ، وإن لم ألتفت لموضوع أو الأخ صهيب فلا بأس بإرسال رسالة لأى أحد للإشارة لموضوع محدد فقد لا يلتفت الكثير من الإخوة لكل المواضيع لضيق الوقت أحيانا .