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 error

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



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

RS232 error
PostPosted: Tue Sep 07, 2004 3:15 pm     Reply with quote

When I am using RS232 to transfer message, error button on CCW serial port monitor light up, and ON the screen 'X' signal appeared, which according to my program should be 'a', awhat might caused this problem.

I used a RS232 convertor between a 12f675 and the computer, I sued the same system for a long time without anything happened. I just moved the set up to another breadboard. and I checked carefully everything is kept as original. here is my testing program

Code:
#if defined(__PCM__)
#include <12f675.h>
#fuses INTRC_IO,NOWDT,NOPROTECT,PUT,NOMCLR
#use delay(clock=4000000)
#use rs232(baud=9600, parity=N, xmit=PIN_A4, RCV=PIN_A3)


void main()
{
   int8 mode; //lighting condition grabbing set
   int16 i;
  setup_comparator(NC_NC_NC_NC);
  while(1) {
  char ch=' ';
  while(ch!='a')
  {
  ch=getc();
  output_high(PIN_A0);
  delay_ms(100);
  putc(ch);
    }
 output_high(PIN_A1);
 delay_ms(100);

//  mode=1;
//  while(mode)
//    {
//       mode=input_A() & 0x08;
//    }
  //  for(i=0;i<255;i++)
 //     produce_pwm(i);
 //   putc(getc()+1);

  }
}
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 07, 2004 5:26 pm     Reply with quote

Well if nothing changed except that you rewired the circuit, then that is where the problem most likely is.
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