DSPRelated.com
Forums

Re: [Using EMIF expansion port as digital output_ finally :)

Started by Jeff Brower November 21, 2010
Saadeq-

> http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/74705/271855.aspx#271855

Very glad to hear you got it working! Persistence and perseverance count for half (or more) in engineering.

I found that on pg 362 of Rulph Chassaing's book there is a mention of pin 75:

http://books.google.com/books?id=hrlRFMh-dgYC&pg=PA362&lpg=PA362&dq=rulph+chassaing+Pin+75&source=bl&ots=oPtc0wIFxF&sig=1PSxaSr-pqH6OTQ5-c_UJJv6U8k&hl=en&ei=qILpTLxSxZyWB-zKpfML&sa=X&oi=book_result&ct=result&resnum=1&vedBgQ6AEwAA#v=onepage&q&fse

This is something that's good to keep in mind when other questions like this come up in the future.

-Jeff

>  
> Excellent !
> Congratulations :)
> Well done !
>  
> I thank you so very much for your helps as well as other guys from DSP-related groups who helped me to success in
> this project.
> Tonight is one of the best nights of my life !
> I feel like I'm in the air :))
> I'm working on different DSP project via TMS320C6713-DSK for like 2 years, but I had a little problem with this
> project which was unbelievable !
> I feel like a weight has been lifted off my shoulders and I can put my mental and physical energy into some huge
> steps instead.
> It was very odd how could I make it ! but I thank you all so much :)
> As matter of fact, It's no Nobel, but to me ; it was a gift from heaven the way I could afford this problem :)
> Eventually, it occurred to me that my code must be true and sufficient; my hardware was authentic as well, so I just
> found out that I should check only CE1, CE2, CE3 and other read/write/output pins of my DSK. I've all EMIF manuals of
> TI Inc, and I've tested about 4-5 hundreds of lines for configuring EMIF registers, but I wasn't right !
> Anyway, I've tested my whole interfaced board and my connections, my whole design, from software to hardware, then I
> found out it will work
> just by pulling down (connect the pin to GND) the Pin-75 of (peripheral expansion interface)PCI (NOT EMIF) connector.
> then both of my hardwares (the one with 74ls244 and LEDs, and the one with microcontroller directly interfaced to EMIF
> without any buffer or latch)
> will work perfectly. And of course If do not put your main function in an infinite loop, you should hold the data by a
> latch or flip-flop.
> To sum up, I should state that you do not need any gel file (except the default one for startup) or CSL function or
> ... to config EMIF registers individually. The headers I've included are enough for a complete signal processing
> project using codec (for analog inputs and outputs), EMIF expansion (as digital output), etc. So notice that this code
> is very short but much more clever than what brilliant minds might think !
> Thank you TI,
> Best Regards,
> r...@ieee.org
> This code is 100 % demonstrated and is an adequetly tested code on C6713 Spectrum Digital DSK :
>  
> // main.c ******************* r...@ieee.org
> #include "dsk6713.h"
> #include "DSK6713_AIC23.h"  //codec-DSK support file
> Uint32 fs=DSK6713_AIC23_FREQ_48KHZ; //set sampling rate
> #define DSK6713_AIC23_INPUT_MIC 0x0015
> #define DSK6713_AIC23_INPUT_LINE 0x0011
> Uint16 inputsource=DSK6713_AIC23_INPUT_MIC;
> #include
> #include
> #include
> #include
> #include
>  
> #define OUTPUT 0xA0000000  // EMIF ADDRESS for CE2 which will be enabled by pin 78 of EMIF connector
> int *output = (int*)OUTPUT; // Declare a pointer to EMIF's address
> void main()
> {       
> while (1)
> {
>         // Write a 32-bit digital value to the pins
>         *output = 0xF001100F; // Test value
> }
> }
>
>  
> Best  Regards,
> M.  Saadeq  Rafieee
> IEEE  Signal  Processing  Society  &  IEEE  Communication  Society  Member
> r...@ieee.org
> On  behalf  of  IEEE  Centre  of  IAUM
> IEEE.IAUMg.com
> IEEE.mshdiau.ac.ir
>  
>
> --- On Fri, 11/19/10, Jeff Brower wrote:
> From: Jeff Brower
> Subject: Re: [c6x] [Using EMIF expansion port as digital output_full code]
> To: "Richard Williams"
> Cc: c..., r...@ieee.org
> Date: Friday, November 19, 2010, 8:28 PM
>  
>
> Richard-
>
> I think he would need the basic DSK C6713 .gel file. My concern is that he didn't add anything to the .gel file (or
> otherwise, using some run-time code) to enable the daughtercard CEn space.
>
> -Jeff
>
>> If I may ask, why do you need a gel file?
>> If we know reason why you need a gel file, then we can advise on gel file
>> contents.
>>
>> Your added chip, 74hc244, is not directly connected to the pins of the DSP.
>> therefore, the main concern for programming is the I/0 address (either
>> 0x90000000 or 0xa0000000) and assuring that the appropriate CSx configuration
>> registers are initialized to set the 74hc244 CS pins low when the desired
>> address range is accessed.
>>
>> A gel file is useful for:
>> --initial development when some 'extra' addressable device (like SDRAM/FLASH)
>> is attached to the DSP address/data bus lines.
>>
>> startup/connect Gel files are used to pre-set certain DSP registers:
>> --to initialize the CCS debugger address mapping.
>> --to initialize the DSP FLASH loader address mapping.
>> --to initialize the PLL and similar peripheral devices
>> --and similar operations.
>>
>> A gel file is not available outside the development environment, so should not
>> be depended upon.
>>
>> BTW:
>> 1) I disable any gel file that is not specifically for the CCS address
>> mapping, so they are not executed at 'connect' time.
>> 2) I do use gel files to run macros to implement multi step, repeatable debug
>> sequences.
>>
>> R. Williams
>> ---------- Original Message -----------
>> From: Wave Waves
>> To: c..., Jeff Brower ,
>> r...@lewiscounty.com, r...@ieee.org
>> Sent: Fri, 19 Nov 2010 01:20:02 -0800 (PST)
>> Subject: Re: [c6x] [Using EMIF expansion port as digital output_full code]
>>
>>> Dear Richard , Jeff
>>>  
>>> I thank you so very much for your helps.
>>> I really really appreciate your help.
>>>  
>>> BTW, I said 74hc245 and LVDTH16245 which are both bi-directional
>>> buffers are the same exactly, so we have to just use 74hc244 on my
>>> interface board.   So I will test and check everything twice by your
>>> considerations and will let you know  about it. Could you help me
>>> with the gel file required code as well, please ?   Thanks a lot
>>> again.   you guys are the bests :)
>>>
>>> --- On Thu, 11/4/10, Jeff Brower wrote:
>>>
>>> From: Jeff Brower
>>> Subject: Re: [c6x] [Using EMIF expansion port as digital output_full
>>> code please...] To: "Richard Williams" Cc:
>>> "Wave" , c... Date: Thursday,
>>> November 4, 2010, 10:20 PM
>>>
>>>  
>>>
>>> Richard-
>>>
>>> I would add that for the DSK C6713 board, (used in Rulph Chassaing
>>> book examples), the .gel file needs to be modified to enable the
>>> appropriate CEn space used by the expansion connectors.
>>>
>>> Suggest that Saadeq Rafieee (Mr. Wave) post his .gel file. If the
>>> expansion EMIF is not enabled and set for async operation, that would
>>> be an obvious problem.
>>>
>>> -Jeff
>>>
>>> > First, a 74HC244 is a dual 4 bit line driver.
>>> > the LVTH16245A is a dual 8 bit bi-directional line driver.
>>> > *I* would not call them 'exactly like'.
>>> >
>>> > ----------------------------
>>> > Have you placed a logic analyzer on the LVDTH16245A to determine if it is
>> being
>>> > enabled and that the appropriate data is being passed into/outof the chip?
>>> >
>>> > If the above check fails, then the EMIF registers need to be initialized.
>>> > *I* would put a forever loop around the assignment statement so you can
>> see the
>>> > activity happening without having to catch a single instance of the
>> activity.
>>> >
>>> > I would trigger on the 1/OE and/or the 2/OE signals.
>>> > --
>>> > Confirm that the data write is getting to the LVTH16245A,
>>> > If not, then the EMIF registers need to be appropriately initialized.
>>> > --
>>> > After confirmation that the data write is getting to the LVTH16245A,
>>> > then I would place a logic analyzer on the pins of the DSK port.
>>> > --
>>> > Confirm that the data write is getting to the pins of the DSK port.
>>> > This needs to include...
>>> > --the signals that will go to the NAn lines of the 74HC244 chip.
>>> > --the signals that will go to the 1/OE and 2/OE lines of the 74HC244 chip.
>>> > this will probably be the appropriate /CS signal from the DSP.
>>> > --the signals that will go to the 1An and 2An lines of the 74HC244 chip.
>>> >
>>> > Also connect the logic anaylzer to the corresponding pins of the 74HC244
>> chip
>>> > to assure the data is going to the correct pins.
>>> >
>>> > One more thing.
>>> > Assure the power and ground are getting to the 74HC244 chip.
>>> >
>>> > --------------------
>>> > If the EMIF interface needs to be initialized,
>>> > then you should read the T.I. SPRA433E application report.
>>> >
>>> > You might want to read:
>>> >
>> >> a
>>> > spx>
>>> > which, amongst other things says the EMIF asynchronous mode of operation
>> begins
>>> > at address 0x90000000, rather than using the synchronous mode of operation
>> which
>>> > begins at address 0xA0000000.
>>> > I would suggest using the asynchronous mode as otherwise the device/circuit
>>> > attached to the EMIF interface has to properly perform all the needed
>> handshake
>>> > to be able to transfer any data.
>>> >
>>> >
>>> >
>>> > R. Williams
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ---------- Original Message -----------
>>> > From: Wave Waves
>>> > To: Richard Williams , c...
>>> > Sent: Thu, 4 Nov 2010 00:38:53 -0700 (PDT)
>>> > Subject: Re: [c6x] [Using EMIF expansion port as digital output_full code
>>> > please...]
>>> >
>>> >> Dear Williams,
>>> >> Thanks a lot.
>>> >> LVDTH16245A is an two direction buffer which is already used in
>>> >> TMS320C6713 DSK, so there's no need to use another two direction
>>> >> beffer after the 80 pins EMIF connector for this board. 74hc245 is
>>> >> something exactly like LVDTH16245A, so it's not necessary. As Just
>>> >> like mentioned in chassing's book, 74hc244 should work, and I'm so
>>> >> professional in electronic, so the problem con not be from my hardware,
>>> >> it has something to do with my code only. Thank you very much.  
>>> >>
>>> >> --- On Thu, 11/4/10, Richard Williams wrote:
>>> >>
>>> >> From: Richard Williams
>>> >> Subject: Re: [c6x] [Using EMIF expansion port as digital output_full
>>> >> code please...] To: "Wave" ,
>>> >> c... Date: Thursday, November 4, 2010, 4:41 AM
>>> >>
>>> >> Wave,
>>> >>
>>> >> According to the referenced posting...
>>> >> Each of the outputs for the EMIF interface need to be buffered because
>>> >> the outputs have little ability to drive a load. Therefore, I suspect
>>> >> the main problem is inadequate 'glue' logic between the EMIF pins and
>>> >> the (74HC244/74HC245).  BTW: which is correct, 74HC244 or 74HC245?
>>> >>
>>> >> R. Williams
>>> >>
>>> >> ---------- Original Message -----------
>>> >> From: "Wave"
>>> >> To: c...
>>> >> Sent: Wed, 03 Nov 2010 19:47:51 -0000
>>> >> Subject: [c6x] [Using EMIF expansion port as digital output_full code
>>> > please...]
>>> >>
>>> >> > Dear David Valencia,
>>> >> >
>>> >> > As I saw the solution as below :
>>> >> >
>>> >> > http://www.dsprelated.com/showcode/9.php
>>> >> >
>>> >> > And  as I've mailed hundereds of inquiries in dsprelated c6x group
>>> >> > about this "EMIF as an output" application of EMIF which is an
>>> >> > exercise in Rulph Chassing book , but no one could help me with that.
>>> >> > It's been a year that I 'm working on this project but I still
>>> >> > couldn't run this program truly. I also implemented this hardware via
>>> >> > 74hC244 as mentioned in chassing's book. but I need your "output.h"
>>> >> > and your whole project for this code please. so please help me we this,
>>> >> >  I'll sincerely appreciate that. pleaseeeee... I need the full codes
>>> >> > of this project.
>>> >> >
>>> >> > Best Regards,
>>> >> > Saadeq Rafieee
>>> >> > r...@ieee.org

_____________________________________