help on meg128 project

Discussion in 'Embedded Systems and Microcontrollers' started by dspcan, Dec 16, 2007.

  1. dspcan

    Thread Starter New Member

    Dec 16, 2007
    6
    0
    I don't know how to construct the circuit, when I try to use the INTERRUPT operation. thank you for your consideration! the problem is described simply in the attached file.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Are you having a problem designing the hardware to produce the interrupt or are you have a problem setting up the ATMEGA128 to handle the interrupt when it occurs?

    hgmjr
     
  3. Papabravo

    Expert

    Feb 24, 2006
    11,084
    2,159
    There are two circuits that you need.
    The first is an encoder which has 320 inputs and 9 outputs. The inputs correspond to the rows and the outputs correspond to The row number which has been activated.
    Code ( (Unknown Language)):
    1.  
    2. ceiling(log2(320)) = 9
    3.  
    For each of the nine outputs you need to write a boolean equation that determines which combination of the 320 inputs is required to turn the output on.

    The second circuit has nine inputs and one output. The output is active whnever any of the inputs is active indicating that a diode has been shutoff.

    For an example of the encoder concept look at the data sheet for a 74LS148 8 to 3 Priority Encoder. This device encodes the 8 lines and it prioritizes them making some inputs have precedence over others.
     
  4. dspcan

    Thread Starter New Member

    Dec 16, 2007
    6
    0
    I want to design the hardware to produce the interrupt signal
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Then the information that papabravo has provided should guide you down the correct path.

    hgmjr
     
  6. dspcan

    Thread Starter New Member

    Dec 16, 2007
    6
    0
    -------------thank you very much ,I think I need two FPGA/CPLD to accomplish such circuits. thanks ,sir
     
Loading...