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

Alternative to CCP module

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



Joined: 23 Dec 2005
Posts: 23

View user's profile Send private message

Alternative to CCP module
PostPosted: Tue Nov 21, 2006 10:44 pm     Reply with quote

Hello,i wud like to know whats the best possible alternative to using a CCP module.I so badly miss it in my PIC 16F689,as pointed out by PCM PR.....(sorry 2 bother ,dude)

what i need to do is send data over 3 data lines and use a clock (10KHz),which should fall for each high on a data line. how can i have that much control on the clock n how easy is that or is it?

thanx in anticipation
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 21, 2006 11:00 pm     Reply with quote

Quote:

what i need to do is send data over 3 data lines and use a clock
(10KHz),which should fall for each high on a data line.

Are you trying to do SPI ? That would have a data-in and a data-out
line, and a chip select and a clock. You could use the SSP module for that.

Tell us what chip you are trying to talk to.
codewrecker2



Joined: 23 Dec 2005
Posts: 23

View user's profile Send private message

PostPosted: Wed Nov 22, 2006 1:19 am     Reply with quote

Thanx but SSP aint gonna work for me, i believe.The pic16F689 is being interfaced to motorola 68HC11.The pic has 30 bits to be sent to 68H... which have to be sent on 3 data lines in exactly 10 clock pulses (sadly,this is a compulsion ,so as to keep compatibility with older interfaces). The motorola is on capture mode and interrupts on rising/falling edge of clock till it receives its 10 clocks of data.could be possible to use the a clock of SSP((timer2 o/p)/2) to get my 10 KHz clock and use general purpose port pins to o/p data?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 22, 2006 2:08 am     Reply with quote

I think you'll have to bit-bang the clock and the data.
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