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 CCS Technical Support

How to coding RS232 (one wire)

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



Joined: 23 Sep 2003
Posts: 12
Location: South KOREA

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

How to coding RS232 (one wire)
PostPosted: Fri Jun 08, 2007 3:10 am     Reply with quote

Hi?

Thank you for reading.

I wanna control LANC

It's have only one line.... LANC, VCC, GND

I wanna use PIC with CCS-C...

First 4 byte is Send MSG and 4 byte is receive MSG...

But How to connection from LANC to RX / TX

and How to coding

ex>
I wanna send 0x12 0x23 0x 34 0x45 and receive mode A B C D

IF you know please teaching me connection and coding.


thank you~!
_________________
Hello~?

This is South KOREA
My name is Sanghyouk Kim But Call me Nick
Sorry I'm poor English
Ttelmah
Guest







PostPosted: Fri Jun 08, 2007 4:18 am     Reply with quote

You will need to have a pull up resistor on the line, and use the 'FLOAT_HIGH' keyword, in #use RS232. LANC, is a Sony protocol, using 'control-L' signalling, which is a standard used on quite a few cameras, and is an open-collector drive, which this command emulates. Most cameras contain the required pull-up, but you should verify this, and I would suggest having a largish pull up present at your end of the connection, even if there is a pull up at the other end, since this will prevent the line from floating to an indeterminate state, if the camera is not present.

Best Wishes
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Jun 08, 2007 6:56 am     Reply with quote

This link tells you everything you need to know to connect and talk to a LANC device.
http://www3.nbnet.nb.ca/dmeed/sony_lan.html

This link is also helpful:
http://www.boehmel.de/lanc.htm

The first link also gives some C code you can translate to CCS fairly easily but you are going to need to do some work yourself to make this happen.

I also recommend using the ELM interface chip mentioned in this article since it gives you a number of advantages with a very low cost:
http://www.com-n-sense.com/Eng_Article_Lanc.htm
http://www.elmelectronics.com/connect.html
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