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

RX and TX

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



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

RX and TX
PostPosted: Mon Mar 04, 2013 8:29 am     Reply with quote

I have a transceiver, it requires me to make 6 pins of the PIC to make it RX and TX. What is the code for that ?
I used the protocol rs232 to set the baud 9600 as required, so now I need more than one pin to be xmit
Thank you
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 8:42 am     Reply with quote

Hi,

Post a link to the "tranceiver" so that we can have a look at the electrical interface that is required.

In general, you'll need a minimum of three wires, Tx, Rx, and Gnd, connecting a serial device to your PIC. Some serial devices may also require additional lines for 'handshaking', or 'flow control'.

John
Ttelmah



Joined: 11 Mar 2010
Posts: 19343

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 8:47 am     Reply with quote

You can't.

However I'd suspect either:
It needs the same signal to multiple pins - if so, either wire them together or add external logic to do this, or:
It is not using RS232, or possibly is using some form of handshaking - in which case the extra pins don't want TX/RX....

So, post a part number or (better) a link to the data sheet of the module, and we may then be able to help.

I see ezflyer said the same while I was typing... Smile

Best Wishes
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 9:27 am     Reply with quote

Hi Ttelmah,

This issue comes up so often that I think it should be added to the 'sticky' at the top of the forum!

"If you are interfacing external hardware to your PIC, post a link to the hardware datasheet"

Of course, this assumes that the forum users actually read the guidelines at the top of the forum.....

John
amjad_alahdal



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PostPosted: Mon Mar 04, 2013 9:46 am     Reply with quote

https://www.sparkfun.com/products/691
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 9:55 am     Reply with quote

amjad_alahdal wrote:
https://www.sparkfun.com/products/691


That has an SPI interface, not an RS232. Though it does have 6 pins to interface with.

Are you sure this is the correct module?
amjad_alahdal



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PostPosted: Mon Mar 04, 2013 9:59 am     Reply with quote

I am sorry what do you mean by " Are you sure this is the correct module? " ?
If you mean the link, yes, I'm using this chip.
They even gave an example by Micro-C, I need to make it compatible with the CCS.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 10:03 am     Reply with quote

Hi,

You seem to be jumping around a lot. Did you ever solve the issue in this thread: http://www.ccsinfo.com/forum/viewtopic.php?t=49984

John
Ttelmah



Joined: 11 Mar 2010
Posts: 19343

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 10:15 am     Reply with quote

OK. Forget #use RS232. This has nothing whatsoever to do with this module, since it doesn't use RS232....

It uses SPI. Now, what PIC are you intending to use?. Most have hardware SPI, but some don't.

You have MOSI (master out slave in), MISO (master in slave out), SCK (serial clock), Three pins that are the actual SPI 'data' interface, then: CSN (a select to say 'I want to talk'), CE, which turns the module round, switching from receive to transmit, and then INT, which is an optional signal you can program to tell 'you' that the device wants to say something.

Look at #USE SPI. Then realise you will have to possibly listen for the interrupt, and control the CE line, but the byte transactions can be done for you by the CCS drivers.

Best Wishes
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Mon Mar 04, 2013 10:36 am     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=47351

Above is the link to the driver by user "Eduardo".

I think your understanding of the hardware required to interface to your transceiver is very limited.

Try to read the datasheets and find tutorials on youtube or even directly on Sparkfun.

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
amjad_alahdal



Joined: 19 Feb 2013
Posts: 50

View user's profile Send private message Yahoo Messenger MSN Messenger

PostPosted: Tue Mar 05, 2013 12:51 am     Reply with quote

ok, thanks ,,
I think I'll check that code
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