قسم الميكروكنترولر والروبوت ودوائر الاتصال بالحاسب الالي قسم المتحكمات الـ microcontroller و المعالجات microprocessor و التحكم الرقمي بالكمبيوتر CNC والانظمة الآلية والروبوت Robots

أدوات الموضوع

الصورة الرمزية eng_msa_8_8
eng_msa_8_8
:: مهندس متواجد ::
تاريخ التسجيل: Dec 2006
المشاركات: 66
نشاط [ eng_msa_8_8 ]
قوة السمعة:0
قديم 20-06-2010, 11:23 PM المشاركة 1   
ha Baudmode calculation Twitter FaceBook Google+



السلام عليكم

انا اقوم بعمل برنامج اتصال سريال من الكمبيوتر بالميكرو كنترولر
و لكن لا استطيع استنتاج Baudmode

The Baudmode argument for SerIn accepts a 16-bit value that determines its characteristics: 1-stop bit, 8-data bits/no-parity or 7-data bits/even-parity and virtually any speed from as low as 300 baud to greater than 38K baud (depending on the crystal frequency used). The list below shows how Baudmode is calculated, see manual for some common baudmodes for standard serial baud rates.
Determine the bit period. (bits 0 - 11) (1,000,000 / baud rate) - 20
Data bits and parity. (bit 13) 8-bit/no-parity = step 1 + 0. 7-bit/even-parity = step 1 + 8192
Select polarity. (bit 14) True (noninverted) = step 2 + 0. Inverted = step 2 + 16384
Add the results of steps 1, 2 3, and 3 to determine the correct value for the Baudmode operator.

If communications are with existing software or hardware, its speed and mode will determine the choice of baud rate and mode. In general, 7-bit/even-parity (7E) mode is used for text, and 8-bit/no-parity (8N) for byte-oriented data. Note: the most common mode is 8-bit/no-parity, even when the data transmitted is just text. Most devices that use a 7-bit data mode do so in order to take advantage of the parity feature. Parity can detect some communication errors, but to use it you lose one data bit. This means that incoming data bytes transferred in 7E (even-parity) mode can only represent values from 0 to 127, rather than the 0 to 255 of 8N (no-parity) mode.





و لكن لا استطيع حسابه
علما باني استخدم بيانات الاتصال كالتالي



و ايضا كود البرمجه كالتالي
كود:
    Device=16F877A
    XTAL 4

Output PORTB
Dim code Str

PORTB=0
main:
 SerIn PORTC.7 , ??????? , 2000 , main , [in]
 If in= "L"  Then 
       PORTB=%00000011
       
  End If 
 If code= "S" Then 
       PORTB=%00001100
       
 End If 
 If code= "R" Then 
       PORTB=%00001010
       
 End If                   
GoTo main
و لكم جزيل الشكر و التقدير


التعديل الأخير تم بواسطة : eng_msa_8_8 بتاريخ 20-06-2010 الساعة 11:27 PM
اعلانات

الصورة الرمزية eng_msa_8_8
eng_msa_8_8
:: مهندس متواجد ::
تاريخ التسجيل: Dec 2006
المشاركات: 66
نشاط [ eng_msa_8_8 ]
قوة السمعة:0
قديم 20-06-2010, 11:28 PM المشاركة 2   
افتراضي


ماذا اضع مكان علامات الاستفهام ؟

اعلانات اضافية ( قم بتسجيل الدخول لاخفائها )
  

الصورة الرمزية eng_msa_8_8
eng_msa_8_8
:: مهندس متواجد ::
تاريخ التسجيل: Dec 2006
المشاركات: 66
نشاط [ eng_msa_8_8 ]
قوة السمعة:0
قديم 21-06-2010, 02:51 AM المشاركة 3   
افتراضي


لقد و جدت الحل و هو في هذا الجدول
http://www.emesystems.com/BS2rs232.htm#Baudmode


eabueida
:: مهندس متواجد ::
تاريخ التسجيل: Apr 2007
المشاركات: 171
نشاط [ eabueida ]
قوة السمعة:0
قديم 21-06-2010, 09:40 AM المشاركة 4   
افتراضي


السلام عليكم

الأرقام موجودة في اللنك التالي بالنسبة للغة المستخدمة

http://www.qariya.com/vb/showthread.php?t=60550&page=4

إضافة رد

العلامات المرجعية

«     الموضوع السابق       الموضوع التالي    »
أدوات الموضوع

الانتقال السريع إلى


الساعة معتمدة بتوقيت جرينتش +3 الساعة الآن: 03:50 AM
موقع القرية الالكترونية غير مسؤول عن أي اتفاق تجاري أو تعاوني بين الأعضاء
فعلى كل شخص تحمل مسئولية نفسه إتجاه مايقوم به من بيع وشراء وإتفاق وأعطاء معلومات موقعه
التعليقات المنشورة لا تعبر عن رأي موقع القرية الالكترونية ولايتحمل الموقع أي مسؤولية قانونية حيال ذلك (ويتحمل كاتبها مسؤولية النشر)

Powered by vBulletin® Version 3.8.6, Copyright ©2000 - 2025