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.

PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.
hi C,
I have no plans for graphics with the 5110.
Look at this latest Font, 8 characters/row, 3 rows Basic.
Shows the time format also N and E coords.
I have made those %0000 port A changes, just them.

E
Hi E,
The font is nice and clear. I can do any tedious stuff font wise if you want.
Did you notice the GPS module I ordered has RX TX for normal connections? As mentioned, I'm sure it could be wired differently for SPI.
C.
 
Why would you want to wire it for SPI?, and why would you imagine it has that capability - it's far easier to use simple serial with it.

Just to 'cast a spanner' in the works, have you considered the small colour display - which claims to be a 5110 'replacement', but that's only in the connections, the software is entirely different. I've got these running nicely from a 24F.

**broken link removed**
 
hi C,
I have no plans for graphics with the 5110.
Look at this latest Font, 8 characters/row, 3 rows Basic.
Shows the time format also N and E coords.
I have made those %0000 port A changes, just them.

E
Hi E,
The font is nice and clear. I can do any tedious stuff font wise if you want.
Did you notice the GPS module I ordered has RX TX for normal connections? As mentioned, I'm sure it could be wired differently for SPI.
C.
Why would you want to wire it for SPI?, and why would you imagine it has that capability - it's far easier to use simple serial with it.

Just to 'cast a spanner' in the works, have you considered the small colour display - which claims to be a 5110 'replacement', but that's only in the connections, the software is entirely different. I've got these running nicely from a 24F.

**broken link removed**
Hi N,
I had to choose a standard for all modules. I have another project that could be attached to this one from another thread which only has SPI, so this is why I chose it. I have been looking onto it, and it appears that SPI is faster than i2c, apart from that, this project has gone too far to start again with a different protocol.

The module chosen is 5 times cheaper than the one you posted, and it's working fine :)
C.
 
I had to choose a standard for all modules.

Why cripple your projects? - use whatever is best at the time.

I have another project that could be attached to this one from another thread which only has SPI, so this is why I chose it. I have been looking onto it, and it appears that SPI is faster than i2c, apart from that, this project has gone too far to start again with a different protocol.

Who mentioned I2C?, I2C can be slower than SPI, but it has many advantages over it as well - and for running a small low resolution mono display either is more than fast enough, in fact I've taken to using the slow software SPI on my 5510's because there's no advantage using the far faster hardware.

GPS modules are simply serial ports, and you connect it to the PIC serial port (or any I/O if you use software serial) - it's hardly a 'protocol' :D

The module chosen is 5 times cheaper than the one you posted, and it's working fine :)
C.

The one I posted is in colour though, and has greater resolution - just in case you had greater ambitions.
 
hi C,
This is the latest font , as per the last image posted.
Place the this font1.bas [ which has the normal and big fonts] in the same folder as this Cam5110_V4.
You see the N and E as shown in the last image.
E
 

Attachments

  • Cam5110_V4.bas
    7 KB · Views: 249
  • font1.bas
    9.9 KB · Views: 220
Why cripple your projects? - use whatever is best at the time.



Who mentioned I2C?, I2C can be slower than SPI, but it has many advantages over it as well - and for running a small low resolution mono display either is more than fast enough, in fact I've taken to using the slow software SPI on my 5510's because there's no advantage using the far faster hardware.

GPS modules are simply serial ports, and you connect it to the PIC serial port (or any I/O if you use software serial) - it's hardly a 'protocol' :D



The one I posted is in colour though, and has greater resolution - just in case you had greater ambitions.
Hi N,
I sometimes us the incorrect words i,e, protocol.
So far all of the modules can be communicated with by SPI. (Barometer, GPS, compass and SX1278 from another project) Some also have serial as well, but at the moment the program Eric is writing is neat and for me not too difficult to read. For some of us not so expert programmers a short tidy program can be followed and even used a learning lesson. I bow to Eric's skills whether he chooses to use different addressing methods.

I try not to be too ambitious e,g, using better LCDs, but for simple text output the 5110 is looking fine. Of course if anyone writes an Oshonsoft program using better LCDs with graphics, I would be over the moon.
C.
 
hi C,
This is the latest font , as per the last image posted.
Place the this font1.bas [ which has the normal and big fonts] in the same folder as this Cam5110_V4.
You see the N and E as shown in the last image.
E
Hi E,
N and E now showing, well squashed.
E.
 
hi C,
You should see 4 unused pixels on the right hand side of the LCD, if needed you could expand the NESW big fonts at the ends of the row.

My 3 off 5110 LCD's have just arrived, one of the 3 does not work.!
Also the pin out is different and the lite is a pull up to 3.3v.

I have noticed before when ordering a small quantity of an item online, from overseas, one or more are faulty.
I suppose its one way of keeping their prices down.!!!

E

Let me know if you have further problems on this project, I will try to help.
 
hi C,
You should see 4 unused pixels on the right hand side of the LCD, if needed you could expand the NESW big fonts at the ends of the row.

My 3 off 5110 LCD's have just arrived, one of the 3 does not work.!
Also the pin out is different and the lite is a pull up to 3.3v.

I have noticed before when ordering a small quantity of an item online, from overseas, one or more are faulty.
I suppose its one way of keeping their prices down.!!!

E

Let me know if you have further problems on this project, I will try to help.
Hi E,
I see the missing pixels. I'm looking forward to playing with the fonts once I get chance.

I've seen where the rubber screen connections need pressing, try that first. Also they prefer 3.3V. I think they work with 5V, but may 'tire' easily. I've also got some on order, and they have white screens. I bought them on Ebay, with good reviews. In the past I've had new replacements sent, but that's unusual.

I'm ordering modules and components, and designing a new surface mount circuit, that I will etch, so a little time before I get to play. I'm experimenting with the image transfer process for making PCBs, which is two plates lined with silicon, where the PCB is sandwiched between the plates, then heated for the transfer, then etched.
Thanks for your efforts, I'm sure it will be popular.
C.
 
hi C,
You should see 4 unused pixels on the right hand side of the LCD, if needed you could expand the NESW big fonts at the ends of the row.

My 3 off 5110 LCD's have just arrived, one of the 3 does not work.!
Also the pin out is different and the lite is a pull up to 3.3v.

As I mentioned earlier in this thread, there are at least two different types, with different pic connections, and different LED 'polarity'. The 'pullup to 3.3V' one that you've got is the 'best', as it's pin compatible with the ST7735 colour modules (128x128 and 128x160) and also the IL1934x series of modules.

As Camerart suggested, make sure the LCD is correctly aligned with the rubber connections, they seem rather flimsy - I soldered the metal mountings on some of mine as they tended to slide off the PCB.
 
I found, that Oshonsoft actually can do binary to ascii conversion, so the program can be simplified a little bit.

An example:

Dim i As Word
Dim j As Single
Dim a As String
Dim b As String
Dim e As String
Define SINGLE_DECIMAL_PLACES = 2

i = 987
a = #i
j = 12345.87
b = #j
e = "AD0=" + #i +" mV"
End

From Watch variables window in simulator:

i (0x056) = 987
j (0x058) = 12345.870
a (0x06D) = "987"
b (0x0A0) = "12345.87"
e (0x05C) = "AD0=987 mV"
 
Morning Nigel,
I have no practical application for the 5110 at this time, I was just helping out camerart with his project.
I agree the 5110 has a very limited specification, I would not use it on any new projects, considering the lowish prices of a colour displays.

Already ordered some colour displays for testing.
The colour displays are for interest and mental stimulation only, as they say 'use it or lose it';)

Eric
 

Attachments

  • A02.gif
    A02.gif
    55.9 KB · Views: 214
hi jjw,
Could use please explain how the program in post #141 can be used in a practical program to carry out Binary to ASCII conversions.

Eric
 
hi jjw,
Could use please explain how the program in post #141 can be used in a practical program to carry out Binary to ASCII conversions.

Eric
For example in the demo counter:
_____

b2aval = tot
Gosub bin2asc
msg1 = ""
msg1 = Chr(ascbfr4) + Chr(ascbfr3) + Chr(ascbfr2) + Chr(ascbfr1) + Chr(ascbfr0)
Call wr_msg_big(0, 4, msg1)
-------
Change to:

msg1 = #tot
Call wr_msg_big(0,4,msg1)
 
hi jjw,
I see what you are saying regarding a simple unformatted number/value, by using the inbuilt '#' prefix, but the advantage of the bin2asc subr is that enables the programmer to insert decimal points, or any other ASCII characters into the Ascbfr(array] string, prior to outputting the ASCII string.

E
 
Ok.
Anyway decimal point can be handled easily by using floating point numbers and any string can be added before and after #some number.
For example:
msg1= " Voltage= " + #advalue + " V"
 
Problem with that, is the Oshonsoft FP is an optional add on which has to be paid for, many Oshonsoft users still do not have the FP option.

The bin2asc subr was written about 10 years ago, before Oshonsoft had FP.

I know that a msg can have ASCII characters added before and after, but without the FP option is it not easy to insert ASCII chars into a string.
 
Just to let you know, I've got the 5110 working again with my 16F1827 - I 'cheated' and used software SPI instead of hardware :D

To be fair, it doesn't really matter on the 5110, as it's a slow device and doesn't need much data transferring - but I now need to find out what I've done wrong with the hardware settings.

As I don't use Oshonsoft I've not been looking at the code posted here, but are you using a screen buffer and writing to that, then copying the buffer to the screen?. This is the preferred method, as it allows you to draw lines etc. something difficult otherwise with a read only display.
 
hi Nigel,
Not using a screen image/buffer, it is a character by character write to the screen,
The write procedure gets each character in turn from a string message, writes that to the screen then gets the next character in the string message.
The procedure uses two leading parameters that prefix the string , Row and Column numbers.

It sounds slow but writing a full screen of the normal or big characters, appears almost instantaneous. PIC internal clock at 8MHz

'examples of messages
msg1 = menu1 'assign menu string to msg1 string
Call wr_msg(0, 0, msg1) ' row=0 col =0

'writes the msg To the lcd at xp [column] And yp [row]
Proc wr_msg(xp As Byte, yp As Byte, msg1 As String)

lcd_mode = 0 'command
xp = xp * 6
xp = 0x80 Or xp
yp = 0x40 Or yp
SPICSOn
SPISend xp
SPISend yp
SPICSOff

lcd_mode = 1 'data
y = Len(msg1)
For x = 1 To y
ascval = MidStr(msg1, x, 1)
Gosub chr2lcd 'in font1.bas
Next x

End Proc

E
 
Just to let you know, I've got the 5110 working again with my 16F1827 - I 'cheated' and used software SPI instead of hardware :D
.......

To be fair, it doesn't really matter on the 5110, as it's a slow device and doesn't need much data transferring - but I now need to find out what I've done wrong with the hardware settings.

.......
Is it slow?
From its controllers PCD8544 spec:
Max dataspeed is 4Mbits/s
Max framerate 67Hz.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top