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

2 wire interface to a PIC using C? Is it i2c?

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



Joined: 21 Jul 2005
Posts: 36

View user's profile Send private message

2 wire interface to a PIC using C? Is it i2c?
PostPosted: Thu Aug 25, 2005 4:14 am     Reply with quote

Hiya,

I'm trying to intergrate a programmable oscillator (DS1077 (link to datasheet/info etc)) into a circuit, in place of a crystal oscillator.
What I'm looking to do is to be able to program it on the fly from a PIC, and according to a very informative AppNote (AppNote 171), I've got an idea of how to program it, but unfortuately the code is in assembler, not C.
Its two pins, one a clock signal, the other data, which isn't that difficult.
I had major problems trying to get a similar circuit to work for another application, so I'm looking at ways of speeding it up.
I'm new to PIC programming, but is I2C any relevance to what I want to do? I keep hearing mentions of it on the forums, but I don't have a great understanding of what it is...

Thanks:)
valemike
Guest







PostPosted: Thu Aug 25, 2005 7:48 am     Reply with quote

First of all, you should look at the timing diagrams to see if it truly is i2c-like or proprietary.

Also, "2-Wire interface" seems to be a term that is synonymous with i2c. It's just the company doesn't want to get in legal trouble with Philips who has that name trademarked.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

PostPosted: Thu Aug 25, 2005 8:10 am     Reply with quote

It is I2C. Also, Maxim does have an application note for writing PC C code to program the part through a parallel port.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
bwgames



Joined: 21 Jul 2005
Posts: 36

View user's profile Send private message

PostPosted: Thu Aug 25, 2005 8:13 am     Reply with quote

I've read the PC parallel notes, but I'm looking to control it from a PIC, is it simple enough to adapt the code?

Thanks Smile
Ttelmah
Guest







PostPosted: Thu Aug 25, 2005 8:15 am     Reply with quote

The big 'caveat', is that you either have to set your I2C rate to always be 'in spec' at the fastest clock rate, or you need to change the I2C speed definitions, when you change the multiplier byte in the chip.
If you use the software I2C implementation, and add a new USE_DELAY statement for the new rate, once the speed change occurs, the compiler _should_ handle this for you...

Best Wishes
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