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

Receive data - USART PIC16F628A

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Sep 21, 2006 1:50 pm     Reply with quote

Quote:

I`m using 2 microcontrolers PIC16F628A

#include <16F628.h>

If you're using the "A" chips, then you need to #include the 16F628A.H file.

Quote:
#define NUM_SENSORES 2

int i = 1;

while(i < NUM_SENSORES)
printf("%c",saida);

delay_ms(100);

The while() loop above will execute continuously. The delay_ms()
will never execute.


Quote:

#use rs232(baud=9600,xmit=PIN_B2,rcv=PIN_B1)

Add the ERRORS parameter to all of your #use rs232() statements.


Quote:
int saida;
saida = 0xAA; // 10110101

0xAA is the same as 10101010. In your comment above, you have
given the binary value for 0xBA.


My advice is to get the transmitter (PIC 1) working with a terminal
program on a PC. Don't use 0xAA as the data. Use some data that
you can see on a terminal program, such as:

saida = 'A';

or

saida = 'B';
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