CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Read LCD layout

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

Read LCD layout
PostPosted: Sat May 28, 2011 12:42 am     Reply with quote

It is possible to ask yourself what color is this pixel ?
does someone have an example of a function like
Code:


boolean pixel(int x,int y);

pixel(1,4)= true if pixel is black, false if pixel is white ..


this would be really great :D
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat May 28, 2011 5:41 am     Reply with quote

yes, possible.
depends on the LCD how you can do it. Read the LCD datasheet chapter about 'reading the LCD data'.Somewhere it should be documented.Very simple test,did it about 25 years ago on the original laptop(Pset,Pclr,Ptst)....sigh,where does the time go?
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Sat May 28, 2011 8:14 am     Reply with quote

It's about ra6963, i found something about Read.. but i don't know exactly how to involve it :-??
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Sat May 28, 2011 9:28 am     Reply with quote

I use the glcd_library
and i tried this with no result.
The int returned by the glcd_readbyte() is 0 always.
Code:

      lcd_gotoxy(1,1,wTEXT);
      lcd_putConstStr("c");
      lcd_gotoxy(1,1,wTEXT);
      cd=glcd_ReadByte();
      lcd_gotoxy(1,2,wTEXT);
      lcd_putConstStr("_");
      lcd_gotoxy(1,3,wTEXT);
      lcd_nr(show,cd);



Last edited by noyz on Wed Jun 01, 2011 4:30 am; edited 1 time in total
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Sat May 28, 2011 3:49 pm     Reply with quote

Can someone please look into this, or maybe had tried something like this and has an example.

I did funny thing, a boolean matrix of lcd x and y which takes like 80 % of PICs RAM and beside that, even if I init it with false, on all values, it seems that it has true values and a lot of them, it shows like block structures:-?
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun May 29, 2011 6:47 am     Reply with quote

hmm..does the display actually work correctly for you ? proper characters, graphics where they should be ??

Perhaps your 'read LCD data algorithm is wrong. Force some known data in it's place and then test the function.

Maybe 'google' the LCD model for more info.

I'd cut down the code to just 'text' mode and debug from there. Once 'text' mode works, then add the 'graphics' functions. You've got a lot of code to try to sort out, keep it simple, build upon known working code.
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Wed Jun 01, 2011 4:33 am     Reply with quote

The LCD does display proper information, no alteration of code.
The thing i didn't try is that i think when i write something and use
gotoxy
and then
read data
Maybe i have to put gotoxy before or / after the thing i want to read, because maybe it reads the next X:-?
Like when writing something it will be written at x,y and the second character will be auto increment x and will be at x+1,y.
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jun 01, 2011 5:22 am     Reply with quote

'normally' auto increment is set (turned on) and is part of the LCD 'setup' configuration (cursor on/off, blinking cursor, # of lines, font size, etc.)

Easiest option for you is to print the data, then set x=x-1, or y=y-1 to read the pixel information.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group