CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

communication issue
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

PostPosted: Tue Apr 05, 2011 9:52 am     Reply with quote

temtronic wrote:
Might like to see your listing to see how much code the 'streamed formatted print' function takes, I count 7 characters going to the 'PC'.At 9600 baud, that's about 7-8 ms not including any other overhead of the other 4 or 5 lines in the ISR.

Fair enough but even uncommented i'm only receiving 4 Bytes, when I look at buffer in function RecReply() after I exit the while loop on the bottom of {
Code:
         while(bkbhit){
       cin=bgetc();
       if (cin == 0x86 || (*byte_cnt)!=0) {
         recv_data[(*byte_cnt)++]=cin;
        }         
      }
      (*time_cnt) = 0;  // reset timeout
    }

I see that buffer gets filled up with 4 Bytes only [0]-[3], then another 4, starting with the same data from [4]-[7] then [8] to [10 (only 3 Bytes, wjo knows where the 4th went...?) then [11] to [14] and, and, and... should i DECREMENT next_in somewhere to fill-up from the beginning always? But even then, that might not help... I tried settinf the Int_rda2 to HIGH but that didn't change anything either... :(
Any other hints or suggestions would be appreciated!
Thanks a lot!
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

PostPosted: Tue Apr 05, 2011 10:18 am     Reply with quote

I think I got it figured out now!
The problem was delays (froom fprintf()s & fputc()s)and I got all confused with stepping thru my code...

Thanks for sticking around with me, your help is as always much appreciated!

MUCHAS GRACIAS! (yes, i'm studying Spanish too Razz) Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group