LCDInfo.com http://forum.lcdinfo.com/ |
|
No data on LCD using PIC to control the T6963C http://forum.lcdinfo.com/viewtopic.php?f=9&t=2536 |
Page 1 of 1 |
Author: | Richard [ Tue Nov 04, 2008 21:35 ] |
Post subject: | No data on LCD using PIC to control the T6963C |
Hi, I am new to PIC programming, and also new to programming to an LCD panel. I made some result, but I am stuck at the moment. I am using a PIC-18F4550 to control an LCD panel with a T6963C controller. I read a bit on this forum, but I could not find the solution to my problem. When I clear the screen after initialization, I can display the cursor, and change its shape. After that I can't move the cursor or write text, even after setting the address pointer(24h). I decided to do some graphic drawing, but when setting one pixel(command FBh), it draws a vertical line! at the right horizontal position!! When I clear the screen first, nothing appears at all! Any help would be great. |
Author: | taximania [ Tue Nov 04, 2008 22:18 ] |
Post subject: | |
When you send graphic commands to a T6963, you have to specify the xbyte 0 - (screen width / 8 ), and the bit in the xbyte you wish to show. eg Example sub to plot x=53, y=22 y never changes. Sub coords(x) t1=Int( x/8 ) t2=8*t1 t3=x-t2 If t3<1 Then t3=Int(t3*10) t3=t3+1 t3=8-t3 t6963xbyte=t1 t6963xbit=t3 End Sub More tomorrow. At least you got a reply |
Author: | Richard [ Tue Nov 04, 2008 22:50 ] |
Post subject: | |
Thanks for the quick reply. And this should be done by placing the Address Pointer(command 24h) on the X-bye and setting the bits with the "Bit Set/Bit Reset Command" I mentioned in my first post(FBh), the third pixet on? I am just trying to get any data on the screen. And in this test it places the pixel correct, but it seems te repeat it until the botom of the screen. It looks like it is scrolling down! So I get one vertical line! Could this be a hardware or timing problem? Thanks. |
Author: | taximania [ Wed Nov 05, 2008 20:14 ] |
Post subject: | |
What microprocessor and language are you using ? My original project was started back in 2002, Psion5 via serial. http://myweb.tiscali.co.uk/taximania/pic2.html It's currently running via Bluetooth serial to my XDA Orbit Are you sure your code is not in a loop with 'Y' incrementing ? Sorry for possibly stating the obvious. |
Author: | Richard [ Wed Nov 05, 2008 21:01 ] |
Post subject: | |
I don't think there is a loop because my test application is minimal. I use it to find the right initialisation. I am using a PIC microcontroller and the MCC18 compiler. Afterwards the led is on. I disabled the ClearText() because after that I can only get a cursor and no text(did not work either) or pixels on the display. Before every write, I wait for the status. void main(void) { init4550(); LED_2 = 0;//Turn led off InitControls();//Set all status lines high(not active) InitLCD(); WriteCtrl(0xfb);//Write a pixel WriteCtrl(0xfd);//Write another pixel LED_2 = 1;//Turn led on while(1){ } } void InitLCD (void){ ResetLCD(); WriteData(0x80); WriteData(0x07); WriteCtrl(0x40); WriteData(0x1E); WriteData(0x00); WriteCtrl(0x41); WriteData(0x00); WriteData(0x00); WriteCtrl(0x42); WriteData(0x1E); WriteData(0x00); WriteCtrl(0x43); WriteCtrl(0x81); WriteData(0x00); WriteData(0x00); WriteCtrl(0x24); WriteCtrl(0x98); //ClearText(); } |
Author: | taximania [ Wed Nov 05, 2008 22:10 ] |
Post subject: | |
WriteCtrl(xx) is a call to a 'C' function. I can't see what that function does, or what pins of the pic it is using. Is your circuit wired to the pic pins that the 'C' library is using. |
Author: | Richard [ Thu Nov 06, 2008 0:00 ] |
Post subject: | |
WriteCtrl and WriteData are my own functions. They set the control lines to the correct status and set the data or command on the databus. After checking the status. But now I think about it, it looks like only the commands that have no parameters work(the WriteCtrl()), setting the cursor and setting bits worked more or less. I think I'll check the WriteData() function. However this doesn't explain the vertical line I get. I'll keep you posted, and of course every suggestion is welcome. |
Author: | taximania [ Thu Nov 06, 2008 19:51 ] |
Post subject: | |
Have you downloaded the , 'How to use graphic liquid displays with pics' file from my website, it's worth reading. http://myweb.tiscali.co.uk/taximania/feb01supp.zip Also in a EPE (Everyday Practical Electronics) magazine article a few years ago, it said that checking the 'Status' was not needed. My project doesn't check it. I will still have the magazine in the shed, but i'm not going digging for it just yet. Have you had a look on the EPE chat zone forum for info ? http://www.epemag.wimborne.co.uk/ |
Page 1 of 1 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |