Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: general mfc question: lpszTemplateName Pin
23_44427-Jul-05 6:00
23_44427-Jul-05 6:00 
GeneralRe: general mfc question: lpszTemplateName Pin
David Crow27-Jul-05 6:09
David Crow27-Jul-05 6:09 
GeneralRe: general mfc question: lpszTemplateName Pin
23_44427-Jul-05 6:30
23_44427-Jul-05 6:30 
GeneralRe: general mfc question: lpszTemplateName Pin
David Crow27-Jul-05 7:03
David Crow27-Jul-05 7:03 
GeneralRe: general mfc question: lpszTemplateName Pin
23_44427-Jul-05 7:32
23_44427-Jul-05 7:32 
GeneralRe: general mfc question: lpszTemplateName Pin
Gary R. Wheeler27-Jul-05 12:48
Gary R. Wheeler27-Jul-05 12:48 
GeneralRe: general mfc question: lpszTemplateName Pin
23_44428-Jul-05 2:46
23_44428-Jul-05 2:46 
GeneralSerial Comms with 9-bit data Pin
button_basher27-Jul-05 4:01
button_basher27-Jul-05 4:01 
Howdy folks

Having a problem getting my COM port to talk to a piece of hardware using a 9-bit data protocol. I am using Visual Studio .NET 2003 and developing in C++ using the standard Win32 serial communications techniques. Specifically I have:

- Used CreateFile to get a Handle on my COM port
- Created a DCB structure to send 8-bit with PARITY bit making up the ninth bit
- Bytes are then sent to the hardware using WriteFile

When I wish to send a byte with the ninth bit as '1' I call GetCommState change the DCB to have MARK Parity then SetCommState to reinitialise the COM Port. Likewise to send a byte with the ninth bit as '0' I call GetCommState change the DCB to have SPACE Parity then SetCommState to reinitialise the COM Port.

This all works fine and my COM port talks to the hardware as required.

My problem is that it is very slow. Each time GetCommState & SetCommState are used to change the DCB parity it takes about 10ms. At the baud rates I am using a byte only takes 50us to transmit so this delay to switch parity makes a big difference.

Does anyone have an idea to speed up the parity change or a better method of obtaining a ninth bit.

Many Thanks

b_b
GeneralRe: Serial Comms with 9-bit data Pin
JWood27-Jul-05 9:30
JWood27-Jul-05 9:30 
GeneralRe: Serial Comms with 9-bit data Pin
button_basher28-Jul-05 2:16
button_basher28-Jul-05 2:16 
GeneralThe message when the dialog is covered Pin
jerome_data27-Jul-05 3:40
jerome_data27-Jul-05 3:40 
GeneralRe: The message when the dialog is covered Pin
David Crow27-Jul-05 4:03
David Crow27-Jul-05 4:03 
GeneralRe: The message when the dialog is covered Pin
jerome_data27-Jul-05 4:47
jerome_data27-Jul-05 4:47 
Questionhow to monitor the printer? Pin
szcococut27-Jul-05 3:11
szcococut27-Jul-05 3:11 
AnswerRe: how to monitor the printer? Pin
David Crow27-Jul-05 3:14
David Crow27-Jul-05 3:14 
GeneralRe: how to monitor the printer? Pin
szcococut27-Jul-05 4:29
szcococut27-Jul-05 4:29 
GeneralRe: how to monitor the printer? Pin
David Crow27-Jul-05 4:50
David Crow27-Jul-05 4:50 
GeneralUsing own controls in CFileDialog Pin
cbusgut27-Jul-05 2:48
cbusgut27-Jul-05 2:48 
GeneralGetting the item from toolbar Pin
Raul Simcic27-Jul-05 2:41
Raul Simcic27-Jul-05 2:41 
Generalpointer of last occurance of word Pin
itkid27-Jul-05 2:36
itkid27-Jul-05 2:36 
GeneralRe: pointer of last occurance of word Pin
David Crow27-Jul-05 2:54
David Crow27-Jul-05 2:54 
GeneralRe: pointer of last occurance of word Pin
Fred96727-Jul-05 3:04
Fred96727-Jul-05 3:04 
GeneralRe: pointer of last occurance of word Pin
David Crow27-Jul-05 3:12
David Crow27-Jul-05 3:12 
GeneralRe: pointer of last occurance of word Pin
itkid18-Nov-05 9:58
itkid18-Nov-05 9:58 
GeneralWindows Server 2003 and ISAPIs Pin
GuimaSun27-Jul-05 2:30
GuimaSun27-Jul-05 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.