Serial LCD Controller

LCD Types support!!

Hi Curtis Brooks!!

I guess that the current code revision is Rev21 (SerialLCD_REV21.bas)!! Isn’t it for the 4X20 LCD!! I see the description in the code saying “4X20”!! Please advice!!

Thanks for helping me!! Will there be any change in hardware (like power-on straps)!! to select the LCD type!! Please advice!!

Can you please let me know when I can have the code!!

Thanks and Regards,

elektor_1234

I’ve uploaded the project
I’ve uploaded the project files as promised. Currently, I had to create separate files for 4x20 and 16x2. I could not squeeze options in the current files to make the LCD type selectable. I can do that but, I’d have to remove some functionality. So, I will be swapping the code over to a 16F88 which has more code space. That way the LCD type can be changed and stored in EEPROM. I will also redesign the PCB to accept single pin and dual row LCDs. Do let me know how this works out for you and if you have any questions. All I ask is if you change something please post it for others to use/learn.

LCD Types support!!

Hi Curtis Brooks!!

Thank you very much for this!!

I’ll test them out with my hardware and let you know the results shortly!!

Certainly!! I’ll post if I’ve done any changes!!

Thanks and Regards,

elektor_1234

Great project!Very

Great project!

Very professional and useful!

Wired the circuit!!

Hi Curtis Brooks!!

You’re project is amazing!! It works great!! :slight_smile:

As promised!! I’ve wired your circuit and it works fine for the 16X2 LCD!! But!! there is one thing that I do not understand!!

The reason I built this is to integrate the Serial LCD with another project which is a GPS Module and a microcontroller!! This is as in the link below!!

http://www.highonsolder.com/blog/category/gps

Please see the topic “GPS Receiver”!! I’m using the same GPS module as in the link above!! The code is written in BASIC only!! It can be compiled with PIC Basic PRO 2.47!!

Please see the code in the above link “http://www.highonsolder.com/storage/code/GPS3.BAS” (Final GPS PicBasic Code)

I’m getting the data past the 16F84A microcontroller!! I’m able to see that in my PC’s hyperterminal!! But!! the same is not printed in the Serial LCD properly!! The term “Searching for Satellites…” is no getting printed once!! It keeps overwriting on both the lines!! The above link uses a different LCD from Parallax which uses a Basic Stamp as a piggy back board!!

I’m not really sure as to why this is happening!! Is something in an endless for loop!! Please advice!!

Can you please help me out on this!! If there is anything to be done on the BASIC code in the above link!! Please advice!!

I can post a Video if you want !! Let me know!!

Thanks and Regards,

elektor_1234

LCD.jpg

A couple questions:1. How

A couple questions:

1. How are you connecting the GPS device to the LCD controller?

2. Is the GPS device connected to its own PIC and you are sending serial strings from that to the LCD controller?

3. If you are connecting as described in step 2, did you set the LCD controller jumper to "/I"? That means you will send data to the LCD controller non-inverted. When the controller is connected to the PC data gets sent to it inverted so, the jumper has to be set to "I".

Answer those questions for me and I believe I can help you out. Posting a link to a video of what you described above would help a bit also. Your controller layout looks great also.

Also, if you are attempting

Also, if you are attempting to use that GPS code to output to the LCD controller as written, it will not work as the commands in the PicBasic code are different from what out controller is expecting. In the zip file above I included a document that explained how to use the commands the controller expects. I wrote it for a 4-line LCD but, the concept is the same.

Let me knock around with the GPS code you posted and see what I can do to help. I’ll post when working.

There is a PIC16F84A microcontroller inbetween!!

Hi Curtis Brooks!!

Thanks!!

There is a PIC16F84A microcontroller inbetween the Parallax GPS Module and the Serial LCD (your design)!!

The I/O data from the GPS Module is sent to the microcontroller which requests the required data from the module and it receives the data parses and displays it onto the Serial LCD!! This is as in the link "http://www.highonsolder.com/blog/category/gps"

Please see the schematics in the link http://filer.case.edu/jec24/uploaded_images/GPS-Schematic-759995.jpeg

You can also get the BASIC code from the link in my previous post!! Please advice!!

Thanks and Regards,

elektor_1234

Answers!!

Hi Curtis Brooks!!

Please see my answers below!! Please advice!!

1.) The GPS Module has a Serial IO pin!! through which we can send commands to the Module requesting for the required data!! which we can be received in the same IO pin!! The datasheet for the module : http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/GPSManualV1.1.pdf

The data from the microcontroller is parsed and sent to the Serial LCD at a Baud Rate of 9600 as per the below link

http://www.highonsolder.com/blog/category/gps

I’ve mentioned the link of the schematics diagram in my earlier post which I had posted some minutes back!!

2.) The GPS Module as such has an on-board microcontroller Basic Stamp!! Apart from that!! there is another external PIC16F84A to parse the data and send it to a Serial LCD!! The External Microcontroller is programmed with http://www.highonsolder.com/storage/code/GPS3.BAS

3.) Yes!! I’ve bypassed the transistor inverter!! and connected the output of the PIC16F84A to the input of the Serial LCD!! such that the Serial LCD receives only non-inverted data!!

Please do let me know if there is any shortcoming or deficit in my answers!!

I’m attaching a video of the LCD text scrolling “Searching for Satellites…”!! The video is only a 3GP!! from a mobile phone!! I’ve changed the extension of the file to .avi (LCD_GPS.avi) as it would’nt allow me to upload a 3GP format!! The quality is not that good!! I’ve not connected the GPS Module as it captured the video inside my home!! Please let me know if it is OK!! or else I’ll shoot it with a digital Camera!!

LCD_GPS.avi|x

Once all the hardware gets fixed!! I’ll make a PCB and post it as a complete GPS Module!!

Can you please help me to modify the codes!! Please advice!!

You’re help is very much appreciated :slight_smile:

Thanks and Regards,

elektor_1234

I believe I see where the
I believe I see where the error lies. The GPS code that is being loaded into the PIC16F84A needs to be modified to be compatible with the command set that our LCD controller expects. There’s some other changes that I would recommend to change also. I’m throwing a recommended change together to get you going. I don’t have a Parallax GPS receiver but, I do understand the commands from the datasheets. I’ll get something together for you. Give me a little bit to whip it up.

Believe I got it working

I believe I have it all worked out. The fix was two fold with the first being a lot of changes to the original GPS code you posted to align with the LCD controller command set. The second I have to thank you for as it helped to expose a small flaw in the controller schematic. If you look at the schematic closer than I apparently did, you would notice that when you set the jumper to non-inverted so you can connect to a microcontroller for serial control it will not work. The reason is in the way I designed the circuit for both inverted/non-inverted RS232 control. Looking at the transistor in the circuit, the collector is held high through a 10K resistor. The collector feeds to the Rx pin on the PIC. When you set the jumper to non-inverted and attempt to send data to the PIC it won’t work because the line is always tied high through R8 to 5V.

There is a fix and I have included it in the archive file below. There are two ways to do this:

1. If your board is already built and your intentions are to only use this LCD in a finished design and not attached to the computer then, snip the connection from R8 to 5V and the controller will only work in the non-inverted configuration.

2. Look at the included schematic in the archive and add the shown J2 jumper to your design which will allow you to select between the two types of communication.

GPS PicBasic Pro code and schematic

My intentions are to redesign the controller a bit and this is a good catch before I made the mistake again.

I believe the mistake went unnoticed because I original wrote the code with MBasic from Basic Micro and the controller worked as expected.

 

Test the code out and let me know if it works for you. Be sure to make the changes I suggested above. Once I know it works as expected I’ll clean the code up a bit more and add some more goodies to the GPS routines. Again, I don’t have a Parallax GPS so, I can’t test with that. I sent some dummy strings to it and it worked for me.

I’ll check it out and let you know!!

Hi Curtis Brooks!!

Thanks for the updated schematics and code!! I’ll program the PIC and test it and let you know the results with pictures!!

Thanks and Regards,

elektor_1234

Just want to say this is a

Just want to say this is a wonderful project, Curtis.

You really have set the standard for how to document and share projects! Thanks!

 

GPS Results!!

Hi Curtis Brooks!!

I programmed the PIC16F84A with the code that you had posted!! Please see the results observed below!!

1.) The text scrolling stopped and the “Searching for Satellites…” and the “Error : GPS Receiver Module” Strings are now displayed properly!!

2.) I connected the GPS Module to the PIC16F84A’s designated I/O port pin!! and placed the GPS Module out in the open sky!! The GPS module got a lock-on to 3+ satellites and got a fix!! But!! I do not see the co-ordinates (Lat and Long) on the LCD!! Instead!! it displays the “Error : GPS Receiver Module” string!! Not Sure why!!

I’m not sure if the GPS module receives the commands from the microcontroller and responds back!! But!! the module is functioning well!!

Can you please help me on this!! Please advice!!

Thanks and Regards,

elektor_1234

**Thanks for the kind words. **

Thanks for the kind words. I believe that knowledge gained should be knowledge shared.

Now we’re getting
Now we’re getting somewhere. Let me take another look at the code again. I probably missed something.

New update!!

Hi Curtis Brooks!!

I have an update for you!!

I just tweaked the code a bit!! I removed the “SAT:” routine from the code that detects the number of satellites!! and now!! I see that the GPS module responds to the commands from the PIC16F84A!! Now!! I’m able to see the data on the LCD!! But!! Not sure how correct I am!!

The Latitute display is steady and showing up solid!!

But!! the Longitude gets updated!! and the display does not stay solid!! It keeps refreshing the second line of the LCD at constant intervals!! I’m not sure where to tweak for this in the code!! Please advice!!

I’m posting a video of my display for your reference!!

LCD_GPS_LINE2.avi|x

Can you please help me on the code for this!! with the "SAT:" routine present in the code!!

Thanks and Regards,

elektor_1234

I’m not able to view your
I’m not able to view your videos. Can you post them in a different format?

Can you try opening it with VLC Media Player!!

Hi Curtis Brooks!!

Can you please try to open with VLC player!! Let me know!! Please see the link below!!

 

LCD_GPS_LINE2.avi|x

Thanks and Regards,

elektor_1234

3GP format!!

Hi Curtis Brooks!!

The Videos are actually .3GP format!! I changed the extension to .AVI!! as .3GP upload was not allowed!! You can change the extension back to .3GP or view the .AVI with winamp!!

Thanks and Regards,

elektor_1234