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

NetMedia / SitePlayer interface with 16F877A

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



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

NetMedia / SitePlayer interface with 16F877A
PostPosted: Mon Jun 13, 2005 10:36 am     Reply with quote

Hello all,
I'm very new to C programming. I've purchased a NetMedia web server and would like to interface it's serial PINs to a 16F877A.
I'm not sure how to go about writing C codes to send serial data to the siteplayer and receive back data from it.
I read about getc() and putc() but I cannot put the two together to make any sense from it.

SitePlayer has 1 TX and 1 RCV pin which I can connect to B1 and B2 of the PIC chip. default speed for siteplayer is 9600 8N.

any simple code is greatly appriciated.

Thankx Very Happy
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

I'm surprised nobody has done this before!!!
PostPosted: Mon Jun 13, 2005 4:50 pm     Reply with quote

can anybody show me a link or sample code to learn more about this?

Thankx in advance.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 13, 2005 5:06 pm     Reply with quote

Can you post the part number of what you bought ?
They have something called "SitePlayer", but I can't find a "Web server"
product on their website. http://www.netmedia.com/pr_sp.html

They show a schematic of the SitePlayer, but the pinout doesn't
match what you mentioned in your post.
http://www.netmedia.com/sp_docs/SitePlayer_SP1.pdf


So more information is needed from you.
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

schematics
PostPosted: Mon Jun 13, 2005 5:16 pm     Reply with quote

web site is:
http://www.siteplayer.com/main_content.htm

the actual schematics are in a pdf doc at:
http://www.siteplayer.com/docs/001212/SitePlayer_Development_Manual.pdf

I'm trying to replace the MAX232 to PC connections with a PIC16F877A MCU.
The XMT of SitePlayer should go to RCV PIN in CCS code and RCV of Siteplayer should go to XMT PIN in CCS, right?

Thankx
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 14, 2005 1:10 am     Reply with quote

That board isn't really setup to easily modify by adding an external
microcontroller to talk directly to the SitePlayer's RS232 pins.
The SP_RXD and SP_TXD pins on the SitePlayer chip are hardwired
to the ST232 chip.

It could still be done. It just depends on what you want to do.
Here is a way:

1. PIC Tx to SitePlayer Rx pin:
You could remove resistor R26. Then connect a wire between
pin C6 on your 16F877, and pin 7 of Header H4.

2. PIC Rx to SitePlayer Tx pin:
Connect a wire between Pin C7 on the PIC, and pin 8 of Header H4.

3. You've also got to do the handshaking pins, RTS and CTS in a similar
way. And add a ground wire. Is this really worth it ?

Another way:
Leave the SitePlayer board un-touched. I presume you have a 16F877
board. Add a MAX232 chip to that board and also a DB-9 connector,
and just plug it into the SitePlayer board.

------
The SitePlayer board apparently uses hardware flow control --
ie., the CTS and RTS signals on the RS-232 connector.
You're going to have to write routines for your serial i/o in your PIC
that use those signals. Maybe you should email them or look in
their documentation somewhere and confirm if they really use it.
If they don't use it, then this would save you some work.
Or, hopefully, someone on this board has already made some simple
RTS/CTS routines that they can post for you.
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

updates on the project
PostPosted: Tue Jun 14, 2005 8:40 am     Reply with quote

Thank you for your comments. I finally connected NetMedia RX/TX to B1/B2 of 16F877 and have them talk 9600.

why would I need RTS/CTS?

Is there anywhere on the net I can read about these signals?

Thankx again.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 14, 2005 9:25 am     Reply with quote

If you look at the schematic in the back of the SitePlayer Development
Manual, it shows RTS and CTS going from the SitePlayer chip, to
the ST232, and then on to the DB-9 connector.

As I said in my post, I don't know if the SitePlayer chip uses them.
Sometimes, designers will put in features "just in case" they may
need them in the future. If you've got it working without CTS/RTS,
then good.
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