Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Working Threads Pin
Hamid_RT15-Aug-06 2:56
Hamid_RT15-Aug-06 2:56 
GeneralRe: Working Threads Pin
cv_k3n15-Aug-06 3:20
cv_k3n15-Aug-06 3:20 
GeneralRe: Working Threads Pin
Hamid_RT15-Aug-06 7:57
Hamid_RT15-Aug-06 7:57 
GeneralRe: Working Threads Pin
cv_k3n15-Aug-06 21:39
cv_k3n15-Aug-06 21:39 
GeneralRe: Working Threads Pin
Hamid_RT15-Aug-06 23:54
Hamid_RT15-Aug-06 23:54 
GeneralRe: Working Threads Pin
cv_k3n16-Aug-06 2:04
cv_k3n16-Aug-06 2:04 
GeneralRe: Working Threads Pin
Hamid_RT16-Aug-06 4:33
Hamid_RT16-Aug-06 4:33 
Questionchecksum [modified] Pin
thathvamsi13-Aug-06 18:38
thathvamsi13-Aug-06 18:38 
Hi all,
Iam having a checksum algo implemented in my code.
The Pc receives a packet from microcontroller and then does this as a check:
for(i=0;i < max_length-1;i++)<br />
{<br />
checksum ^= recd_buf[i];<br />
}

then this checksum is compared with the last member fo the received packet which has the checksum sent from microcontroller.
if(checksum != recd_buf[max_length-1])<br />
{<br />
"bad packet"<br />
}


but i always get the values to be not equal. By printing out the received packet details, they are all correct.
there s no error on the microcontroller end.
There is error in the calcualtion of checksum at the Pc end (the code shown above).

Can anyone help? I know there are various checksum algos available. but i want to find out the bug/error in this.
thanks in advance.


-- modified at 0:39 Monday 14th August, 2006
AnswerRe: checksum Pin
tanvon malik13-Aug-06 18:54
tanvon malik13-Aug-06 18:54 
GeneralRe: checksum Pin
Steve Echols13-Aug-06 19:23
Steve Echols13-Aug-06 19:23 
AnswerRe: checksum Pin
Michael Dunn13-Aug-06 19:29
sitebuilderMichael Dunn13-Aug-06 19:29 
GeneralRe: checksum Pin
thathvamsi13-Aug-06 19:45
thathvamsi13-Aug-06 19:45 
GeneralRe: checksum -works now Pin
thathvamsi14-Aug-06 16:26
thathvamsi14-Aug-06 16:26 
AnswerRe: checksum Pin
Archyami13-Aug-06 20:33
Archyami13-Aug-06 20:33 
QuestionProcessShellCommand problem in release mode Pin
NorGUI13-Aug-06 18:08
NorGUI13-Aug-06 18:08 
QuestionHow to print the text in the new line of a multi line edit box . Pin
VCSharp00713-Aug-06 18:05
VCSharp00713-Aug-06 18:05 
AnswerRe: How to print the text in the new line of a multi line edit box . [modified] Pin
bob1697213-Aug-06 18:26
bob1697213-Aug-06 18:26 
GeneralRe: How to print the text in the new line of a multi line edit box . Pin
VCSharp00713-Aug-06 20:44
VCSharp00713-Aug-06 20:44 
GeneralRe: How to print the text in the new line of a multi line edit box . Pin
Hamid_RT13-Aug-06 21:37
Hamid_RT13-Aug-06 21:37 
Questionabout system32\netshell.dll Pin
diat13-Aug-06 18:03
diat13-Aug-06 18:03 
AnswerRe: about system32\netshell.dll [modified] Pin
A_Fa13-Aug-06 19:11
A_Fa13-Aug-06 19:11 
Generaldetails, please Pin
diat16-Aug-06 17:53
diat16-Aug-06 17:53 
GeneralRe: details, please Pin
A_Fa16-Aug-06 20:03
A_Fa16-Aug-06 20:03 
QuestionRe: about system32\netshell.dll Pin
Hamid_RT13-Aug-06 21:35
Hamid_RT13-Aug-06 21:35 
QuestionCan a function call a afx_msg function??? [modified] Pin
mimimimilaw13-Aug-06 17:33
mimimimilaw13-Aug-06 17:33 

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.