2006-12-21 04:10 PM
2005-10-03 09:32 PM
Hello all,
I try to drive a 320x240 pixel graphic display with my STR710 microcontroller. I want to do this via the EMI. I have to drive the controller of the display(S1D13700 EPSON). See schematic below: At first: Do I have to configure the CS.0(P2.0) as alternate function for the CS.0 function?(I think so) The problem is that I have connected the CS# of the display to CS.0 of the STR7 Later on in the design process I read in the datasheet that the CS.0 can only adress 16 bits wide(data) memory. In my schematic you can see that my(indirecte) memory interface to the display uses only a 8 bits wide databus. Can it give any problems that the hardware of the EMI wants to write 16 bits wide to the displaycontroller while the software does only writes 8 bits wide?(D8 till D15 are even not connected in hardware) Now I have some problems programming the EMI, especially the BCONx registers. I want to enable CS.0, give it 15 wait states between read and write operations. According to the datasheet CS.0 works only 16 bits wide. In code I putted: STR7h /*defining the register adresses in the header file*/ #define EMI_BASE 0x60000000 #define EMI_BCON0 (*(REG32 EMI_BASE)) Display.c /*configure BCON0 register*/ EMI_BCON0 = 0x803D; If I run this code the JTAG communication stop with the error: JTAG Communication Failure *** error 122: AGDI: memory read failed (0x60000000) JTAG Communication Failure JTAG Communication Failure JTAG Communication Failure What is wrong? the BCON0 register is at adress 0x6000 0000 or not? What does the JTAG do in that memory area? Somebody ideas? ________________ Attachments : indirecte_mem_intf.JPG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtK2&d=%2Fa%2F0X0000000aLb%2F4ACwTk2in1PYb3esdQNL0GmiXCTaagjTbJ3_dSKbwzU&asPdf=false2005-10-03 10:12 PM
I have an 8 bit lcd controller connected in the same way as you.
Curiously enough I checked my BCON settings and I have it configured as an 8 bit port ( EMI->BCON0=0x8014; ), altough I assume this is ignored as like you say it is 16 bits only. Yes CS0 needs to be an alternate function. I have no problems with this setup. The top 8 data bits are not connected. So you must ignore the top 8 bits of any 16 bit reads. As it is a 16 bit port you need to use A1 for the command/data. All access is on 16 bit boudary. I use the following :- typedef volatile struct { vu16 COMMAND; vu16 DATA; } COLOURLCD_TypeDef; #define CSn0_BASE 0x60000000 #define LCD ((COLOURLCD_TypeDef *)CSn0_BASE) I dont know why you have problems with the JTAG. I use the Ashling dev tools and had no such problems.2005-10-04 02:12 AM
Hi ben_fmr,
Perhaps is your display also working with the indirecte adress mode. I don't understand how it works. Can you explain briefly or do you have a document about it? Thanks, Jimmey2005-10-04 03:03 AM
not sure exactly what you want to know.
The LCD controller is an Hitachi HD66773 ( it is actually a 128x160 pixel colour lcd module of the type found in many mobile phones). D0-D7 are connected to the databus. WR0 (pin 137) Rdn(pin 2), A1& CSn.0 are connected. I have a seperate GPIO line to control reset. The controller use and Index register /Data register arrangment to control the display. Most seem to work this way. Although it is driven from an 8 bit bus, the controller is expecting 16 bits (internally the registers are 16 bits) so I need to do 2 writes. so for e.g to write data to the display ram I do LCD->COMMAND=0x00; LCD->COMMAND=0x22; /* select write data register */ for ( loop for data ) { LCD->DATA=data; LCD->DATA=data; /* internal address is auto incremented */ } does that help any? One other thing I am just writing to the display, dont do any reads.2005-10-05 06:50 AM
Hi and thanks for your reply,
I know now that to controle the display you have to send a command first. This is done by putting the pins A0, WE, RD in the 1,0,1 state. (indication a command will be present on the databus). After the command which indicates the target register the datasettings for that particular register are send in bytes. My problem is that I don't know how to controle the CS.0,A0,WR,RD pins of the STR710. I have no external memory at all, only the display(S1D13700) is connected to the EMI.(in indirect memory bus config) I know that I have to adress memory in the 0x60000000-0x600FFFFFF range to activate the CS.0 pin. How I ''control'' the A0, RD or WR pins I don't know. This is my problem, do you know? Regards, Jimmey2005-10-05 07:39 PM
Ah I see, sorry.
The control signals are done automatically when you read/write to the memory segment. Also if you are using Csn.0 (16 bit data bus) you need to use the A1 address line as all read/writes are 16 bits. I could be wrong on this. So read/write to address 0x60000000 A1 is low A read/write to address 0x60000002 A1 is high2005-10-06 10:53 PM
Thanks for your last message ben_fnr. It containt my last missing information.
I have the display up and running now. :) Regards, Jimmey2006-12-13 04:59 PM
Hello jimmey..
I am tryin to interface a grphical LCD 12864 COG1 with the inbuilt driver chip (SSD1825) to STR710FZ2.... I cant figure out how to make connections to the STR.. My pins cominf from LCD are.. A0,/WR,/RD,RESET, and 8 data bit bus. Kindly tell me how to make connections so that i can make minimum use of The GPIO pins and maximum use of EMI interface.. Seeking your urgent concern Regards.. Sany2006-12-13 06:40 PM
sorry for the mistake ....but the chip is SSD1815....
please help....