Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SMC driven LCD
PostPosted: Tue Jul 31, 2012 12:05 pm 
Offline

Joined: Tue Mar 13, 2012 5:19 pm
Posts: 12
Hello,
I have general question, to which I unfortunately cannot find answer anywhere. I use SMC to manage communication with the LCD display. I have it set up (cycle definitions and peripheral funcs enabled), but I don't know what actually happens when I read/write to the designated external memory area. Lets say I configured SMC1, and I have defined

Code:
#define LCD_BASE        (0x61000000UL)
#define LCD_REG8   (*((volatile unsigned char  *)(LCD_BASE  )))
#define LCD_DAT8   (*((volatile unsigned char  *)(LCD_BASE+2)))


What happens with read, write and cmd/data LCD signals, when I read/write this address, and address+2 (examples from SAM3S development kit library), for example

Code:
LCD_REG8 = 0x01;
LCD_DAT8 = 0x02;
uint8_t c = LCD_DAT8;


Thanks
Entik


Top
 Profile  
 
 Post subject: Re: SMC driven LCD
PostPosted: Tue Jul 31, 2012 2:05 pm 
Offline

Joined: Wed May 26, 2010 9:46 am
Posts: 8
Hi Entik,

Can't really find the question in here...

In general, the SMC "translates" the memory read / writes into transitions of Address / Data / WT / RD / CS line.

for example, by writing the following command: LCD_REG8 = 0x01;

the Address lines will be set to: 0x61000000UL
Data line to: 0x01
and the WT and CS lines will be asserted to accomplish the transaction.

iT


Top
 Profile  
 
 Post subject: Re: SMC driven LCD
PostPosted: Wed Aug 01, 2012 10:26 am 
Offline

Joined: Tue Mar 13, 2012 5:19 pm
Posts: 12
Sorry for the shady question, I'll try to be more specific. LCD receives command and data bytes, the difference between them is that one of the controlling wires (named RS, C/D, ...) is low for cmd and high for data. My questions should have been:
How do I influence this? In code from development kit, LCD_BASE address was written to send command, LCD_BASE+2 was written to send data. Why +2? And are there any other functions, when I write to +1, +3, +4, ... address?

Thanks
Entik

Edit: Ok, I figured out something it as soon as I sent this post. The LCD RS wire is connected to A1 pin of the addressing bus, so when I write to 0x61000002 address, this pin is set to 1 and makes the difference between command and data. So no need to answer to this post and thank you for pointing me the right direction... ;)


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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
You cannot post attachments in this forum

Search for:
Jump to: