18F4620 SPI SCK not working properly Oshonsoft.

Thread Starter

camerart

Joined Feb 25, 2013
2,082
Hi,
I've been programming modules e,g, GPS Compass etc, on 18LF4520 PIC. They all work but need more work.

I now use 18F4620 PCB which has enough memory to put all of the modules on. My method is a cut and paste, which I'm sure isn't proper programming, but that's the best I can do.

Here is the latest program, which need me to sort out:

Attached image showing the SPI SCK working to a point, then stopping. It stops around the CALL_CLEAR() section of the program, and this is what I'm trying to get working.

Camerart.
 

Attachments

ericgibbs

Joined Jan 29, 2010
10,464
hi C,
Line # 357
Gosub rst_lcd '5110 states very early RESET is important

'Reset the lcd
rst_lcd:
lcd_reset = 1
WaitMs 10
lcd_reset = 0
WaitMs 10
lcd_reset = 1
???????????????????????????
end of Code Listing !!!!

RETURN ' required

E

Update:
Return added
Programs appears to run OK.

AA1 09-Dec-18 12.47.gif
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
2,082
hi C,
Line # 357
Gosub rst_lcd '5110 states very early RESET is important

'Reset the lcd
rst_lcd:
lcd_reset = 1
WaitMs 10
lcd_reset = 0
WaitMs 10
lcd_reset = 1
???????????????????????????
end of Code Listing !!!!

RETURN ' required

E

Update:
Return added
Programs appears to run OK.

View attachment 165408
Hi E,
The RETURN is there in the program, but I missed it when I copied and pasted. OOoopps.

Note: I've just remembered that get_neo has been superceded, and will change it.
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
2,082
Hi,
Looking at the image in #1 notably the green ring, is it coincidence that the SPI SCK stops at that MOSI tick? I don't know what's causing that tick.
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
2,082
Hi,
I've found the problem, hurrah :)
On the latest PCB are two PICs, I'm working on the main one, but the second one is connected, and sent the tick, that can be seen in LOGIC image #1 green ring, which is somehow stopping the SPI from working. I've now switched it off while I carry on programming the main PIC.
Cheers, C.
 
Top