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 support@ccsinfo.com

rs232 samples

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



Joined: 03 Apr 2005
Posts: 22
Location: Laguna Philippines

View user's profile Send private message Yahoo Messenger

rs232 samples
PostPosted: Sat Apr 09, 2005 11:30 pm     Reply with quote

hello everyone!

May I ask a simple "Hello World" program that will be send from hyperterminal via rs232 and then displayed on 2x16 LCD... i'll be using PIC16F876 and pcwh IDE ver3.40.
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Sun Apr 10, 2005 1:49 am     Reply with quote

This thread has code that will do what you want:

http://www.ccsinfo.com/forum/viewtopic.php?t=22221&highlight=
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 10, 2005 1:28 pm     Reply with quote

The code on that thread is too complicated for a newbie. The code
below matches his request better, and is also simple enough for him
to understand.
Code:
#include <16F876.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#define use_portb_lcd TRUE    // LCD is on port B

#include <lcd.c>

void main()
{
char c;

lcd_init();

while(1)
  {
   c = getc();     // Get a char from the PC
   lcd_putc(c);    // Display it on the LCD
  }

}
jelodavid



Joined: 03 Apr 2005
Posts: 22
Location: Laguna Philippines

View user's profile Send private message Yahoo Messenger

PostPosted: Sun Apr 10, 2005 4:20 pm     Reply with quote

thank you for very big help.........mabuhay! Very Happy
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