PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.

On some of mine I've soldered the twisted tabs to make then firmer.
 
Hi E,
What is the difference between hardware SPI and the software version.
On the PCB is onboard programming, I can change the program in Oshonsoft, then change the program on the PCB quite easily.

Well done on the 9225 2.2 inch TFT, it's a bit advanced for me at the moment, I'm still trying to understand how your 5110 program works. Just printed it out so I can do that.

On the PCB is provision for a XTL, so I can add one later.

I look forward to the video.

C.
 
Hi Eric,
Am I correct that all of the BIG letters aren't in the latest font1? If so I can fill them in.
I found that if a gap is left at the end of a message, between the last digit and ", then the text clears the screen.
C.
 
Hi Eric,
Am I correct that all of the BIG letters aren't in the latest font1? If so I can fill them in.
I found that if a gap is left at the end of a message, between the last digit and ", then the text clears the screen.
C.

hi C,
I built the big fonts only for a few characters for the demo.
You will need to add the rest.
I found that if a gap is left at the end of a message, between the last digit and ", then the text clears the screen.

That is another bug in the Oshonsoft.
Also when using MidStr, start at number 1,.
To avoid having more than one Font Table I use a simple routine to increase the Font size being displayed.
E

Clip from the 9225 program you could use a similar method in your LCD. [remove the color coding]

'direct write of text to lcd, Rem; set Font size
Proc msg2lcd(x0 As Word, y0 As Word, msg1 As String, color As Word, bg As Word)
'size 0=33 , 1= 17, 2 = 11, 3 = 8, 4 = 7, 5 = 6 chars/line
sx = x0
sy = y0
str_len = Len(msg1) 'num chrs in message
strbit_len = str_len * 6 'num of font bytes to read
lcd_mode = 1 'data

For wr_chr = 1 To str_len 'select char for display
ascval = MidStr(msg1, wr_chr, 1)
Gosub chr2tft 'get array bytes from font table

For fnt1 = 0 To 5 ''strbit_len
font_bit = ary(fnt1) 'get all bytes in chr font sequence

For xrpt = 0 To size 'font size
sy = y0
For bit_cnt = 7 To 0 Step -1
If font_bit.bit_cnt = 1 Then
For yrpt = 0 To size
Call setpixel(sx, sy, color)
sy = sy + 1
Next yrpt
Else
For yrpt = 0 To size
Call setpixel(sx, sy, bg)
sy = sy + 1
Next yrpt
Endif
Next bit_cnt
sx = sx + 1
Next xrpt
Next fnt1
Next wr_chr
ss = 1
End Proc
 
Hi E,
Ok, I'll add the other large digits.

I'll add some modules to the PCB and see what I need in regard to fonts etc, before getting more into it.

I've copied the 9225 clip, and see what I can make of it.

Thanks,

C.
 
Hi,
Previously I mentioned the screen contrast changing. I tried squeezing the screen and twisting the tabs at the rear, which helped for a while. Today it failed again, so I soldered the tags, so now the screen is tight, but the black square still shows sometimes.
I wonder if it's a good idea to clean the contact strip. Has anyone tried it.
C
 
hi C,
I would only try that if there is no alternative if the LCD is unusable
Do you want me to send you a spare 5110 LCD.?
E
 
hi C,
I would only try that if there is no alternative if the LCD is unusable
Do you want me to send you a spare 5110 LCD.?
E
Hi E,
Thanks for the offer, but I have a pile of screens.
Do you have a suggestion for cleaning? I have all sorts of chemicals here, including: EDIT isopropanol alcohol.
C.
 
Last edited:
I have tried a few times to clean the zebra strip and reattach the screen, but was never more than partly successful. A little distilled water with a tiny bit of surfactant (liquid detergent or PVA) might help -- like used to attach cut vinyl designs to a surface. But, I would not be optimistic.
 
Hi J,
I was perhaps mixing up PVA with Isopropol alcohol, I'm not sure what the difference is. I've seen reference to cleaning with I-alcohol. I'll give it a go and report back.
C.
 
Hi,
Here is the FONT1 with the missing BIG letters added.
C
 

Attachments

  • font1.txt
    19 KB · Views: 280
  • E.jpg
    194.7 KB · Views: 276
Hi E,
I'm now looking at the 18LF4520 5110 program more closely, so that I understand it. Before I go too far, should I carry on with the original program or try to add the #205 section and use that method, before going any farther?
C.
 
hi C,
I would prove the program using your original listing, then use the modified code, compare speed and memory usage etc.

E
 
Hi,
I'm trying out a MENU. Does this look ok?
Hold the button for MENU choice, while it counts.
A few missing pixels added on font1
Note: In SIM the button should be pulled up, as the circuit.
C
 

Attachments

  • 18f4520 8MHz 5110 SPI 211217 MENU.txt
    9.2 KB · Views: 288
  • font1.txt
    19.1 KB · Views: 280
hi C,
Limit the menu cntr to the max number of menu's, then restart at 0.
You have made a Comment on your listing.
E
 
Hi,
I've added a section of a previous program with GPS, but it has the 4x20 LCD screen, so doesn't show on the 5110, although it does compile.
I'm now trying to convert it.
Here is the combined program. As usual, watch out for errors where I cut and pasted two programs into one.
There are 3x added sections marked by ###############
There are 2x lines marked with ???????????????????? that don't look right.
C
 

Attachments

  • 18f4520 8MHz 5110 NEO8 241217.txt
    11 KB · Views: 288
Morning C,
Clip from 18F d/s UART section. page #213.
Explains in the footnote the RCSTA.OERR error sequence.

The 0x0a is the Line Feed code at the end of the RXD msg string, typically 0x0d, 0x0a [ Crlf]
Remember that the Oshonsoft Sim does not add Crlf coding when using the Sim Uart to send a test msg string, so we temporarily used a '?' as a substitute for the Lf 0x0a, ONLY while running in simulation.
The 0x0a detect must be used in an actual PIC code.

E
 

Attachments

  • A001.gif
    27 KB · Views: 267
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…