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

rs-232 simple HELLO print

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



Joined: 27 Jun 2017
Posts: 71

View user's profile Send private message

rs-232 simple HELLO print
PostPosted: Fri Aug 04, 2017 12:01 pm     Reply with quote

Hello Guys,

I have got PIC16F887 prototype board from CCS. I am trying to print "hello" on my serial monitor of CCS compiler. I am using CCS PCWH 5.074. I am not getting output.

I have used TTL to USB cable to connect the DB9 connector of (serial PC to prototype board cable) that came with the kit . Here are my connections


TTL-usb adapter DB-9

RXD 1- RXD

TXD 3- TXD

GND 5 -GND

Here is my code.
Code:

#include  <16f877.h>
#fuses HS,NOLVP,NOWDT,PUT
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#include <input.c>

void main()
{
   
  while(TRUE)
  {
    printf("\n hello");
  }
}


I am a beginner and really need to display PIC output on serial monitor. Please help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Fri Aug 04, 2017 1:03 pm     Reply with quote

The prototype board using the DB9, contains a MAX232. So generates RS232, not TTL serial....

You need to disconnect the MAX232, and connect directly to the TTL level pins not the DB9. The schematic with the card shows how to do this.

The old board had jumpers for this. Not sure about the one you have.
POPE19



Joined: 27 Jun 2017
Posts: 71

View user's profile Send private message

PostPosted: Sat Aug 05, 2017 5:13 pm     Reply with quote

It is working fine. Thanks Ttelmah !!
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