Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Microsecond timer Pin
azhari2412-Sep-11 2:37
azhari2412-Sep-11 2:37 
AnswerRe: Microsecond timer Pin
CPallini11-Sep-11 22:17
mveCPallini11-Sep-11 22:17 
GeneralRe: Microsecond timer Pin
azhari2412-Sep-11 2:38
azhari2412-Sep-11 2:38 
AnswerRe: Microsecond timer Pin
Erudite_Eric12-Sep-11 1:25
Erudite_Eric12-Sep-11 1:25 
GeneralRe: Microsecond timer Pin
azhari2412-Sep-11 2:39
azhari2412-Sep-11 2:39 
AnswerRe: Microsecond timer Pin
azhari2412-Sep-11 3:08
azhari2412-Sep-11 3:08 
GeneralRe: Microsecond timer Pin
Erudite_Eric12-Sep-11 4:14
Erudite_Eric12-Sep-11 4:14 
AnswerRe: Microsecond timer Pin
jschell12-Sep-11 8:40
jschell12-Sep-11 8:40 
You need to do the following.

1. Determine the actual baud rate. In your other code you suggested 9600. Presumably that is correct.
2. Create a thread.
3. That thread does the following and NOTHING else.
a. Block on the serial port. (You don't use a timer but rather you wait until data is available.)
b. Read one byte
c. Add that byte to a thread safe queue.
d. Go back to a.
4. In your GUI code (or wherever) you read data from the queue and do whatever you want with it. Note that this occurs in a different thread.
GeneralRe: Microsecond timer Pin
enhzflep12-Sep-11 8:48
enhzflep12-Sep-11 8:48 
GeneralRe: Microsecond timer [modified] Pin
Erudite_Eric12-Sep-11 20:42
Erudite_Eric12-Sep-11 20:42 
GeneralRe: Microsecond timer Pin
pandit8413-Sep-11 3:59
pandit8413-Sep-11 3:59 
GeneralRe: Microsecond timer Pin
azhari2413-Sep-11 9:46
azhari2413-Sep-11 9:46 
GeneralRe: Microsecond timer Pin
jschell13-Sep-11 11:42
jschell13-Sep-11 11:42 
GeneralRe: Microsecond timer [modified] Pin
azhari2413-Sep-11 18:57
azhari2413-Sep-11 18:57 
GeneralRe: Microsecond timer Pin
Erudite_Eric13-Sep-11 22:46
Erudite_Eric13-Sep-11 22:46 
GeneralRe: Microsecond timer Pin
azhari2413-Sep-11 18:58
azhari2413-Sep-11 18:58 
GeneralRe: Microsecond timer Pin
azhari2413-Sep-11 18:54
azhari2413-Sep-11 18:54 
QuestionGetting the handle of a PictureBox in MFC Pin
Tom Moore11-Sep-11 2:16
Tom Moore11-Sep-11 2:16 
AnswerRe: Getting the handle of a PictureBox in MFC Pin
Randor 11-Sep-11 3:34
professional Randor 11-Sep-11 3:34 
QuestionHow to use the hook function of Windows FileOpen dialog Pin
clever10110-Sep-11 1:29
clever10110-Sep-11 1:29 
AnswerRe: How to use the hook function of Windows FileOpen dialog Pin
Philippe Mori10-Sep-11 16:25
Philippe Mori10-Sep-11 16:25 
QuestionLive video processing Pin
Smith#9-Sep-11 21:32
Smith#9-Sep-11 21:32 
AnswerRe: Live video processing Pin
Richard MacCutchan9-Sep-11 23:02
mveRichard MacCutchan9-Sep-11 23:02 
AnswerRe: Live video processing Pin
barneyman11-Sep-11 17:58
barneyman11-Sep-11 17:58 
QuestionMFC CTabCtrl problems in VS2010 Pin
j_schultz9-Sep-11 11:28
j_schultz9-Sep-11 11:28 

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.