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

SPI CDP68HC68P1 problem

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



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

SPI CDP68HC68P1 problem
PostPosted: Fri Apr 27, 2007 2:44 pm     Reply with quote

Has anyone used a SPI 8 bit I/O port the CDP68HC68? I guess it was popular with the 68HC05 series processors, but is now hard to find. We have a large quantity and at least some are defective so I volunteered to build a little PIC screener to test them. But the Intersil data sheet is really vague on which edges data should be clocked in on and how to set port direction. I have tried to use "standard" SPI timing but none of the chips are working with that.

If someone has PIC code that drives this chip, or even a decent datasheet I would be very grateful.
_________________
The search for better is endless. Instead simply find very good and get the job done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 4:16 pm     Reply with quote

This page shows the sample edge and clock idle states of the
four SPI modes:
http://www.totalphase.com/support/articles/article03/#modes

Here is the Intersil chip's data sheet:
http://www.intersil.com/data/fn/fn1858.pdf
On page 7, in the 2nd paragraph on the left side, it says the SPI mode
is selected by the state of the SCK signal when \CS goes low.
This can be seen in Figure 6, at the bottom of page 6.
For example, if you initialize the SCK pin to a low level at the start
of an SPI operation, then when you take \CS low, the Intersil chip
will be be operating in SPI mode 1.

See my post in this thread for information on setting up SPI mode 1.
http://www.ccsinfo.com/forum/viewtopic.php?t=29656

Also note that at 3.3v operation (of the Intersil chip), your max SCK
clock frequency is only 1 MHz. Make sure you use the correct divisor
in your setup_spi() statement to reflect this limitation.
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