Shop OBEX P1 Docs P2 Docs Learn Events
Anyone used Optrex F-51852 LCD yet? — Parallax Forums

Anyone used Optrex F-51852 LCD yet?

HomeSchoolDadHomeSchoolDad Posts: 32
edited 2005-12-09 20:42 in BASIC Stamp
Greetings All,

Before we commit to these LCDs I am trying to figure out how to drive them - and I can not seem to find anything that tells me how to put a simple "Hello World" on the screen. As far as I can tell they have a built in controller, they are 128 x 64 pixels and they can run either serial or parallel. They really look great and solve more than a few problems for us.

But... I can not see how to put a simple character on the screen!

Does anyone know how to program these on a BS2?

This is the link to the part on the Optrex site. Digi-Key and Mouser both seem to have the same info that Optrex has and I have not been successful doing a search on anyone doing this with a BS2 on Parallax or on Google.

www.optrex.com/products/partdetail.asp?PartNumber=F-51852GNFQJ-LB-ABN

Thanks in advance for any help anyone can be.

Jeff

Comments

  • Philip GamblinPhilip Gamblin Posts: 202
    edited 2005-12-07 17:25
    If you look on the page of the link you provided, under "Other Resources" resources there is a 46 page "Controller Specification" pdf that describes the controller operation.
    That is a very cool display BTW.
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-07 18:21
    Yes, it is a very cool display. I want to use it badly so I am thinking of blindly ordering it this afternoon. It is only $35 but I need two of them. Perhaps I'll call it an early Christmas Present for the kids!

    I've had a good look at the PDF but is anything but straight forward. It looks like I have to create my own fonts and load them into the display a pixel at a time and I can not just send the characters "Hello World" - but is says it is a character/graphic LCD so I assumed that I could send a graphic template and then fill in the blanks with text. Is sending everything a pixel at a time normal in an LCD that has a character/graphic controller?

    I haven't figured out yet how to put a number on the screen in one place and put another number on the screen someplace else without blanking the first number. I am kind of making the assumption that I can do that only based on the pretty picture in the link. What's that old saying about assume??

    Perhaps I am just spoiled by the Parallax Matrix Orbital 204-25 LCD I have been using.

    I would love a look at a program that runs a display that runs similarly to the Optrex so that I can "get a clue" on how this one works.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-07 18:55
    Jeff, I think you may be corect, I too cannot find any reference to feeding the unit ASCII data or character positioning, though they interestingly show characters in all thier figures as example graphics. You may want to contact them and ask if the display is compatible with the SED1330F controller which does have the functionality you are looking for (while your are at it, ask them if thier controller accepts ASCII data). Here is an example panel using the controller, with a link to how the controller works. But considering LCD controllers are surface mount (most panels are too, and many of thier contacts are inaccesible to a soldering iron IOW underneath the module which is intended to be directly connected to a PCB, nessesitating reflow technique. Actually I just looked at the mechanical drawing and its a flex connection, finding a compatible Molex flat flex socket becomes the issue), the PCB design/soldering may be more than you or your kids·want to take on.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 12/7/2005 7:03:06 PM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-07 19:17
    Jeff -

    Based on what I quickly read last night, the controller being using in this Optrex Graphics LCD is in no way compatible with any of the standard character LCD's one normally sees. In addition, I suspect, but can not say for gospel, that it uses synchrounous serial (SHIFTOUT) communication as opposed to asynchronous serial (SEROUT) communication. Although that's ordinarily not such a problem, I believe that requirement will negate the use of any of the normal serial formatting means (DEC nn, BIN nn, HEX nn, etc) which is so helpful when using SEROUT with most serial LCD's.

    Personally, if I was looking for an LCD which was capable of both graphics and character display, I'd go looking at the SEETRON web site: http://www.seetron.com as I'm sure they will have one that is compatible with the Basic Stamp, and there will also be plenty of examples, as well as all the technical asistance you might need.

    Regards,

    Bruce Bates
  • Tom WalkerTom Walker Posts: 509
    edited 2005-12-07 19:18
    Looking through the specs, I am not seeing any reference to any kind of character ROM images, so I would guess that any text you would wish to put on the display would have to be built by your application. In short, no simple "send 'Hello, World!'" is available.

    But it does look like a nice display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-07 21:18
    Greetings All,

    Holy jumpin' Jimney Crickets! - this is going to be a fun display to use.· I just got off the phone with the manufacturer's Senior Application Technical Manager - 2 1/2 hour conversation.· This display is quite advanced as far as the technology is concerned, but it is certainly not exactly basic stamp friendly.

    On the other hand, this does appear to be do-able.

    They give you a DDRAM matrix in the stamp that you write to which has a 1 to 1 correspondance to the pixels on the display.· This way you can orient the display in·portrait or landscape (or upside down) and make it work.· It will work in serial or parallel -·BUT - it does not do characters the way we are used to doing characters.· The vendor web site was wrong on that.

    Here is how it works -·you can load a full graphic screen template in the DDRAM and it will immediately display it (or a logo splash page, etc).· You then keep·a matrix of the characters you want to use·in the sizes you want to have them in·EEPROM (or flash).· When you want to write a character to the display you fetch that character from EEPROM, set A0 for instruction mode,·send the·line to start writing, send the column to start writing, set A0·for data mode, send the bits (1 for pixel on and 0 for pixel off) 8 bits at a time for the line.· Repeat for each line of the character(s).· The controller handles the rest.

    If you use it as a parallel LCD you can read the DDRAM as well as write to it (so you could load the current page for redisplay later or to flip the display upside down or something).· Configured as a serial LCD you can only write to it, but you have fewer pins being used.

    I think this will make for a very professional looking display and·it allows me to use multiple font sizes and icons on the display, but it seems like I am looking at a lot of development time to use this and a lot of cycles to run the display.

    What do you guys think?· Should I go for it?· Should I use the BS2pe for the memory space for the font or the BS2px for the speed?

    ··· Jeff

    PS - Bruce:· Thank you for the link suggestion.· I looked over there earlier·for a display that met the needs of our project, but when I found one that might work, it would not fit the real estate in the case the kids and I picked out·(mostly a problem of the PCB the LCD is attached to being oversized).· This display does force you to add stuff to your PCB (30 pin connector, a few caps, a resistor and· a pot) but it is really real estate friendly and fits the opening in our case like it was designed for it.· The super high contrast and 6 colors make it more fun for the kids too.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-08 16:45
    How about using the BS2px with an external EEPROM?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-08 16:55
    Oh I get it... you're one of THOSE!· You want the best of both worlds!· smilewinkgrin.gif

    I actually have quite a bit of EEPROM in the design for data collection.· I could trim down the amount of data I can collect and reserve some for the fonts, but that would be an interesting build for me.· How do I get it in the EEPROM unless I put it there from the stamp?· And if I do that is it not in the stamp already?· Do I load one program to load the EEPROM and run it and then reload the stamp with the program that runs the device and draws from the EEPROM?· Of course, I could just add a second EEPROM.· OK.· Now you've done it...· I am thinking again.

    Thanks for the clarity.

    ···· Jeff
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-08 17:17
    Probably the easiest way is to create an EEPROM font loader program, if your EEPROM supports write protecting individual pages you can lock down the pages containing the font so you don't accidently overwrite the fonts and have to repeat the font loading (don't lock it until you move onto developing the final application). If you want to expidite the font process, after you load the font you can then load the font set onto the display to visually verify it's correctness, that way you don't have to keep reloading two seperate programs incase some of the characters are wrong. If I were to do this, I would first forget about the fonts and create a display test pattern to verify you are interfacing with the display properly, then create the font loading/display program, finally developing the final application. Its alot of steps, and you may find the slower BS to be sufficient, that will mostly depend on what the application is since the display is static (once you send data into the RAM it continues to display it until changed or powered down).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-08 17:42
    I think you are exactly right.· I was thinking that the first program I write would be just to put a dot in the upper left hand corner.· the second would be to trace the edges all the way around and to place a dot in the center.· I think that if I can do this I have proven the display with the stamp and the connections that I have made.· After that I progress to "Hello World" and then the application.

    I am trying to determine exactly how much space I need to store the fonts as well.· I really only need the characters I actually use.· One of the needs we have is larger numbers with smaller print.· Obviously all I need in the larger font is just 10 characters.· I am wondering if my memory needs are not as large as I feared - especially if I can get by with the BS2pe.· The design calls for a very large data table·in the handhelds with a lookup function that I have handled by using a binary search on a·sorted index with a dataflash page number reference.· I figure that if the BS2pe can handle that then the font loading should be a piece of cake - but when I have to do both (and other functions) in a linear·timeline·I am concerned that the device will seem slow.· All I need is a hyperthreaded dual core basic stamp!· [noparse]:)[/noparse]

    I have emailed the schematic for using the display to Optrex and they said they would check it out for me.· I am kind of a stickler for planning it out completely before I begin.· Kind of funny that way.· I thought I would post it when they say it looks good so other folks could try the display out.
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-08 18:53
    One more thing:

    Any suggestions on the best way to store the fonts?

    They need to be sent to the display as a string of 1s and 0s where 1 is pixel on and 0 is pixel off in the appropriate size.· Since the display is 128 x 64 I was considering one font as·5 x 7 with a leading of·2 pixels between lines and 1 pixel between characters, but that just seems to be a waste of the display.· It seems to me that the advantage of the display is the ability to do proportional fonts.· To do that I would need to have each character defined with a width attribute - by using the full·9 bits in height I could·allow for real capitals,·ascenders and decenders.· By adding a height atribute we could·do a second larger font the same way and define it·as something like 18 x 27 and be able to mix them on the display.

    The most efficient way to store and index the characters with the width and height attributes becomes the challange for planning and execution.

    ····· Jeff
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-08 19:10
    I think you have a good undertsanding of the benefits and drawbacks of proportional/non-proportional fonts. With proportional fonts you'd need a table of widths (and heights), and perhaps a pointer for the beginning byte of the character. Another drawback to proportional fonts, you cant do a "goto column 3, 4th character" outside of a mark/recall operation or lengthy "sum of all character's widths until we reach our target". I would do the non-proportional font first then move to proportional as a v2.0 feature, but thats just me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • HomeSchoolDadHomeSchoolDad Posts: 32
    edited 2005-12-09 20:42
    HERE IT IS!!·· yeah.gif

    I have spent quite some time reworking this and going back and forth with the fellow at Optrex in working out this schematic for people who use the Parallax Basic Stamp and want to use this really cool display.· I just got the stamp of approval from him and so I thought I would share it with the user community.

    Notice that there is a digital pot and a regular pot in the schematic.· The trim pot is used to control the contrast and once set you should not have to modify it.· The digital pot/transister circuit on the cathode end·is there to control the brightness from the basic stamp.· I have an I2C circuit in the design to control some dataflash memory so I just adopted·a digital pot that uses I2C so I would not have to use any additional pins on the stamp.

    The display comes with a flat bottom connector cable with no end on it so I have included the Digi-Key part number for that and the 2 pin connector for the LED back light.· Both of these are surface mount so you may want to replace those or put them on adapters to prototype using thru-hole.

    Some of the caps and resisters are probably not needed - but it is more reliable with than without them I am told.

    The RES is just tied to the system reset button in the schematic, but can probably be tied off.· Just make sure to put a pause in the startup code to let the display settle before you start driving it.

    I'll post again when I get it to say "Hello World" with a bit of code - but if you beat me to it I'd love to see it!

    ····· Jeff

    PS:· Please tell me what you think of my solution before I commit the pcb design to etchant!!· freaked.gif
Sign In or Register to comment.