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,
Since starting this post I have bought this type, so this is what I'm working on at the moment.
C.
 

Attachments

  • 8 PIN 5110 LCD.jpg
    8 PIN 5110 LCD.jpg
    11.4 KB · Views: 296
hi C,
Moved to correct Thread
E
 
Last edited:
Hi E, and J,
In my program I have SPI commented out.
On one of the programs, I am following from Chris Holden, even though he used Oshonsoft for writing the program he didn't use SPI in this case as he is moving from Oshonsoft and used 'bit banging' (whatever that is) so that he can migrate to a different system.
See attached program: This works in Oshonsoft, although it is a bit advanced for me at the moment. I would like to simply make a mark on the screen, to get started.
(Eric suggested using ADDRESS 0x01 as a test)
C.
 

Attachments

  • 5110 program no SPI.txt
    18.8 KB · Views: 295
  • A05.gif
    A05.gif
    39.5 KB · Views: 298
Last edited:
Hi,
Here's a program with settings as the #64 video. Also a Data analyser reading, showing everything that was recorded.
I also checked the MISO on an oscilloscope, and even though I can't record it easily, I could see a weak reading approx 1/2V, probably what shows on the Analyser.

There were some comments on the other SPI thread, (A program with READ in it) but it was established that there is no MOSI, so does this attached program follow the suggestions.

If the Oshonsoft SPI doesn't work in this way, 'Bit banging' has been suggested also. Is this a good idea?
EDIT:Above I wrote MISO, it should read MOSI.
C.
 

Attachments

  • 081017 0830.txt
    2.7 KB · Views: 361
  • LOGIC 18lf2520 8MHz INT 5110 SPI 081017 0830.jpg
    LOGIC 18lf2520 8MHz INT 5110 SPI 081017 0830.jpg
    59 KB · Views: 310
Last edited:

Attachments

  • SPI5510a.bas
    2 KB · Views: 292
Last edited:
hi,
The 5110 SPI is Write Only.
The PIC is the Master and the 5110 is the Slave.

Master Out Slave In = MOSI
Master In Slave Out = MISO

So at PIC the MOSI pin has the Data input to the 5110

NOTE: some 5110 do not come with all the resistors fitted.
4 * 10k and 2 * 1k
https://www.amazon.co.uk/LCD-Module...r=8-1&keywords=nokia+5110+lcd#customerReviews

https://www.microchip.com/forums/m148739.aspx
E


EDIT:
You could simplify your program ref SPI5510a.bas

Hi E,
Can you remind me about the simplified method later please, I would have difficulty changing for a while.
Attached shows the digital protocol. Is the MOSI pulled up or down? The analyser appears to show '0' at MOSI. Is it the 2x1K resistors for this? (and which other 1)
EDIT: Just tried the MOSI PIN (at the 5110 input) to check the connection, with a slow ON/OFF it shows ok on the oscilloscope.
C.
 

Attachments

  • MOSI '0'.jpg
    MOSI '0'.jpg
    68.1 KB · Views: 287
Last edited:
Hi,
I tried a previous program with the longer version of SPI (I substituted the SPI settings) , here's an analyser read out showing MOSI working. ????
C.
EDIT: Channel 2 is connected to the C/D PIN on the module. As it shows the same movement as the MOSI PIN it may be some sort of echo?
 

Attachments

  • SPI TEST.jpg
    SPI TEST.jpg
    70.8 KB · Views: 291
  • 091017 SPI test.bas
    21.9 KB · Views: 295
Last edited:
Hi,
Is there's any possibility it could be a problem that I am using 18LF2520 and Oshonsoft only supports 18F2520?
C.
EDIT: Eric, Just tried your program @ #86, again no signs of life!
I'm modifying an old circuit with an 18F2420 which Oshonsoft supports, to see if there's any difference.
 
Last edited:
hi C,
As you know, I would like to help you solve the SPI problem, but you are making it almost impossible by posting programs which are so over complicated.

If I post a cut down diagnostic Basic SPI program for the 5110 only, will you try it and advise what you see.??

Eric
 
hi C,
As you know, I would like to help you solve the SPI problem, but you are making it almost impossible by posting programs which are so over complicated.

If I post a cut down diagnostic Basic SPI program for the 5110 only, will you try it and advise what you see.??

Eric
Hi Eric,
I edited my last post #71 with the results of your cut down program, just as you were posting.
I appreciate your help of course, but I am limited in my skills, and have to print everything out and comment it so I can follow, so big changes take me longer time to digest. Sorry.
C.
 
hi C,
Program the 18LF2520 with this simple program.
Connect the 5110 to the PIC pins as per the program [ no changes made ] but note that Oshonsoft SDO means MOSI .
The LCD should display all pixels.
The image shows that the correct data is being sent from the PIC when simulated.
E
A001.gif
 

Attachments

  • SPI5510b.bas
    2 KB · Views: 312
I appreciate your help of course, but I am limited in my skills, and have to print everything out and comment it so I can follow, so big changes take me longer time to digest. Sorry.

hi C,
This is my point, it is easier and more effective to solve a projects problems in a separate diagnostic program, rather mixing it into the main program.
Once you have debugged the program fragment and it drives the hardware, then you can start adding comments to that fragment and copy/paste into the main aprt.
E
 
hi C,
Program the 18LF2520 with this simple program.
Connect the 5110 to the PIC pins as per the program [ no changes made ] but note that Oshonsoft SDO means MOSI .
The LCD should display all pixels.
The image shows that the correct data is being sent from the PIC when simulated.
E
View attachment 108505
Hi E,
Same result, nothing shows.
I'll try again tomorrow and test it with the Analyser, and post the result.
EDIT: I understand that PIC SDO-----------MODULE SDI = MOSI
C.
 
Last edited:
hi C,
OK,
Post your images of the SPI signals.
I guess you have the backlite, lit on the 5110.?
Any chance of a clear photo image of the PIC to 5110, showing the wiring.
E
 
I asked just in case his Contrast setting was too low for viewing in ambient light levels, having the back lite On, should just show the pixels, if they are present.
 
Hi,
Is there's any possibility it could be a problem that I am using 18LF2520 and Oshonsoft only supports 18F2520?
C.
No, they are identical from programming point of view.
Check the wiring between pic and lcd.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top