Shop OBEX P1 Docs P2 Docs Learn Events
T6963 LCD code — Parallax Forums

T6963 LCD code

Erik FriesenErik Friesen Posts: 1,071
edited 2008-12-31 20:48 in Propeller 1
Using raymans code for a guide, I am attempting to do some assembly routines for the t6963. I am having typical lcd syndrome which means the screen stays blank. His code works so I know my connections are good. If someone has the patience to look at this it would be appreciated.

I hope you are ok with this Rayman as I am posting your code here.

My code has some additions and I know it is not ready to go but it should at least create a flashing cursor with what I have here.

Comments

  • AleAle Posts: 2,363
    edited 2008-12-30 11:35
    Erik: It should work... but Rayman's hat no rev when writting and reading... did you connect the data pins in reversed order ? D7 - PA0 to D0 - PA7 ?.

    How about the bias voltage, is it woring properly (so activated after you initialize the display ?). I played (the display played with me, actually) with these displays quite a bit. It took me kilo-hours to make them work. So I settled for a bitmapped mirror in graphics mode. Updated every now and then (50 ms). It works ok. I can post the code. Yours looks ok to me, I also have some logic analyzer dumps of the control signals that I made when It did work (not always!), it includes initialization.

    One note: In 6x8 font mode, the graphic screen will use only the lower 6 bits of each byte. So one line will be 40 bytes (for 240 pixels). In 8x8 font mode it will use all the bits, so only 30 bytes are needed. Sorry if you knew that. I didn't.

    Here is my code, it includes what I said plus a font, similar to the Speccy's.

    I hope it helps. Let me know if you need the dumps because I have them in a machine at work smile.gif

    Post Edited (Ale) : 12/30/2008 11:54:23 AM GMT
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-12-30 12:44
    My understanding is that I connected the pins in reverse. However Rayman alludes to the fact that the datasheet is wrong. What I get that is odd is that lcd pin17 blinks with the cursor, which should point to the fact that pin17 is in fact db7, which is how my settup is. I have my pin 0 set as db7 and pin 7 as db0. However, raymans demo works with the basepin set as 0 and the endpin set as 7.

    outa[noparse][[/noparse]DataBasePin..DataEndPin]:=cmd

    With the above command I would understand that it will be reversed, not?

    Do you recall any critical necessary delays in the read/writes?
  • AleAle Posts: 2,363
    edited 2008-12-30 13:41
    Regarding the pins: I'll remove the revs. if rayman's code works as it is as you say.
    Timing is not so critical, meaning there are setup and hold times as well as minimum widths (some 200 ns) but the 50 ns between instructions are enough for the setup and hold. The CS minimum width for what I saw in your code is taken care of (you call delay). You can have a look at my code, it works. The delays where implemented with nops. It may be a bit long... but it is everything that COG does, so it is ok for me.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-12-30 16:53
    Thanks. I haven't had a chance to check your code out in depth but I'll be checking it out this evening.
  • mikedivmikediv Posts: 825
    edited 2008-12-30 17:15
    Hey guys if I understand this you are using sparkfuns hug lcd?? I still have not gotten mine to work its pretty frustrating, one thing to check /Res in the data sheet indicates low to intialize and a simple method 200n cap to ground to /Res but at least on mine this did not work unless I put a 500 ohm resistor from A.K for the backlight?????? Don't ask me why but if I just connect the back light to 5 volts straight the Res will not be pulled low for any length of time
    I tried hard wiring the lines through 1K resistors high low to just see if this thing would print anything but no luck just some very strange things, I tried Rays code but with my Scope connected to the control pins wr,rd,6,ce,cd nothing seems to change , Ray does say in his code"""'You must manually set pin Numbers in the driver at this time!!!! """ but I couldnt get him to expand on what he meant . the Spark Fun Tech said he email me some "corrected" data sheets and a simple interface schematic with code for the stamp so I can at least verify if my unit is any good , I will post it for everyone when I get it. I guess more that few people here have purchased this display I would love to see one running.
    ·
  • AleAle Posts: 2,363
    edited 2008-12-30 21:29
    In Rayman's source the PORT pins that connect to the LCD's control lines are:
    PA7 = WR*
    PA6 = RD*
    PA5 = CS*
    PA4 = CD (A0)
    PA8..PA15 = D0..D7
    These definitions are at the beggining of the HugeLCDDriver1.spin file.

    Those are the ones you should change if you connect your LCD to other pins.

    Be careful with the bias voltage, it should not be applied before VCC is.

    The *RES signal can be driven with a simple 10uF/10 k resistor, the *RES is connected to the middle, VCC to the resitor end and GND to the negative of the capacitor. That worked for me.

    Once initialized it should display the garbage that is in RAM.
  • mikedivmikediv Posts: 825
    edited 2008-12-31 16:15
    Thank you for that explanation Ale it doesn't get clearer than that. Happy New Years guys.
    Oh Ale for PA5 = CS* Do you mean CE????? I could not find a CS outout

    Hey Ale in a last ditch effort and total frustration I swapped pins and put WR=4 CE=6 CD=7 and RD=5 prop pins
    and all of a suuden the darn thing did somehting when I run Rays code I get a blinking cursor in the upper left cornner
    I also wired up the Res the way you said and tried pulling a couple of the data lines off and manually setting them high or low and it is printing garbage to the screen !!! I am quite pleased ,, I hate to keep bugging but does this make any sense to you??? If I put my scope on the control pins WR,CE,CD,RD· prop pins 6 and 7 are outputing square wave on the scope whenb I run rays code
    could I have had the pins wrong all this time??
    PIN SYMBOL FUNCTION
    1·FG FRAME GROUND
    2 Vss Power Supply(GND)
    3 Vdd Power Supply For Logic(+5V)
    4 Vo Power Supply For LCD Driving (Contrast Adjust)
    5 VEE NEGATIVE VOLTAGE INPUT/OUTPUT
    6 /WR DATA WRITE
    7 /RD DATA READl
    8 /CE CHIP ENABLE FOR T6963C
    9 C/D COMMAND/DATA SELECTION
    10 /HALT CLOCK OPERATING STOP SIGNAL
    11 /RST RESET T6963C(LOW EFFECTIVE)
    12--19 DB0—DB7 DATA BUS
    20 NC NO CONNECTION
    21 LEDA LED BACKLIGHT POWER SUPPLY(+)(+5V)

    Post Edited (mikediv) : 12/31/2008 4:52:49 PM GMT
  • AleAle Posts: 2,363
    edited 2008-12-31 16:43
    Well, yes Chip Enable (sometimes called Chip Select)...
  • AleAle Posts: 2,363
    edited 2008-12-31 20:48
    It could have been.

    Modify Ray's code to output just a char, always the same to see if it fills the screen.
Sign In or Register to comment.