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 rcv problem

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



Joined: 14 Oct 2006
Posts: 33

View user's profile Send private message

RS232 rcv problem
PostPosted: Sat Oct 14, 2006 3:28 pm     Reply with quote

I'm having problems "receiving"... it transmits fine, but nothing happens when I press a key hence the LED doesn't go off.. I am using a breadboard, along with this RS232 interface (http://www.botkin.org/dale/rs232_interface.htm) using the internal clock (I hope?)

Code:

#include <16F628A.h>
#fuses INTRC,NOPROTECT,NOLVP,NOMCLR,NOWDT,PUT
#use delay (clock=4000000)
#use rs232(baud=9600, xmit=PIN_B6, rcv=PIN_B7)



//========================
void main()
{
port_b_pullups(TRUE);
output_high(PIN_A2);
puts("Input: ");
putc(getc());
output_low(PIN_A2);
}
Mattr0



Joined: 27 Mar 2005
Posts: 30

View user's profile Send private message Visit poster's website

PostPosted: Sat Oct 14, 2006 4:16 pm     Reply with quote

what interface from this page are you using?? mosfet, max232 ?? Your code looks ok. If you can read input on your PC screen then the oscilator is working ok. I would get a scope and check pin B7 and make shure there is a signal going into it.

If you are using the mosfetmethod on this web site I really recommend the Max232. If you use the TI version they are cheap.

Other than that check your connections.
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