6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Jul 04, 2024 3:19 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Mar 06, 2014 5:32 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 587
Location: Michigan, USA
Anyone here familiar with the SPI implementation on the PIC microcontrollers who can double-check me, please? I know it may seem slightly off topic but it's for my little 3-chip SBC.

Microchip seems to use SPI control bit settings that are slightly different from the more familiar CPOL and CPHA bit settings and so I was wondering if my understanding of the Microchip SPI mode settings is correct in the following diagram.

Thanks in advance. Mike


Attachments:
spi modes.png
spi modes.png [ 157.32 KiB | Viewed 809 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: PIC SPI Modes?
PostPosted: Thu Mar 06, 2014 8:33 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8462
Location: Southern California
Quote:
but it's for my little 3-chip [R65C02] SBC.
That's what makes it ok here.


Change "SCK" to "CKP" and I think it will all be correct. I don't know why they have to make it so complicated though. I never know what mode I'm in. I have to go through this stuff every time I use it for another part. I just referred again to http://en.wikipedia.org/wiki/Serial_Per ... erface_Bus. If I bit-bang it instead, I just follow the waveform charts and things work, and I still don't know what mode I'm in, but it was easier.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: PIC SPI Modes?
PostPosted: Fri Mar 07, 2014 5:08 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 587
Location: Michigan, USA
GARTHWILSON wrote:
Change "SCK" to "CKP" and I think it will all be correct.

Argh!!! Thanks, I'll fix that...
Quote:
I don't know why they have to make it so complicated though.

I agree.

Take care.

Cheerful regards, Mike


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


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 post attachments in this forum

Search for:
Jump to: