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 support@ccsinfo.com

nokia lcd 1100. mirroring

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



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

nokia lcd 1100. mirroring
PostPosted: Sun Oct 22, 2017 10:09 am     Reply with quote

For cost reasons i decided to use 4 nokia 1100 lcds, very cheap on ebay.
They work all right on every aspect, except the horizontal mirroring.

As I need to install two of them upside down, I need to mirror the horizontal and vertical arrangement for these one's.
At lcd initialization time the mirroring yes/no is set up, and doing individual initialization, got following results:

Vertical mirroring IS OK, it changes by Lcd_Write(CMD,0xC0) or Lcd_Write(CMD,0xC8).

The horizontal mirroring is supposed to switch on/off using Lcd_Write(CMD,0xA0) or Lcd_Write(CMD,0xA1), but does not work.

The PCF8814 says that SET MX "CMD,0xA0" is a NOP command, MX is pad selected.

I was not able to find in the manual how to select it on the pad.

Google confirms that other people had the problem, but not showing any solution.

Any hint ?
juab
temtronic



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

View user's profile Send private message

PostPosted: Mon Oct 23, 2017 10:39 am     Reply with quote

You should post a link to the Nokia display datasheet.
The fact some (all ?) are having the problem without a solution seems to suggest the command is wrong ?
Have you asked Nokia ?
Perhaps the 'very cheap on eBay' units are defective OR that command is NOT in their BIOS.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Mon Oct 23, 2017 11:17 am     Reply with quote

You are aware that the MX bit is not immediate.

The MY bit just swaps the display immediately.
The MX bit changes how data it then written to the display. So you have to clear the display, set the MX bit, then write the data, which is then displayed reversed.
temtronic



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

View user's profile Send private message

PostPosted: Mon Oct 23, 2017 5:51 pm     Reply with quote

Found these 'somewhere' on the web...
Code:

Lcd_Write(CMD,0xA6^((cfg&0x02)>>1)); // Invert display option
//Lcd_Write(CMD,0xA0^(cfg&0x01)); // Mirror X axis option
Lcd_Write(CMD,0xC0^(cfg&0x08)); // Mirror Y axis option

Maybe it will help ??

Naturally I have NO idea what 'cfg' is though I suppose it's in the datasheet.

Jay
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Wed Oct 25, 2017 7:21 pm     Reply with quote

temtronic wrote:
You should post a link to the Nokia display datasheet.
The fact some (all ?) are having the problem without a solution seems to suggest the command is wrong ?
Have you asked Nokia ?
Perhaps the 'very cheap on eBay' units are defective OR that command is NOT in their BIOS.

as expected my note to Nokia was read but never answered.
part is an old one, from the time it was a different company
thanks
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Wed Oct 25, 2017 7:32 pm     Reply with quote

Ttelmah wrote:
You are aware that the MX bit is not immediate.

The MY bit just swaps the display immediately.
The MX bit changes how data it then written to the display. So you have to clear the display, set the MX bit, then write the data, which is then displayed reversed.



Hi Ttelmah.
agree on the timing.
I am setting the MX and MY at the very beginning before any data is written on the lcd initialization , as per Fatih GENC driver (https://www.ccsinfo.com/forum/viewtopic.php?t=45358)

it goes as follows?
Code:

void Lcd_Init(void){
output_low(cs);
output_low(rst);
delay_ms(5);         // 5mS so says the stop watch(less than 5ms will not work)
output_high(rst);
Lcd_Write(CMD,0x20); // write VOP register
Lcd_Write(CMD,0x90);
Lcd_Write(CMD,0xA4); // all on/normal display
Lcd_Write(CMD,0x2F); // Power control set(charge pump on/off)
Lcd_Write(CMD,0x40); // set start row address = 0
Lcd_Write(CMD,0xb0); // set Y-address = 0
Lcd_Write(CMD,0x10); // set X-address, upper 3 bits
Lcd_Write(CMD,0x0);  // set X-address, lower 4 bits
////////////////////////////    mirror Y:   /////////////////////////////////
Lcd_Write(CMD,0xC8); // mirror Y axis (about X axis)
////////////////////////////    mirror X;   /////////////////////////////////
Lcd_Write(CMD,0xa1); // Invert screen in horizontal axis
Lcd_Write(CMD,0xac); // set initial row (R0) of the display
Lcd_Write(CMD,0x07);
//Lcd_Write(CMD,0xF9); //
Lcd_Write(CMD,0xaf); // display ON/OFF

Lcd_Clear(); // clear LCD
Lcd_Write(CMD,0xa7); // invert display
delay_ms(100);       
Lcd_Write(CMD,0xa6); // normal display (non inverted)
delay_ms(100);           
}
 

thanks for your note
jujoab
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Wed Oct 25, 2017 8:00 pm     Reply with quote

temtronic wrote:
Found these 'somewhere' on the web...
Code:

Lcd_Write(CMD,0xA6^((cfg&0x02)>>1)); // Invert display option
//Lcd_Write(CMD,0xA0^(cfg&0x01)); // Mirror X axis option
Lcd_Write(CMD,0xC0^(cfg&0x08)); // Mirror Y axis option

Maybe it will help ??

Naturally I have NO idea what 'cfg' is though I suppose it's in the datasheet.

Jay



hi Jay
I failed to discover the note you mention. I also don't know what cfg stands for.

My understanding from the manual on commands to use ( AND WORKING OK):
Lcd_Write(CMD,0xC8); // mirror Y axis (about X axis)
Lcd_Write(CMD,0xC1); // DONT mirror Y axis

On the x axis I tried at LCD initialization following values:
Lcd_Write(CMD,0xC8);
OR
Lcd_Write(CMD,0xC1);
OR
Lcd_Write(CMD,0xC0);
OR
NOT ANY OF THEM
It doesn't make any difference for me.
Thanks for your note.
jujoab
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Oct 26, 2017 1:31 am     Reply with quote

I note that in the data sheet, the 'reversal', is for the current row.
You change the row after setting the reversal. Try setting the row first.
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Thu Oct 26, 2017 6:53 am     Reply with quote

Ttelmah wrote:
I note that in the data sheet, the 'reversal', is for the current row.
You change the row after setting the reversal. Try setting the row first.


Thanks Ttelmah.
I tried as follows, no changes on display results.
Code:

Lcd_Write(CMD,0x40); // set start row address = 0
Lcd_Write(CMD,0xb0); // set Y-address = 0
Lcd_Write(CMD,0x10); // set X-address, upper 3 bits
Lcd_Write(CMD,0x0);  // set X-address, lower 4 bits               
Lcd_Write(CMD,0xC8); // mirror Y axis (about X axis)   
//  Lcd_Write(CMD,0xa1); // Invert screen in horizontal axis       
Lcd_Write(CMD,0xac); // set initial row (R0) of the display   
   
Lcd_Write(CMD,0x07);
                   Lcd_Write(CMD,0xa1); // Invert screen in horizontal axis
//Lcd_Write(CMD,0xF9); //
Lcd_Write(CMD,0xaf); // display ON/OFF
         
                                                           
Lcd_Clear(); // clear LCD
Lcd_Write(CMD,0xa7); // invert display                                     
delay_ms(100);                                         
Lcd_Write(CMD,0xa6); // normal display (non inverted)
delay_ms(100);
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