PDA

View Full Version : T6963 / RA6963 LCD controller with PBP



HenrikOlsson
- 17th November 2011, 08:18
Hi everyone,
A couple of weeks ago I got myself a SmartGLCD from MikroE (http://www.mikroe.com/eng/products/view/443/smartglcd-240x128-board). It's a PIC18F8722 and a 240X128 GLCD with touchscreen and RGB backlight, microSD card holder and FTDI USB UART - all for $99. I couldn't resist....

The LCD is using the RA6963 controller (compatible with the Toshiba T6963) and I'd like to get this going with PBP - obviosuly. A search for RA6963 and T6963 on the forum turns up absolutely nothing which is a bit surprising. I've spent a couple of hours with my nose in the datasheet and some pieces of C code I've found on the net, needless to say I've yet to see something displayed on the display.

I need a nudge/push/kick in the right direction.... Has anyone got any experience with the RA6963/T6963 controller that you wish to share with the forum? Any pointers or links to tutorials that actually explains how it works? Basically any information is appreciated but I know how to Google (and I have) so you don't need to link me to the first hit on Google ;-)

Thanks!
/Henrik.

rmteo
- 17th November 2011, 15:03
You can try adapting the Swordfish BASIC source code here http://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.T6963c

HenrikOlsson
- 17th November 2011, 15:23
Now that's a resource I've missed, thanks a lot!

Still open for more pointers if anyone has any.

Thanks!
/Henrik.

rmteo
- 17th November 2011, 15:47
I have used these displays - as well as smaller 128x64 ones based on the KS0108 controller - in the past. Here is an example of T6963, 240x128 that was done several years ago.
6120

However, I no longer use monochrome graphic LCDs. Today, TFT color LCDs are more compact, higher resolution, typically consume less power, and are generally less expensive. Driving them may be little more complex (but not by much) - as the general principles are the same. This is a 320x240 TFT that I am developing a framework for a handheld HMI terminal with my own graphic primitives (9-11 concurrent tasks managed by an RTOS, touch panel, dimmable backlight, keypad, RTC with battery backup, USART external comms, optional RF comms, etc.) The TFT display costs about half that of the 128x240 T6963.
6121

HenrikOlsson
- 17th November 2011, 17:14
Here is an example of T6963, 240x128 that was done several years ago.
Nice job! I only see a photo of it though, where's the PBP code? I mean, I already know it can be done... :-)

/Henrik.

mark_s
- 17th November 2011, 17:20
Try this site, it really helped me a while back. There is a link to PBP code on the same
page. He also has some nice VB tools for loading and editing bit maps to these displays.

http://www.compsys1.com/workbench/On_top_of_the_Bench/T6963C/t6963c.html

Mark

rmteo
- 17th November 2011, 17:25
Nice job! I only see a photo of it though, where's the PBP code? I mean, I already know it can be done... :-)

/Henrik.
You are PBP developer right? Should be a piece of cake for you. One should not expect to be spoon fed all the time.

HenrikOlsson
- 17th November 2011, 18:37
rmteo,
Well, I wouldn't call myself a developer but yes, I write some code from time to time. If you follow this forum I think you'll find that I usually don't ask for much compared to what I give so I definitely don't expect to be "spoon fed all the time".

My tongue-in-cheek reply was aimed at the fact that I wonder exacly what that latest post of yours was supposed to do? It doesn't help me or anyone else one single bit that you've done it if you don't want to share how - as I said I already KNOW it can be done so seeing yet another photo of a GLCD really doesn't help. And the rest about other displays, which I guess are used other microcontrollers and other compilers and RTOS'es doesn't help much either but thanks anyway.

Thanks again for the Swordfish link though, that helps!


Mark,
Thanks a bunch, that helps as well!
I've seen Mike and Ranjits site several times yet I didn't remember to check it now that I needed it.

A little more time with Google though dug up this Hitatchi app note (http://www.sparkfun.com/datasheets/LCD/Monochrome/AN-029-Toshiba_T6963C.pdf) on the T6963 filling in a couple of gaps in the datahsheet.

/Henrik.

Sphere
- 19th November 2011, 17:46
You can try this. This was made for a 240x64 T6963 display but it might work with yours. Ive added the ports your display uses. You will have to set you config bits and osc speed for the pic. Its the best I could do for you.

Hope it helps Sphere.



FONTSELECT VAR PORTJ.6'SET FONT SIZE PIN
MD VAR PORTJ.5'I THINK THIS IS FOR SELECTING THE HALF OF DISPLAY TO WRITE TO
RESET VAR PORTJ.4'RESET PIN
CS VAR PORTJ.3'CHIP SELECT PIN
WR VAR PORTJ.2'WRITE PIN
RD VAR PORTJ.1'READ PIN
CD VAR PORTJ.0'COMMAND DATA PIN
DATAOUT VAR PORTH 'DATA PORT
B0 VAR WORD

HIGH RESET
HIGH CS'ENABLE WRITE MODE
LOW CD'SET TO DATA MODE
HIGH WR'SET WRITE PIN TO HIGH
HIGH RD'SET READ PIN TO HIGH
HIGH FONTSELECT'SET FONT SIZE
HIGH MD'I THINK THIS IS FOR SELECTING THE HALF OF DISPLAY TO WRITE TO

PAUSE 1000

PULSOUT RESET,1 :PAUSE 1000
CD=1:DATAOUT=$80:PAUSEUS 1:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 1:CD=0:PAUSEUS 1'MODE SET
CD=1:DATAOUT=$94:PAUSEUS 1:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 1:CD=0:PAUSEUS 1'DISPLAY ON IN TEXT ONLY MODE

PAUSE 1000

CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$10:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$42:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'GRAPHIC HOME ADDRESS

CD=0:DATAOUT=$28:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$43:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'GRAPHIC AREA SET COMMAND

CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$40:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'TEXT HOME ADDRESS

CD=0:DATAOUT=$28:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$41:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'TEXT AREA SET COMMAND

PAUSE 1000
GOSUB CLEARSCREEN
PAUSE 1000

'WRITE HELLO START OF LINE 1
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$24:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'TEXT POINTER SET(SETS WHERE TEXT IS TO START WRITING ON SCREEN)
CD=0:DATAOUT=$28:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER H
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$25:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER E
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$2C:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER L
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$2C:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER L
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$2F:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER O
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT

'WRITE WORLD START OF LINE 2
CD=0:DATAOUT=$28:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$24:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'TEXT POINTER SET(SETS WHERE TEXT IS TO START WRITING ON SCREEN)
CD=0:DATAOUT=$37:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER W
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$2F:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER O
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$32:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER R
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$2C:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER L
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
CD=0:DATAOUT=$24:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LETTER D
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT

Q:
GOTO Q

CLEARSCREEN:
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'LSB
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'MSB
CD=1:DATAOUT=$24:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'TEXT POINTER SET(SETS WHERE TEXT IS TO START WRITING ON SCREEN)
FOR B0=0 TO 319
CD=0:DATAOUT=$00:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'SEND A SPACE
CD=1:DATAOUT=$C0:PAUSEUS 2:CS=0:PULSOUT WR,1:CS=1:PAUSEUS 2:CD=0:PAUSEUS 2'DATA INCREMENT
NEXT B0
RETURN

HenrikOlsson
- 19th November 2011, 17:53
Thanks!
I got it going today though, displaying text, but I'll use yours to get further ideas from.

I'm still confused about how the physical resolution of the screen maps to "software resolution" and fontsize control etc. I'm playing with it as we speak so I'll figure it out - possibly.

Thanks again for sharing!

/Henrik.

Ioannis
- 19th November 2011, 19:48
The GLCD I think is a bit difficult subject. I tried once and left it for a later time.

Every contribution is most welcome. And since Henrik has a 'Contributor' level it means that is a great giver. So post #7 is not very appropriate answer especially to Henrik. He deserved a better one. Or do not answer at all.

Ioannis

rmteo
- 19th November 2011, 22:51
... So post #7 is not very appropriate answer especially to Henrik. He deserved a better one. Or do not answer at all.

Really? I posted a link to another BASIC site that provided source code. Is only providing PBP source code considered a better one?


The GLCD I think is a bit difficult subject. I tried once and left it for a later time.

Perhaps here. As I said, I posted a link to another BASIC site where they developed a library/driver for T6963 as well as KS0108 GLCD's - they don't seem to have problems.

Ioannis
- 19th November 2011, 23:39
Yes but you need a good understanding of that other basic lanquage...

Ioannis

rmteo
- 19th November 2011, 23:53
Yes but you need a good understanding of that other basic lanquage...

Ioannis
Agreed. And that is why I consider coding ability alone (particularly if you are limited to a single specific language) a pretty insignificant skill.

Gevo
- 25th November 2011, 19:27
Hi Henrik,

A couple years ago I make a controller for a th AlphaVibe a medical vibration Vibe. The LCD is Winstar 240x128. (Toshiba T6963C) The complete firmware is in PICBASIC. Incl. de smardcard reader (for uploading Images and fitness programs), Touchscreen, serial slave keyboard, controll a frequent inverter etc. For the graphics lib I use the GLCD of Compsys1 (http://www.compsys1.com/workbench/). This works very well! To load the image into the external eeproms, a write a simple image loader (smartcard -> E2P).

If you need any help, let me know.

The control board:

6146

The Console of the Alpha Vibe:

6147

HenrikOlsson
- 25th November 2011, 21:26
Hi,
Nice product!
I'm working on it on and off and it's comming together slowly. Currently I'm working on the Bresenham algorithm, trying to squeeze as much performance as I can out of it. When lines are done I'll move on to circles/arcs.

I've looked at the files available at the Compsys website (here specifically (http://www.compsys1.com/support/PBP_Files/t6963c))and while it does provide some pointers and ideas there is, as far as I can see, quite a few routines being called which are not actually included in the files (must be somewhere else which I've missed). For example put_char is called multiple times in glt6963c.bas but the actual subroutine is nowhere to be found. Neither in glipict2.bas or glt6963c.bas. Same thing with gl_init, put_it, gl_rect, gl_circ and so on.

Like I said, they must be in some other file on the site which I haven't found. But I'll just reinvent the wheel and write it myself... ;-)

Thanks!
/Henrik.

Gevo
- 26th November 2011, 09:12
Hi Henrik,

If have take a look on by PC. The file name is ctrllib.bas (Graphic library of subroutines for use with a Toshiba T6963C, incl Windows GLCD Tools adn Image Converter).

And I have pay some US$ for the source code of the guys of compsys1.

Regards,

- Gerben (PICshop.nl)

Ioannis
- 28th November 2011, 14:50
Is this the library needed? It is burried on the compsys1 site (free for non commercial use).

http://www.compsys1.com/support/PBP_Files/T69B/T69B_lib.bas

Ioannis

J. Mark Wolf
- 15th December 2011, 14:31
Hi everyone,
A couple of weeks ago I got myself a SmartGLCD from MikroE (http://www.mikroe.com/eng/products/view/443/smartglcd-240x128-board). It's a PIC18F8722 and a 240X128 GLCD with touchscreen and RGB backlight, microSD card holder and FTDI USB UART - all for $99. I couldn't resist....

/Henrik.

Hi Henrik

I am considering the purchase of this same LCD and am wondering how "you two" are getting along. It seems like quite a bargain.

I have a lot of T6963 controller experience, and want to upgrade my application from a 160x128 to something with more resolution. The Smart GLCD doesn't have much more res than I already have but I'm not finding an easy upgrade path to 320x240 panels, and I already have a lot of PB (actually Protob) code for the T6963.

My application requires very good daylight visibility. Can you advise if the daylight visibility is good on this display? I don't think the fancy backlighting will help in this regard.

Is it also possible to communicate with this LCD via the SCI (TTL asynch serial) port on the long pin header across the top. My application utilizes a remote controller with a PIC and SCI port (no easy access to USB for comm).

HenrikOlsson
- 15th December 2011, 17:10
Hi,
We're getting along OK, haven't played in a couple of weeks though. Sometimes the bootloader (the one it comes preloaded with) acts up and disconnect in the middle of program download only to work just fine the next time - I have no idea if that's the board, the bootloader firmware, software or my PC's fault.

Not sure what you mean with SCI...?
The board features a PIC18F8722 which has two EUSARTS. One of them is hardwired to FT232RL but the other one is available on the header (PortG.1 and PortG.2). There are also two MSSP modules, one is used for the onbard microSD card interface but both are available on the header though. All in all you have 38 I/O's available for external circuitry and communications, the rest of the 18F8722's I/O's are consumed by the LCD controller interface, the backlight drivers, touchscreen interface and USB UART.

You can download the schematic from mikroE's website. Unfortunately it's not complete when it comes to the RA6963 and the LCD-panel but the "PIC-side" of it is.

Can't say how it performs in daylight, only played with on the bench which is OK with backlight on.

/Henrik.

retepsnikrep
- 17th December 2011, 08:26
How much RAM and FLASH is left for the user on the smartglcd with all that hardware on board?

HenrikOlsson
- 17th December 2011, 08:52
Not sure I understand...?
The board comes preloaded with a bootloader, I don't know how much RAM and FLASH it uses but it can't be much compared to what's available. Except for that the microcontroller is blank and it's up to you to use and implement (or not) the integrated hardware as you see fit. The hardware doesn't "occupy" any RAM or FLASH by sitting on the PCB.

Does that make sense or did I misunderstand the question?

/Henrik.

retepsnikrep
- 17th December 2011, 16:16
No that makes sense, we just use our own code to drive the sd card / usb / lcd /touch screen etc etc

I'm interested but hope some of the very experienced members will share a few secrets about the hardware and how to get pbp to talk with it before I invest in one.

Peter

J. Mark Wolf
- 20th December 2011, 00:12
Hi,
Not sure what you mean with SCI...?

/Henrik.

Hi Henrik

Thanks for the info.

SCI = TTL level RS232, or asynchronous serial right out of a uart. Can't remember what the acronym stands for, maybe Serial Control Interface???