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 receive

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
[email protected]



Joined: 16 May 2006
Posts: 39

View user's profile Send private message

RS232 receive
PostPosted: Fri May 19, 2006 12:06 am     Reply with quote

I am using PICDEM4 for an experiment which use LT1280 for RS232 interface. on/off pin (actice high) is connected to RB3.

A simple program

#include <16f628a.h>
#fuses nowdt, hs, nolvp
#use delay(clock=8000000)
#use rs232(baud=9600,parity=N,xmit=PIN_B5,rcv=PIN_B2,bits=8)



void main()
{


output_high(PIN_B3); // enable LT1280 on/off pin
printf("Enter a char");
while (true) {

c=getc();

putc(c);
}
}

It can send "Enter a char" to a pc BUT cannot receive any data from the pc.

I double checked the cable and LT1280 and confirmed they were working fine. I also tried this porgramwith 18F1320, the result is the same.

Any idea?

Thansks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 19, 2006 1:23 am     Reply with quote

The PicDem4 user's guide says you must have jumpers on the
upper two pins of J18 and J19. Do you have the jumpers installed ?
Quote:

For RS-232 operation, these jumpers must be configured as follows:
PIC16:
J18/19 - Upper two pins ON
� J20 - OFF (if populated)
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