Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Jochen Arndt16-Feb-12 23:20
professionalJochen Arndt16-Feb-12 23:20 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Erudite_Eric17-Feb-12 6:10
Erudite_Eric17-Feb-12 6:10 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson17-Feb-12 21:13
Andrew Pearson17-Feb-12 21:13 
SuggestionRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Jochen Arndt17-Feb-12 22:58
professionalJochen Arndt17-Feb-12 22:58 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson21-Feb-12 13:04
Andrew Pearson21-Feb-12 13:04 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Jochen Arndt21-Feb-12 21:46
professionalJochen Arndt21-Feb-12 21:46 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson22-Feb-12 11:35
Andrew Pearson22-Feb-12 11:35 
AnswerRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Erudite_Eric16-Feb-12 20:20
Erudite_Eric16-Feb-12 20:20 
Andrew Pearson wrote:
When I look at the standard serial port driver supplied with the WDK, I see that IOCTL_SERIAL_SET_LINE_CONTROL uses WdfInterruptSynchronize to set the Line Control Register,


Hmm, not sure if Microsoft actualy rewrote serial.sys to use WDF or not, so it cold just be a sample driver.

The older DDK with WDM source code actually IS serial.sys on those older machines (XP and older) so it might be a more informative source since WDF can hide stuff.

As the other poster says, watch out for the FIFO. I would make it 1 byte, that way you know that after any change you make to the parity bit settings will take effect immediately, and you might also like to have a slight delay, and possibly prod the UART before sending data. (You cold prod it by doing a disable/enable for example, or a flush, or toggling DTR...).

A UART programming sheet could be useful, it will tell you exactly what is going on at the chip when you run the various IOCTL calls.

How are you determining the value of the parity bit? DO you have a line sniffer? If not you might need to wire up the chip to a logic analyser to see what is actually on the wire. They are very useful, as well as scopes, in really getting HW to work as you want.
==============================

Nothing to say.

GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson17-Feb-12 21:30
Andrew Pearson17-Feb-12 21:30 
QuestionProblem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 14:41
john john mackey16-Feb-12 14:41 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Richard Andrew x6416-Feb-12 16:09
professionalRichard Andrew x6416-Feb-12 16:09 
GeneralRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 19:38
john john mackey16-Feb-12 19:38 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Chuck O'Toole16-Feb-12 17:29
Chuck O'Toole16-Feb-12 17:29 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Chuck O'Toole16-Feb-12 17:32
Chuck O'Toole16-Feb-12 17:32 
GeneralRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 19:44
john john mackey16-Feb-12 19:44 
QuestionWebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 10:30
Fred Ackers16-Feb-12 10:30 
AnswerRe: WebSockets in native C++ (not managed) Pin
enhzflep16-Feb-12 17:53
enhzflep16-Feb-12 17:53 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 19:31
Fred Ackers16-Feb-12 19:31 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep16-Feb-12 23:57
enhzflep16-Feb-12 23:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers19-Feb-12 6:57
Fred Ackers19-Feb-12 6:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep19-Feb-12 12:19
enhzflep19-Feb-12 12:19 
QuestionSending message between objects Pin
aangerma16-Feb-12 9:16
aangerma16-Feb-12 9:16 
QuestionRe: Sending message between objects Pin
David Crow16-Feb-12 10:54
David Crow16-Feb-12 10:54 
AnswerRe: Sending message between objects Pin
aangerma16-Feb-12 19:42
aangerma16-Feb-12 19:42 
AnswerRe: Sending message between objects Pin
Albert Holguin16-Feb-12 18:15
professionalAlbert Holguin16-Feb-12 18:15 

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.