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

M41T94 using SPI

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







M41T94 using SPI
PostPosted: Thu Feb 26, 2004 1:47 pm     Reply with quote

Hello everyone,

I have the following problem using the M41T94 with my setup using a PIC18F8720. I have connected the SPI pins of the Real time clock to the HW SPI pins of the PIC. Also for the Chip Enable(/E) Pin of the RTC I used the A4 pin of the PIC. The setup of SPI is done using the following line:

setup_spi(SPI_MASTER|SPI_L_TO_H|SPI_CLK_DIV_16);

I am trying to hold the A4 pin that is connected to Chip Enable high all the time as instructed by the datasheet yet the command output_high(PIN_A4)does not pull the pin high as I am seeing on the Oscilloscope.

Is there anything about the A4 pin that is peculiar that I should know about? Is my SPI setup correct?

Thanks
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Thu Feb 26, 2004 3:31 pm     Reply with quote

Is that the pin with pull down only?
altanb
Guest







PostPosted: Thu Feb 26, 2004 4:28 pm     Reply with quote

the datasheet says the following on that pin. I did not realize that before:

Quote:
Input/output or external clock input for Timer0.
Output is open-drain type.

Buffer: Schmitt Trigger input


Is there still a way to use this pin for my purpose?
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Thu Feb 26, 2004 7:22 pm     Reply with quote

Tie a pull up resistor from that pin to the voltage supply. You will be able to use it as if it were any other output.
altanb
Guest







PostPosted: Sun Feb 29, 2004 1:22 pm     Reply with quote

Thanks,

worked like a charm
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