View previous topic :: View next topic |
Author |
Message |
baztardo
Joined: 16 May 2007 Posts: 11 Location: philippines
|
noob question |
Posted: Wed May 16, 2007 2:25 am |
|
|
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](images/smiles/icon_smile.gif) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Wed May 16, 2007 4:00 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed May 16, 2007 7:42 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
baztardo
Joined: 16 May 2007 Posts: 11 Location: philippines
|
|
Posted: Wed May 16, 2007 5:38 pm |
|
|
thanks ![Laughing](images/smiles/icon_lol.gif) |
|
![](templates/subSilver/images/spacer.gif) |
|