Converting Nokia 5110 SW CODE to HW CODE in Oshonsoft

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I have a program for Nokia 5110 screens written in Oshonsoft BASIC, and using it's SW to WRITE to it. [18F46K20 8MHz XTL 5110 HC12 090722 1500 and fontsml ]

I also have a program written in Oshonsoft, but using HW CODE (SSPBUF). The HW program is too large to post.

I need to integrate the 5110 CODE into the HW program. For me this is a bit too difficult, as I don't know where to start. I think the SW program needs to be converted first, then I can integrate.

Can someone give me clues how to approach this change please.
Camerart.
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
Using the LINK CODE in #2, the screen shows 1/2 BYTE along a line, then scrolls round clears the first 1/2 BYTE line, and replaces it with the bottom 1/2 BYTE like this:

In the CODE, there seems to be bits missing, e,g, (sc), (cmd) (data), is this true?
C
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
I can see that there are a lot of SPI lines of SW CODE, which somehow have to be changed to the HW SSPBUF method. Gulp!
So I've reverted to working on the CODE and fontsml in #1, it looks like it's most suitable as it has a FONT.
C
 

ericgibbs

Joined Jan 29, 2010
18,766
hi C,
The Manual states:

(1) can be changed by setting SPICLOCK_STRETCH parameter.

SPIPrepare,SPICSOn,SPICSOff,SPISend,SPIReceive,SPISendBits,
SPIPREPARE statement (no arguments) will prepare interface lines for SPI communication. SPICSON and SPICSOFF statements will enable/ disable the ChipSelect line of the interface.

@camerart

Hi C,
You must have SPIPrepare statement in the program if you intend using SPICSON and SPICSOFF
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
hi C,
The Manual states:

(1) can be changed by setting SPICLOCK_STRETCH parameter.

SPIPrepare,SPICSOn,SPICSOff,SPISend,SPIReceive,SPISendBits,
SPIPREPARE statement (no arguments) will prepare interface lines for SPI communication. SPICSON and SPICSOFF statements will enable/ disable the ChipSelect line of the interface.

@camerart

Hi C,
You must have SPIPrepare statement in the program if you intend using SPICSON and SPICSOFF
Hi E,
I'm trying to write HW, and as SPIPREPARE, SPICSON etc are all software, I've removed them. I now need to replace them with a HW version.
NOTE: the PIC is in MASTER MODE
EDIT: I now see that I was duplicating the 5110 screen chip select, by using both LCD_CS and SPICSON.
Thanks.
C.
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
Update:
I followed the link in #2 to ETO, and 'I' updated his CODE for me, and after a bit of blind twidling, I got it to show this:
Cheers, C.
 

Attachments

Top