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,
Try this program, added the character fonts you coded.
Displays a full screen of data for 2 secs. then deletes one line at a time and then repeats full screen
Let me know how it does, it works without any problems at my end.

E
 

Attachments

  • Cam5110_SPId.bas
    7.8 KB · Views: 328
hi C,
Try this program, added the character fonts you coded.
Displays a full screen of data for 2 secs. then deletes one line at a time and then repeats full screen
Let me know how it does, it works without any problems at my end.

E
Hi E,
Just set-up the 'old' 18F2420 for in circuit programming, and tried the #116 program.
Here's the result. Next, I'll try your #121
C.
 

Attachments

  • 5110.jpg
    5110.jpg
    316.4 KB · Views: 325
Hi E,
Just set-up the 'old' 18F2420 for in circuit programming, and tried the #116 program.
Here's the result. Next, I'll try your #121
C.
hi C,
Try this program, added the character fonts you coded.
Displays a full screen of data for 2 secs. then deletes one line at a time and then repeats full screen
Let me know how it does, it works without any problems at my end.

E
Hi E,
WOW, that's mighty fancy:) and working as you say. Thanks.
I'll have a better look at the program tomorrow.
C.
 
hi C,
Looking at your image #122, I would suggest you experiment with the lcd Contrast setting.
Improve the readability

E
Added some extra features also got the ADC displaying OK, will post the prog tomorrow
 
hi C,
This 5110 program has been cleaned up and the lcd fonts moved to fonts1.bas, this means the main program has an include "font1.bas"
Install the font1.bas in the same folder as the Cam5110 basic.

I have added some Procedures to make the msg control easier, also a simple ADC0 lcd display.
You need to have a pot input to ADC0 in, across +V and 0v, tweak the pot and the lcd display will show the voltage.

Enjoy, let me know if any bugs or additions you would like to see.

E
 

Attachments

  • Cam5110_SPIf.bas
    5.6 KB · Views: 336
  • font1.bas
    3.9 KB · Views: 306
hi C,
This 5110 program has been cleaned up and the lcd fonts moved to fonts1.bas, this means the main program has an include "font1.bas"
Install the font1.bas in the same folder as the Cam5110 basic.

I have added some Procedures to make the msg control easier, also a simple ADC0 lcd display.
You need to have a pot input to ADC0 in, across +V and 0v, tweak the pot and the lcd display will show the voltage.

Enjoy, let me know if any bugs or additions you would like to see.

E
Hi E,
All working, including the ADC0 POT. I'll need to read and play to see how it all works.
You ask if I would like any additions, I'll start a new thread as this one looks like it's working better than expected.
Thank.
C.
 
How big is the compiled code?
I have a couple of PIC12F638 and could make something with them, if the lcd code + some simple code fits in 2K.
 
hi jjw,
Clips from the Oshonsoft IDE [18F4520].
MS Explorer shows just under 14k bytes.

E
 

Attachments

  • A02.gif
    A02.gif
    11.6 KB · Views: 332
  • A04.gif
    A04.gif
    6.6 KB · Views: 307
  • A05.gif
    A05.gif
    5.4 KB · Views: 305
Hi Eric,
Just reading your program! Can you clear a couple of things up please?
1/ Below 'convert any binary' What does DP mean?
2/I have LEDS at RA1 and RA2, where you have TRISA = 0x2f, is %00101001 ok?
3/ For PINs setting, I like the more visual %00000000, where you use the HEX, or is there a reason, i,e your so familiar, that it's easy for you?
C.
 
Morning C,
You asked me before ref DP, its simply a decimal point.
As you know most of the projects we do, involve displaying maths results so a DP is essential.
The binary to ASCII convert, produces a numeric string in ascbfr4[MSD] down to ascbfr0 [LSD], so you have to decide where to place the DP in that string to give decimal places.

Ref the %xxxxxxxx versus 0xXX, no problem.

I have done a big numeric font for the 5110, that gives 3 lines of 7 big numbers.

E
 
Last edited:
Morning C,
You asked me before ref DP, its simply a decimal point.
As you know most of the projects we do, involve displaying maths results so a DP is essential.
The binary to ASCII convert, produces a numeric string in ascbfr4[MSD] down to ascbfr0 [LSD], so you have to decide where to place the DP in that string to give decimal places.

Ref the %xxxxxxxx versus 0xXX, no problem.

I have done a big numeric font for the 5110, that gives 3 lines of 7 big numbers.

E
Afternoon E,
"you asked me before" I don't doubt it! My memory for programming would fit on a stamp. I have to print out and colour in Programs with lots of comments. All none obvious stuff i,e 'OR' 'LEN' 'MIDSTR' etc I will have to find a previous note I'll have somewhere. That's ok! With your help, we usually get there.

%00000000, Good.

Regarding the big number font, it sounds good. Here's an image maker, I bumped into while looking up 5110 stuff, I've opened it but never tried it, perhaps it's interesting?

https://www.ablab.in/image2glcd-software/
C.
 
hi,
Let oldstr = "123456789"

LEN is the length of the String, so LEN(oldstr)= 9

MIDSTR is used to select a single character or a sequence of characters from a string.

Let oldstr = "123456789"

eg newstr = MIDSTR( oldstr, start from char number, number of chars)

So newstr =MIDSTR(oldtsr ,1, 1) would start at char #1 and get one char , so newstr= "1"
So newstr =MIDSTR(oldtsr ,2, 3) would start at char #2 and get 3 chars , so newstr= "234"
E
 
hi,
Let oldstr = "123456789"

LEN is the length of the String, so LEN(oldstr)= 9

MIDSTR is used to select a single character or a sequence of characters from a string.

Let oldstr = "123456789"

eg newstr = MIDSTR( oldstr, start from char number, number of chars)

So newstr =MIDSTR(oldtsr ,1, 1) would start at char #1 and get one char , so newstr= "1"
So newstr =MIDSTR(oldtsr ,2, 3) would start at char #2 and get 3 chars , so newstr= "234"
E
Hi E,
LEN's a bit clearer now, thanks. Just put it in a text then into my MODULES folder where I came across OPERANDS 'AND' 'NOT' and 'OR'

My son gave me his broken ZXSpectrum a week or so ago. I fixed it and had to play a while before remembering how to work it's quirky keyboard, so the ol' memory does come back if I play for a while.
C.
 
hi C,
Try this 5110 SPI program.
You need the ADC pot, it shows the big FONT numeric digits and nominal 1 second count on the bottom line.
Let me know how it goes.
E
Ignore the 'degrees' symbol it was just a try for GPS use later.
 

Attachments

  • Cam5110_V2.bas
    12.1 KB · Views: 333
hi C,
Try this 5110 SPI program.
You need the ADC pot, it shows the big FONT numeric digits and nominal 1 second count on the bottom line.
Let me know how it goes.
E
Ignore the 'degrees' symbol it was just a try for GPS use later.
Hi E,
All working as intended. I can actually read it now:)

Can you change 'TRISA = %00101001 'RA0=POT, RA1=YLED, RA2= RLED, 5=' please.
C.
 
Can you change 'TRISA = %00101001 'RA0=POT, RA1=YLED, RA2= RLED, 5=' please.
hi,
OK.
If we have to display time in hh:mm:ss format on the 5110 LCD, it means that the latest big font will need a little width shrink.
Currently its 7 chars/row, we need 8.

I'll do that later and post an upto date font list.

The link you posted is for a graphical display and is not really suitable for the 5110.

E
 
hi,
OK.
If we have to display time in hh:mm:ss format on the 5110 LCD, it means that the latest big font will need a little width shrink.
Currently its 7 chars/row, we need 8.

I'll do that later and post an upto date font list.

The link you posted is for a graphical display and is not really suitable for the 5110.

E
Hi E,
I'm guessing that there may be a number of 'FONTS' as ideas flow. In previous programs I used a MENU to choose different choices of i,e, camera shoot timings. There is a button at RC0, if pressed at start-up it could go through MENUs while flashing a LED, so a count of flashes would set the MENU choice. If this is any good for you.
Graphical display----OK.
C.
 
hi,
OK.
If we have to display time in hh:mm:ss format on the 5110 LCD, it means that the latest big font will need a little width shrink.
Currently its 7 chars/row, we need 8.

I'll do that later and post an upto date font list.

The link you posted is for a graphical display and is not really suitable for the 5110.

E
Is'nt 5110 graphical display.
With Oshonsoft Basic it is not easy to display big bitmaps on it, but for example displaying xy graphs, draw lines etc. is possible.
 
Is'nt 5110 graphical display.
With Oshonsoft Basic it is not easy to display big bitmaps on it, but for example displaying xy graphs, draw lines etc. is possible.
Hi E,
My 'Graphic---ok' reply was: OK, I understand that it isn't any good for this.

If someone want to play, I'd be interested to see their results, but Text is fine for most things.
C.
 
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

EDIT:
Shuffled the font a little to get the North/East ident.
lcd1.png
 

Attachments

  • Cam5110_V3a.bas
    12.4 KB · Views: 294
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top