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 support@ccsinfo.com

pic16f886 uart receiving problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
noman yousaf



Joined: 07 Jan 2016
Posts: 17
Location: pakistan

View user's profile Send private message Send e-mail Visit poster's website

pic16f886 uart receiving problem
PostPosted: Tue Jun 21, 2016 2:04 pm     Reply with quote

hi all,
I am using pic16f886 and want to receive the 16 bit data by interrupt, from another same MCU.
Can someone send me the code?
I have this code for transmitting the data 55 by int tmp19.
Code:

void transmit (void)
{
tmp19=55;
printf("%u", tmp19);
}
temtronic



Joined: 01 Jul 2010
Posts: 9163
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jun 22, 2016 7:06 am     Reply with quote

1st error..
you're not transmitting 16 bit data.........

tmp19=55; probably means it's 8 bits...unless declared previously as 16bits..

%u means variable will be sent as an unsigned integer ( 0-255)





Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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