עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Working with windows.h for Serial Programming Port under C

Featured Replies

פורסם

שלום לכולם ,

יש לי שאלה בקשר לעבודה עם חיבורים סיריאלים תחת C .

מצורף קוד שכתבתי ( את חלקו לקחתי מדוגמא מסויימת כי אני ב RS485 ועל כן אני צריך להגיד את ה Clock הפנימי של הכרטיס על מנת לעבוד במהירות גבוהה )

Baud Rate - 6000000 ( 6MB ) -> שעון פנימי של 50Mhz .

הבעיה היא שבשימוש בפונקציות של windows אני יכול להגדיר קצבים מסויימים של מספיקים לי , יש את האפשרות dcbSerialParams.BaudRate = BAUD_USER

if ( !GetCommState(hDevice , &dcbSerialParams) )

printf("Error Getting State\n");

else

{

dcbSerialParams.BaudRate = BAUD_USER;

dcbSerialParams.ByteSize = 8;

dcbSerialParams.StopBits = ONESTOPBIT;

dcbSerialParams.Parity = PARITY_SPACE;

}

אך בסופו של דבר אני מקבל למסך את ההודעה :

Error Setting State

שמצביעה על כך שהפעולה נכשלה...

אם למישהו יש רעיון אני אשמח .

[attachment deleted by admin]

פורסם
  • מחבר

אני לא , אני משתמש בכרטיס 422 כי אני רוצה Baud גבוהה - 6MB אני פשוט נותן ערך דצימלי.....של 6000000 אחריי שהגדרתי את השעון הפנימי של הכרטיס לעבודה במצב של 6 מגה ( 50MHZ )

50MHZ * 8Bit = 6MB

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.