Shop OBEX P1 Docs P2 Docs Learn Events
Use of LCD — Parallax Forums

Use of LCD

HighlandtinkerHighlandtinker Posts: 50
edited 2010-04-10 22:12 in Propeller 1
·I have just started to learn to program the propeller. I have been able to redo some of my BS2 programs in spin. My question is, is there a small, easy to follow Demo on the LCD's use with the propeller?? I have seen some but are a little hard to follow right now. Probly will be able to when I become more familure with Spin. Thanks in advance for any help or comments.········

························· Thanxs· Highlandtinker

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




· Scott

Post Edited (Highlandtinker) : 3/28/2010 11:20:52 PM GMT

Comments

  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-03-28 19:59
    How about Propeller Library - Demos, Debug_LCD_Test?

    John Abshier
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-28 20:04
    Which LCD? Graphics? B/W? Color? How may? With controller? Without? Text? Serial? 4 pin? 8 pin? Or is it your LCD TV?
  • AleAle Posts: 2,363
    edited 2010-03-28 20:05
    How about making your font smaller?. It really hurts...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
    pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-28 20:06
    Ale said...
    How about making your font smaller?. It really hurts...
    I agree.

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-28 20:25
    W9GFO & Ale:

    Sorry for the large font size ! Didn't know it was a problem.



    Mag102:

    I am using 2·x 16 and 4 x 20 LCD from Parallax (27976 and 27979) and other ones from Asia with control boards from WWW.Wulfden.org.









    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
  • SRLMSRLM Posts: 5,045
    edited 2010-03-28 20:41
    The Parallax LCDs are easy to use. All that you have to do is send a serial string to them and they will display it. Something like this would work:


    OBJ
       debug : "FullDuplexSerialPlus"
    
    PUB Main
       debug.start(0,1,0,9600)
       waitcnt(clkfreq + cnt)
       debug.str(string("Hello World!", 13))
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Powered by enthusiasm
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-28 21:25
    Highlandtinker said...
    W9GFO & Ale:

    Sorry for the large font size ! Didn't know it was a problem.

    No problem. I'll explain why it bothers me though. I view the forums, and most programs, at full screen. I have the fonts sized as small as possible so that the most text will fit on the screen. I have always done it that way. When a post comes up in a large font it literally strains my eyes to read it because I feel like I need to move back a few feet to read it comfortably.

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
  • mikedivmikediv Posts: 825
    edited 2010-03-28 22:39
    Highlandtinker this what I use just connect your serial LCD to prop P0 ,, and set your 4X20 to 9600 baud
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-29 01:52
    ·Thanks everbody for the replys.

    ·mikediv,

    ·Tryed to run code but got error saying unable to find···"FullDuplexSerialPlus"

    ·SRLM,

    ·Your code loaded but my LCD only shows Parallax's intro screen. This may be a problem with· the··LCD· or· me not understanding· the issue.

    ·All the help has been a good step forward with understanding the concept of OBJ. Along with··· the······ LCD not showing anything but the intro it has another problem but will take that to the sandbox.

    thanks again


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
  • Chip CoxChip Cox Posts: 73
    edited 2010-03-29 03:22
    Think of objects kind of like "C++" classes or libraries that perform a specific function.· FullDuplexSerial is an object you can pull down from the object exchange.· It makes serial IO a lot easier for you.· There are a lot of other nuances that go with objects and there is a pretty good explination of them in the propeller education kit.· Objects and Cogs are definately something you want to spend a lot of time on understanding though.
    ·
  • mikedivmikediv Posts: 825
    edited 2010-03-29 15:59
    Highlandtinker,, sorry about that I just assumed everyone had a copy of that, like chip said its in the object exchange I would post a copy for you but I don't know if that's OK with parallax but if you email I can send you my copy but again like chip said its right in the obex exchange go to the parallax home page and go to downloads then click propeller downloads I think about half way down the page is the objext exchange you will find tons of awesome programs and drivers, Just make sure when you run the program I sent you for the LCD the fullduplexserial
    program has to be in the same directory as the LCD program or the spin tool will not find it that goes for any object you use it has to be in the same directory as the main program
  • Brian RileyBrian Riley Posts: 626
    edited 2010-03-29 16:05
    Scott here is a simple K107 Demo, that will run the board you got from me at 9600 with a 4x20 display.

    It is set up for pin 16 you may need to edit that in text.start().

    cheers ... BBR

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    The Shoppe at Wulfden
    www.wulfden.org/TheShoppe/

    Post Edited (Brian Riley) : 3/29/2010 4:10:38 PM GMT
  • hover1hover1 Posts: 1,929
    edited 2010-03-29 16:26
    FullDuplexSerialPlus can also be found in in the Propeller Tool 1.2.7>Examples>PE Kit>Objects Lab
  • hover1hover1 Posts: 1,929
    edited 2010-03-29 16:32
    I think your switches on the back of the display are in "Test Mode". On the 4x20 Switch 1 should be OFF and Switch 2 should be ON for 9600 baud.
    Highlandtinker said...

    ··Your code loaded but my LCD only shows Parallax's intro screen. This may be a problem with· the··LCD· or· me not understanding· the issue.




  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-29 20:01
    hover1,

    Had switchs set right. LCD came on and showed intro then when power was turned off then back on LCD stayed dark. Would change LCD and same thing. Set switches back to test and LCD would work again until power removed. I am going to play with this some more because may be something else going on. Thanks for your valuble help as this is helping me understand the Prop better.

    Brian,

    A big thanks for the code. I have not tryed it yet but will tonite. Your K107 boards are awsome and I would & will recommend them to anyone.

    mikediv,

    I thought I had "fullduplexserialplus" put were it belonged but maybe not. I have learned so much from this little project. Mainly that I have so much to learn about the Prop and spin. I had not done any programming since 1986 untill starting with the BS2 a year or so ago. I am far better at the hardware end of electronics but am trying to learn.

    Thanks to every one for the help and keep the suggestions and comments coming!!!· Scott

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
  • mikedivmikediv Posts: 825
    edited 2010-03-29 21:42
    Scott I am in the exact same boat I love to design and build circuits but my programming skills are lacking when I got my BSEE the only programming we learned was on the at the time brand new Heath kit ET3400 as a matter of fact I had built my own and the teachers could not get theirs working so they finally used mine to debug the schools so just making the Hex display say Hi we were all in Owe LOL,, I started with a BoeBot BS2 I still use my BS2 stuff but I love the prop chip I have never seen a chip that made video and LCD stuff so amazingly easy to do
    I have every kind of screen you can think of hanging off a propeller.. Good luck and don't be afraid to ask there are some awesome guys here very talented and willing to share and help
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-29 22:21
    mikediv,

    I am getting kind of bummed out with the whole LCD thing. I agree the Propeller chip is awsome but no matter what I have done so far I can't get any of my Parallax LCDs to do anything but show the Parallax intro screen.freaked.gif· What is strange is when the LCD is set to any Baud rate the screen is blank and no back light. The only time I can get it to light up in in test mode. I can switch to 9600 with LCD on and get a intro screen. I have been unable to get any demos to do any thing. I have retested all my LCDs with the BS2 demo code and they work great. So I don't Know what to do except maybe contact Parallax and try to find out what the heck I am doing wrong. Very discouraged right now!! O wellconfused.gif

    ·Brian,

    when I try to use the code you posted·(·k107_demo-bst-archive-100329-120317.zip) all but one file· is empty after I extract them. I really am looking forward to being able to use this code. Maybe I will have better luck.

    you can e-mail the code to me or repost.· THANK YOU



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott

    Post Edited (Highlandtinker) : 3/29/2010 10:30:46 PM GMT
  • w8anw8an Posts: 176
    edited 2010-03-29 22:33
    There does seem to be a problem with that archive.
  • hover1hover1 Posts: 1,929
    edited 2010-03-30 00:07
    Do you have the #27979 4x20 LCD? On mine, if I switch to anything other than "Test Mode", the screen just comes with no backlight and a cursor. It should not show the Parallax splash sceen if you are not in "Test Mode". Be sure and turn·off unit off before changing switches.
    Jim
    Highlandtinker said...

    ·I can switch to 9600 with LCD on and get a intro screen.

  • Brian RileyBrian Riley Posts: 626
    edited 2010-03-30 03:45
    Looks like I need to send that file to Brad - BST archiving on Mac has a very repeatable boo-boo.

    Meanwhile I did an archive by hand.


    cheers ... BBR

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    The Shoppe at Wulfden
    www.wulfden.org/TheShoppe/
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-30 04:03
    Brian,

    Thank-You·smilewinkgrin.gif· That works great!!!!! Now I can·learn to use the K107 controlled LCD. If I can just figure out the parallax LCDs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
  • Brian RileyBrian Riley Posts: 626
    edited 2010-03-30 05:01
    I have (somewhere in this mess) a more sophisticated k107 driver and demo. Lets see if I can unearth it in the next couple of days.

    cheers ... BBR

    Highlandtinker said...
    Brian,

    Thank-You smilewinkgrin.gif That works great!!!!! Now I can learn to use the K107 controlled LCD. If I can just figure out the parallax LCDs.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    The Shoppe at Wulfden
    www.wulfden.org/TheShoppe/
  • SRLMSRLM Posts: 5,045
    edited 2010-03-30 20:21
    Agreed with Hover. The Parallax LCD shouldn't automatically turn on the backlight or display any content except for a cursor (underscore).

    Anyway, I suppose I should have been more clear. The code that I posted wasn't complete to run. You still need to define your clock. Also, make sure that you have the correct pin on the serial object to transmit on, otherwise nothing will happen.

    The complete code:

    CON
       
      _clkmode = xtal1 + pll16x                  ' System clock 80 MHz
      _xinfreq = 5_000_000
    
    OBJ
       debug : "FullDuplexSerialPlus"
    
    PUB Main
       debug.start(0,5,0,9600)
       waitcnt(clkfreq + cnt)
       debug.str(string("Hello World!", 13))
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Powered by enthusiasm
  • hover1hover1 Posts: 1,929
    edited 2010-03-30 20:43
    Very good point! Serial communication will not run reliably without the·xtal constants. I failed to see that in the last post.

    Yes, my post should have refered to the cursor as an underscore.

    Jim
    SRLM said...
    Agreed with Hover. The Parallax LCD shouldn't automatically turn on the backlight or display any content except for a cursor (underscore).

    Anyway, I suppose I should have been more clear. The code that I posted wasn't complete to run. You still need to define your clock. Also, make sure that you have the correct pin on the serial object to transmit on, otherwise nothing will happen.

    The complete code:

    CON
       
      _clkmode = xtal1 + pll16x                  ' System clock 80 MHz
      _xinfreq = 5_000_000
    
    OBJ
       debug : "FullDuplexSerialPlus"
    
    PUB Main
       debug.start(0,5,0,9600)
       waitcnt(clkfreq + cnt)
       debug.str(string("Hello World!", 13))
    
    

  • ScopeScope Posts: 417
    edited 2010-03-30 23:12
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-03-30 23:57
    Thanks every one for the help. The help I have recieved has been great and now I
    think the light bulb in my head is beginning to glow. ( very faintly, but glowing )

    SRLM,

    Thank you for clearing up my LCD problem. After defining the clock I was able to get the text to appear.
    Not seeing any text on the screen is what was throwing me into confusion. I know the backlight has to be turned on to light the screen. Just couldn't figure out what was up with the Parallax LCDs. They all work ok using your code. So again Thank - you

    Scope,

    Any and all info is of great help to me. Thanks for the link

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
  • Brian RileyBrian Riley Posts: 626
    edited 2010-04-01 04:23
    Here is the more sophisticated driver for the K107 (actually for any serial LCD board running the PH Anderson firmware).

    I have included a bare bones demo file, but it will get you started.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    The Shoppe at Wulfden
    www.wulfden.org/TheShoppe/
    www.wulfden.org/TheShoppe/prop/ - Propeller Products
    www.wulfden.org/TheShoppe/k107/ - Serial LCD Display Gear
  • HighlandtinkerHighlandtinker Posts: 50
    edited 2010-04-10 22:12
    Just wanted to thank every one for thier help. I am beginning to catch on to programming the Propeller chip to use an LCD as well as programming the Prop in general. All the help and comments are responsible for me beginning to understand, so again thanks to all. BTW I have attached some photos and the very first code ( other than experiments from PE Lab book ), I have put together for a Propeller project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔




    · Scott
    2304 x 1728 - 785K
    2304 x 1728 - 773K
Sign In or Register to comment.