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

rs232 in 16F84 1 wire free

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



Joined: 26 Apr 2009
Posts: 11

View user's profile Send private message

rs232 in 16F84 1 wire free
PostPosted: Sun Apr 26, 2009 7:43 pm     Reply with quote

Hello, I have a problem.
I'm using a goldwafer card (pic16f84) and I only have b7 pin to communicate with other pic, 18f2550. I'm trying to use
Code:

#use rs232(stream = SALIDA_PC,baud=9600,parity=N,xmit=PIN_C7,bits=8)
#use rs232(stream = ENTRADA_WAFER, baud= 9600, parity=N, RCV=PIN_C7, bits=8)

The same pin to xmit and rcv, and I use fgetc(stream) when I want to read and fprintf(stream, "") when I want to write.

These works ok in 2550 but when I try to do the same in 16f84, when I use fprintf(stream,""), works ok, but when I want to read some sequence from 2550 using fgetc(stream), it doesn't work.

I can see the data transmission using a rs232 with hyperterminal, and I can see all that I send between 2 pics. The communication is:

PIC16F84 sends some string
PIC18f2550 reads the string and answers with other one
PIC16f84 reads the string and answers with other one
end

Well, if 16f84 doesn't read with fgetc, I can see all ok, but when i put in my code fgetc, the 2550 answer is wrong.

Any idea???

May I use other form to do this?? (I need some bidirectional code!)

Thanx a lot!!!
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