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 interface with component with different frequency?

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







How to interface with component with different frequency?
PostPosted: Tue Jul 05, 2005 8:16 pm     Reply with quote

Hi,


Let say, My PIC is run on 4MHz and the 2nd IC is run at 3.579MHz. How to make them communicate is i want the duty cycle of output wave of PIC is in the range of 45% - 55%?

Thanks
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Jul 05, 2005 8:35 pm     Reply with quote

You didn't give enough details.
Kit
Guest







PostPosted: Tue Jul 05, 2005 8:40 pm     Reply with quote

Hi

Detail such as?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Jul 05, 2005 8:43 pm     Reply with quote

Like what in the world you are talking about. It sounds like you want to generate a pwm with a 45%-55% duty cycle and read this with another IC.
Guest








PostPosted: Tue Jul 05, 2005 8:50 pm     Reply with quote

How bout using

connect the 2nd IC to the pin which supposed to connect to RS232, and use #use rs232?
Guest








PostPosted: Tue Jul 05, 2005 8:51 pm     Reply with quote

How bout

connect the 2nd IC to the pin which supposed to connect to RS232, and use #use rs232?
G
Guest







PostPosted: Tue Jul 05, 2005 9:00 pm     Reply with quote

How bout

connect the 2nd IC to the pin which supposed to connect to RS232, and use #use rs232?
Kit
Guest







PostPosted: Tue Jul 05, 2005 9:04 pm     Reply with quote

Basically, I am transmitting the signal in serial using only 1 pin to the 2nd IC.

It is not PWM, I just transmit the data in serial way, between 2 IC run at different clock.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 05, 2005 9:15 pm     Reply with quote

I think all he wants to know is if can he do RS232 (or maybe SPI)
between two different PICs that have different crystal freqs.

The answer:
Yes, you can.
Use the CCS #use rs232() statement to set a common baud rate,
and let the compiler handle setting up the internal registers to
generate the correct baud rate.
valemike
Guest







PostPosted: Tue Jul 05, 2005 9:49 pm     Reply with quote

1. What exactly is the 2nd IC? Is it another microcontroller?
2. How far is the second IC from your PIC? On the same board?
Kit
Guest







PostPosted: Tue Jul 05, 2005 11:41 pm     Reply with quote

the 2nd IC is smart card. well, smart card may contains other microcontroller s.

Yup, they r on the same board.

besides using #use rs232, is there other way to connect to IC running at different clock? Let's say i want to send 8 bit in parallel (for other application)? I am facing this kind of problem, when I want to connect to NIC network interface card which runs at 20 MHz, and my PIC runs at 19.xxxx Mhz .


Thanks
Ttelmah
Guest







PostPosted: Wed Jul 06, 2005 3:44 am     Reply with quote

Normally devices don't care what frequency the other components are running. The 'interface', will either be synchronous, and have a clock signal the provides synchronisation at this level, or have control pins that again provide synchronisation (so a parallel interface device, will normally require the data to be presented, then a 'read', or a 'write' signal to be generated to actually transfer the data). The only interfaces that require timing generated by one chip to talk to another, are asynchronous connections like RS232 serial, where the devices must both use the same frequency on the interface itself (but again don't care what the actual crystal used to generate this is), to within a margin allowed for in the design of the interface.

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