• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

18F4620 SPI SCK not working Oshonsoft.

camerart

Active Member
Thread starter #1
Hi,
Since changing to 18F4620 from 18LF4520, I haven't been able to get the SPI working.

The SPI SCK PIN doesn't appear to be switching as it should.
Here is a Logic analysis of the SPI PINS:

I've tried a PORT ON/OFF program, but the SCK PIN only switches between 0-0.5V

Camerart.
 

Attachments

camerart

Active Member
Thread starter #2
Hi,
I read that the SPI SCK cant run too fast. I'm not sure if this is true, but I set the Program to
INT OSC 8MHz
osccon = %01110010
SSPCON1 = %0010000

and got this:

C.
 

Attachments

#3
Hi,
I read that the SPI SCK cant run too fast. I'm not sure if this is true, but I set the Program to
INT OSC 8MHz
osccon = %01110010
SSPCON1 = %0010000

and got this:

C.
Oshonsoft uses software SPI.
No use for SSPCON1 = ...
It might interfere with software SPI?
 

camerart

Active Member
Thread starter #6
Hi,
I've now got the SPI SCK working.
(I've also got a program like a bag on knitting, so I won't post it:)
Thanks.
C.
 
Thread starter #7
Hi,
I spoke too soon, regarding getting the SPI SCK working, as it was working up to a certain point.

After much analysing, it turns out to be the second PIC on the same PCB, sending a tick, which stopped the SCL. I've turned off the second PIC for now, then I'll investigate later.

Thanks, C.
 

Latest threads

EE World Online Articles

Loading

 
Top