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

software SPI

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



Joined: 16 Nov 2004
Posts: 8

View user's profile Send private message

software SPI
PostPosted: Tue May 24, 2005 4:16 pm     Reply with quote

Hello everyone,
Iam using RFPIC 12F675F. It does not have a SPI. I need to get data from LM71, temperature sensor. LM 71 has 5 pins(2 for power and GND), one for Chip select(CS'), one for clock and other for data. I am using the general purpose pins(GP1,GP2,GP4,GP5)for clock,data,poweron and chip select signals respectively.
I would like to send 2 byte command to LM71, and receive 2 byte temperature data from it. Spec. sheet says we need 16 clocks for transmit or receive.
I can send the clock by making pin high and lowering it, but how do I read the data from the sensor at the rising edge of the clock.

I know, I have given a lot of details, but my question is very simple?
How do I make Master(in SPI transfer), detect its own clock edge and then read the data?

Thanks for any help

ks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue May 24, 2005 5:02 pm     Reply with quote

The CCS driver files, DS1302.C and ADS8320.C show how
to do software SPI. Look for them in this folder:
c:\Program Files\Picc\Drivers
cartic



Joined: 16 Nov 2004
Posts: 8

View user's profile Send private message

thanks
PostPosted: Tue May 24, 2005 5:29 pm     Reply with quote

Thanks for the help
sk
RM
Guest







ADS8320
PostPosted: Sun Jul 01, 2007 3:06 am     Reply with quote

Hi,

I connected PIC16F84A to ADS8320 but am only getting the high byte correct, low byte is jumping too much. Need your help desperately.I am using the builtin ADS8320.c program.

Thanks.
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