Continue to Site

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.

  • 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.

Status
Not open for further replies.

camerart

Well-Known Member
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

  • Parallel.jpg
    Parallel.jpg
    194.5 KB · Views: 338
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

  • SCK.jpg
    SCK.jpg
    197.6 KB · Views: 345
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?
 
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.
 
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top