Using LCD from Mechatronics Demo Board


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Copenhagen
    Posts
    7

    Default Using LCD from Mechatronics Demo Board

    Hi,
    I have a Microchip's Mechatronics Demo Board and I am trying to use on board LCD with PBP. In the PBP manual it says that: "If a 4-bit bus is used the top 4 LCD data bits must be connected to either the bottom 4 or top 4 bits of one port."
    Now the problem is that LCD is already pre-connected to the PIC and as it says in the data sheet fist 4 ports are COM0-COM3. So I took the board and it looks that COM0 is on pin RB4, COM1 is RB5, COM2 RA2, COM3 RD0. Is it possible to run this LCD in PBP with such connections? How should I set DEFINEs?
    Attached Images Attached Images  

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Michlis View Post
    Hi,
    I have a Microchip's Mechatronics Demo Board and I am trying to use on board LCD with PBP. In the PBP manual it says that: "If a 4-bit bus is used the top 4 LCD data bits must be connected to either the bottom 4 or top 4 bits of one port."
    Now the problem is that LCD is already pre-connected to the PIC and as it says in the data sheet fist 4 ports are COM0-COM3. So I took the board and it looks that COM0 is on pin RB4, COM1 is RB5, COM2 RA2, COM3 RD0. Is it possible to run this LCD in PBP with such connections? How should I set DEFINEs?
    It's possible to run that LCD with a PIC, just not with the LCDOUT commands.
    The LCDOUT commands used in PBP with the PICs are for LCDs with built-in Hitachi 44780 style controllers with a parallel interface.
    Judging from the connector, what you've got is probably a 'dumb' LCD. You'll most likely have to dig up the spec's for the LCD, write a program to handle the multiplexing, etc.etc.etc.
    If you want an LCD, it's a heck of a lot easier to get on eBay or wherever and just buy a 16x2 LCD from somewhere for $10.

  3. #3
    Join Date
    Apr 2007
    Location
    Copenhagen
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Judging from the connector, what you've got is probably a 'dumb' LCD. You'll most likely have to dig up the spec's for the LCD, write a program to handle the multiplexing, etc.etc.etc.
    I have found the datasheet here:
    http://www.varitronix.com/Product/LC...332-DP(R0).pdf
    but I don't understand the table at the end of it. I guess it's the most important part.

    Quote Originally Posted by skimask View Post
    If you want an LCD, it's a heck of a lot easier to get on eBay or wherever and just buy a 16x2 LCD from somewhere for $10.
    Ok, now I know that, but unfortunately I have to stick to this LCD.

    How should I write a PBP code to handle this LCD, what do I need to take care of, in which order?
    I'd be grateful for any hints.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Michlis View Post
    I have found the datasheet here:
    http://www.varitronix.com/Product/LC...332-DP(R0).pdf
    but I don't understand the table at the end of it. I guess it's the most important part.
    Basically, that table says that if you put power (whatever that power may be according to the datasheet) on pin #5 and a ground on COM1, then the 'RC' will show on the LCD.

    PBP will NOT drive this LCD thru it's built in commands. As I said before, this is a 'dumb' LCD.

    You're going to need 14 pins from a PIC to provide power to a segment, and 4 MOSFETs/transistors to apply a ground to a COMmon.
    Then you're going to have to write software to drive the LCD, multiplexing various signals to get it to display what you want to display. Then you're going to have to get it to do this roughly 20+ times per second so your eyes don't see any flickering.

    You HAVE to stick with this LCD... This LCD is going to 'cost' at least 18 pins from a PIC and a LOAD of code and headaches... I'd talk to whoever is making you do this...and slap them up a bit...
    But if you must, do some searching here, there's a few projects around here that deal with multiplexing a display,etc.

  5. #5
    Join Date
    Apr 2007
    Location
    Copenhagen
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Ok, that sounds quite tricky
    PIC16F917 has some LCD module. Maybe it's possible to use it, so that it will be easier and simpler to drive this 'dumb' LCD? What kind of functionality does this LCD module provide?

  6. #6
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Michlis,

    The LCD on your demo board is similar to driving a 7 segment display. Your program will need to output the data to the first display digit, then to the second, then to the third, etc. There are many types of LCD displays out there. The ones that are used with PBP are quite different from the one on your demo board. The PBP LCDOUT routines will not work with the type of LCD display that you have. I just took aglance at microchip's website and there seems to be alot of reading material in relation to their LCD PICs. The 16F917 is a specialty chip with a built in LCD driver so you need to learn how to address that driver to get information displayed. The built-in driver probably explains why the chip has a large program memory, 14K!

    Didn't your demo board come with sample applications? If so, why don't you use the information there to create an assembly routine to operate the display within a PBP program.

    I personally use the regular LCD displays in either a serial or parallel manner whereby I can use LCDOUT or Serout2 commands to display data quick and simple!

    HTH,

    BobK

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. 16f887 44 pin demo board code problem?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th December 2008, 14:17
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Replies: 8
    Last Post: - 7th December 2006, 15:42

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts