|
|
View previous topic :: View next topic |
Author |
Message |
cartic
Joined: 16 Nov 2004 Posts: 8
|
software SPI |
Posted: Tue May 24, 2005 4:16 pm |
|
|
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
|
|
Posted: Tue May 24, 2005 5:02 pm |
|
|
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
|
thanks |
Posted: Tue May 24, 2005 5:29 pm |
|
|
Thanks for the help
sk |
|
|
RM Guest
|
ADS8320 |
Posted: Sun Jul 01, 2007 3:06 am |
|
|
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. |
|
|
|
|
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
|