This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using external Peripheral Interface of tm4cekcpdt micro-controllers

Other Parts Discussed in Thread: TM4C129EKCPDT

Hi,

Currently I am using a 8051 micro-controller for interfacing one of my devices using data/ address bus multiplexing. Now I am planning to use this feature from tiva microcontroller tm4cekcpdt. I have come across the external peripheral interface host mode 8 bus feature.  For getting started I would like to know how can I use this feature for generating 8 addresses for interfacing various 8 devices to the controller. 

Regards

Dhanush

  • Hello Dhanush,

    Simple question:

    1. What is the address range of each of the 8 devices?

    Once that is known then you can use the upper unused address bits to create a CS for the other devices via an external decoder

    Or you can use the same in GPIO mode as CS for each of the external devices.

    Regards
    Amit
  • MCUs which include EPI (data & address bus) are usually larger, more complex & more expensive than their smaller, simpler brethren.

    May I suggest an alternative - allowing your use of this vendor's (and others) smaller/simpler/less costly MCUs?   Simple shift register should enable you to harvest 8 unique "chip selects" - to accommodate 8 external peripheral ICs.  Three or four signals from one MCU port for that "shifter" control - along w/an entire, separate port to serve as bi-directional data port - should complete your requirement.  It is also possible for you to dedicate one Port for chip-select - the 2nd Port for data transfer.

    Our small, tech firm's experience teaches that use of EPI yields best results when either:

    a) external memory

    b) drive of a display

    is required.

    For simpler applications - the complexity of EPI may reduce your "gain" from its utilization.

  • Hi Amit,

    The address range for each device is 16Kb. So now how can I use upper unused address bits for this purpose.

    Regards
    Dhanush
  • Hello Dhanush,

    The simplest approach would be to have GPIO control for CS. Before access to one of the peripheral is started, the CS is asserted to its active state and then CPU performs the EPI access. Post that the CS is deasserted.

    Regards
    Amit
  • Hi Amit,

    Thank you for your Assistance.

    In tm4c129ekcpdt datasheet it has been mentioned that the EPI host bus 8 can be used in three modes.
    ADMUX, ADNOMUX and XFIFO. Of these three modes the mode ADNOMUX does provide a separate lines for data and Address. But it clearly states that it a continuous read mode. Can I use this mode for reading and writing data to the device.
    As mentioned in the above post you mean to say for each Device I should use a different CS signal using GPIO control and then 8 data lines for EPI access. Can't I generate 8 addresses using 3 address lines .
    Also is speed a concern when using EPI since I can accross the Term EPIBAUD in the datasheet.

    Regards
    Dhanush
  • Hello Dhanush

    It depends on what the end devices are and that has not been made clear in the post so far.

    Regards
    Amit
  • Hi Amit,

    My end devices are graphic LCD and a LCD. Can I get an Example driver code for EPI module used in Host Bus 8 mode.

    Regards
  • Hello Dhanush,

    Without details of LCD interface, I cannot suggest any kind of code. Every interface has it's nuance and in this case if you think HB8 ADNOMUX is good to begin with, I would suggest

    1. Without mounting the LCD, write a code for EPI in HB8 mode, compile and load it.
    2. Using a LA see if the code generates the input as expected by the LCD Panel.

    Regards
    Amit
  • Hi Amit,

    Here I just need to implement a 8 bit data bus with generating some address using address line without using ale pin as I can in 8051 microcontroller.

    Regards
    Dhanush
  • Hi Amit,

    Ten "back-forth" posts in - and poster's barely made any progress.

    KISS - kicked to the curb in favor of EPI - easily solves via:

    a) One MCU Port dedicated to Lcd bus (may be bi-directional)

    b) 2nd MCU Port dedicated to various chip select, strobe, Adr, R/W - as (still secret) Lcd requires

    Five speed - synchromesh gear-box - may not make most sense - when "training wheels" have (barely) been removed...

  • Hello Dhanush

    Let me clarify my point. You have X LCD with 8051 uC interfaced in Y manner. So the probability of me getting it right is 1/XY. Now I write a code for HB8 without knowing what X and Y are, what are the chances that you would get it working?

    I would suggest on top of my previous post:

    1. Read data sheet and identify which GPIOs are required
    2. Without mounting the LCD, write a code for EPI in HB8 mode, compile and load it.
    3. Using a LA see if the code generates the input as expected by the LCD Panel.

    If the code does not work (let me specify, if it does not match the expected output) attach the code for review, and this time with the expected output waveform (can be drawn in MS Paint)

    Regards
    Amit
  • Hello cb1

    Yes. The poster has not made any progress on taking advice of "start it yourself", we will help along the way.

    Regards
    Amit
  • Hi Amit,

    Having "some" (ok - a lot) of real-world, Display Biz experience - I'd always vote for KISS.

    The mystery of "8 chip selects" aside - it is so much easier to make text and small graphic displays work via (non-EPI methods):

    a) one port dedicated to data

    b) 2nd port dedicated to control, strobes, adr etc.

    When success results from this method - each/every of the (necessary) facts you've been seeking - will have emerged and been satisfied.  Only then - EPI.

    Present method - with "training wheels" greatly impeding forward progress - points strongly to, "Not ending well..."