الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

for(i=1;i<=100000000;i++) { printf('welcome with all'); printf('i need help please');

مغلق
بدأه TAHSEEN في 21 نوفمبر 2001 · 3 رد · 508 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

I was desgin three circute to connect them

with LPT1, I want evry one to work alone

(evrey ony work in deferent time) so when I

write below code in Borland C++ v.5

all data pins (D0-D7) is working correct

code is:

for (i=1;i<=10000;++i)                                                       
  {
  asm
   {
      mov dx,0X378
      mov  al,0XFF
      out ax,dx
    }
for (j=1;j<=10000000;j++){} // loop for delay only
 asm
   {
      mov dx,0X378
      mov  al,0X00
      out ax,dx
    }
}
all pins (D0-d7) are blinking  correctly
but when i need only one PIN to blink alone  and the others is low i was write 
the code below but there is no signal in any PIN .
code is:
for (i=1;i<=10000;++i)
  {
  asm
   {
      mov dx,0X378
      mov  al,0X
      out ax,dx
    }
for (j=1;j<=10000000;j++){} // loop for delay only
 asm
   {
      mov dx,0X378
      mov  al,0X00
      out ax,dx
    }
}

thanks for helping


arial

#2

أخي أرجو أن توضح السؤال أكثر .

Please, could you explain more about your problem..

:confused: :confused:

Coding on the Cloud and for the Cloud!

My Blog

#3

thanks alot for interset,

the probem is who to let one PIN in LPT1 port go ON and the others going OFF and i was write the below code

asm

{

mov dx,0X0378

mov al,0X08

out dx,ax

}

is these code is correct?

#4

The code is correct but I don't know why there is no signal in any pit when you output the value 0x08.. Any how let me ask Abdulkader Tuffi. He knows a lot about using the LPT with outer circuits..

:rolleyes:

Coding on the Cloud and for the Cloud!

My Blog

هذا الموضوع مغلق.

مواضيع مشابهة