LCDInfo.com

http://www.lcdinfo.com
It is currently Mon Apr 23, 2018 5:54

All times are UTC + 2 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Nov 04, 2008 21:35 
Offline

Joined: Tue Nov 04, 2008 21:18
Posts: 4
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 22:18 
Offline

Joined: Sat Aug 09, 2008 21:11
Posts: 8
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 ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 22:50 
Offline

Joined: Tue Nov 04, 2008 21:18
Posts: 4
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 20:14 
Offline

Joined: Sat Aug 09, 2008 21:11
Posts: 8
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 21:01 
Offline

Joined: Tue Nov 04, 2008 21:18
Posts: 4
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();
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 22:10 
Offline

Joined: Sat Aug 09, 2008 21:11
Posts: 8
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2008 0:00 
Offline

Joined: Tue Nov 04, 2008 21:18
Posts: 4
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2008 19:51 
Offline

Joined: Sat Aug 09, 2008 21:11
Posts: 8
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/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group