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

noob question

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



Joined: 16 May 2007
Posts: 11
Location: philippines

View user's profile Send private message

noob question
PostPosted: Wed May 16, 2007 2:25 am     Reply with quote

Question
hi
im just new on using C language in pic prog'g....
I dont have any reference in learning C so I just read the contents of the HELP file of CCS compiler and its examples
I wanna ask about---
Code:
#use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2)

why is it always(in the example) that the baud is set to 9600?
what is xmit?
what is rcv?
i wanna make an LED blink in a pic16f84a
thanks Smile
Ttelmah
Guest







PostPosted: Wed May 16, 2007 4:00 am     Reply with quote

Why not!...
9600, is a very common baud rate. A lot of industrial kit, programmers etc., use this rate. There is nothing 'magic' about it. Examples here dealing with GPS (for example), will normally be using 4800bps instead,while ones only using short range links between boards (the supported signalling range of standards like RS232, _falls_ with increasing switching speeds), will use higher rates like 115200.
'xmit', is the pin on the PIC, which will be used to transmit data, and 'rcv', the pin that will be used to receive.
To just flash an LED, you don't need RS232 at all.

Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed May 16, 2007 7:42 am     Reply with quote

Note that "#use rs232" is specific to CCS C so you won't find it mentioned in a general C reference book. Every compiler is free to deal with this in it own way. Most micro controllers will use something similar but a PC compiler will no doubt be very different.
_________________
The search for better is endless. Instead simply find very good and get the job done.
baztardo



Joined: 16 May 2007
Posts: 11
Location: philippines

View user's profile Send private message

PostPosted: Wed May 16, 2007 5:38 pm     Reply with quote

thanks Laughing
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