Click here to Skip to main content
15,921,577 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: launch an html file Pin
David Crow27-Jul-05 5:36
David Crow27-Jul-05 5:36 
GeneralRe: launch an html file Pin
Halawlaws27-Jul-05 5:39
Halawlaws27-Jul-05 5:39 
GeneralRe: launch an html file Pin
David Crow27-Jul-05 5:44
David Crow27-Jul-05 5:44 
GeneralCOM PORT Does NOT receives all Data! Pin
tomek1827-Jul-05 4:21
tomek1827-Jul-05 4:21 
GeneralRe: COM PORT Does NOT receives all Data! Pin
Marc Soleda27-Jul-05 5:27
Marc Soleda27-Jul-05 5:27 
Generalgeneral mfc question: lpszTemplateName Pin
23_44427-Jul-05 4:17
23_44427-Jul-05 4:17 
GeneralRe: general mfc question: lpszTemplateName Pin
David Crow27-Jul-05 5:05
David Crow27-Jul-05 5:05 
GeneralRe: general mfc question: lpszTemplateName Pin
23_44427-Jul-05 5:17
23_44427-Jul-05 5:17 
GeneralRe: general mfc question: lpszTemplateName Pin
David Crow27-Jul-05 5:31
David Crow27-Jul-05 5:31 
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 

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.