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

12F675 RS232 Help
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 26, 2007 1:07 pm     Reply with quote

I tested the following program and it works. It displays this in the
terminal window. I turned the power on/off four times to get this result.
Quote:

Hello World
Hello World
Hello World
Hello World


This program was compiled with vs. 4.064.
Code:
#include <12F675.h>
#fuses INTRC_IO, NOWDT, NOMCLR, PUT, BROWNOUT
#use delay(clock=4000000)
#use rs232(baud=9600,xmit=PIN_A0, rcv=PIN_A1)

//===========================
void main()
{

printf("Hello World \n\r");

while(1);
}


Quote:
What are the wire colours Tx, Rx and gnd pins on a serial cable?

It could be any colors. You can't tell the pins that way. You must use
an ohmeter and measure the resistance between the DB9 pins and the
the ends of the wires. Then you can make a list of which color wire
goes to which pin. Use a magnifier to look closely at the plastic on
the DB9 connector. You can see the pin numbers. Example:
http://rocky.digikey.com/WebLib/Norcomp/Web%20Photos/171-009-203L001.jpg
(You may need to increase the brightness and/or gamma on your
monitor to see the pin numbers).

Quote:
In the terminal window am i suppose to open my program?

No. A "terminal window" is a program by itself. You just run it.
Microsoft Windows has a terminal program included in it, called
HyperTerminal. This thread has instructions on how to use it: http://www.ccsinfo.com/forum/viewtopic.php?t=9253
apl01



Joined: 18 Dec 2007
Posts: 18

View user's profile Send private message

PostPosted: Thu Dec 27, 2007 3:18 am     Reply with quote

I could not get the 12f675 to work but i tried my 12f683s and had no problem. I have no idea why since i did everything the same as the 12f683. Thanks for your help.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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