Reading out data from octal buffer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Online

    Reading out data from octal buffer

    Hi all,
    At the moment I'm using a Altera MAX and MAX+plus2 graphical design
    software.
    I'm using the following parts inside the altera:
    Octal flipflop 74HC273
    AddressDecoder 74HC154
    Octal Buffer 74HC541

    First I place an address at the input of the first FF. This address is
    inserted into the AdrDec. Then I put data on the input of a
    register(second FF). The output of the AdrDec selects this register
    and clocks the data through. This all works fine. I connected some
    leds to the output of the register so I can verify the data.

    #define DATA PORTB // PORTB is DATAport
    DATA = adr; // Set Address
    CTRL_OUT &= ~0x04; // Enable AS -> Clock Adr into AdrDec
    CTRL_OUT |= 0x04; // Disable AS

    DATA = dat; // Set Data
    CTRL_OUT &= ~0x02; // Enable DS -> Clock Data through FF
    CTRL_OUT |= 0x02; // Disable DS

    Next thing I wanna do is get data from a Buffer. I used MAX+plus2 to
    connect the inputs of the Buffer to GND or VCC (10101111). The first
    OE of the FF is connected to GND and the second OE is connected to a
    output of the AdrDec. Again, first I set the address. Then I clock the
    Adr into the AdrDec. After that I define PORTB as input. I enable the
    buffer and try to read data from the buffer. This is where is goes
    wrong. The data which I read from the buffer isn't the same as the one
    I set at the input (10101111)

    #define DATA PORTB // PORTB is DATAport
    DATA = adr; // Set Address
    CTRL_OUT &= ~0x04; // Enable AS -> Clock Adr into AdrDec
    CTRL_OUT |= 0x04; // Disable AS

    OEB = 0x00; // PORTB is input
    CTRL_OUT &= ~0x02; // Enable DS -> Enable Buffer
    datget = PINSB; // Get Data
    CTRL_OUT |= 0x02; // Disable DS
    OEB = 0xFF; // PORTB is output

    How is this possible? Is there something wrong with the order of
    handling things?
    Hope someone can help me out with this one

    thanks in advance,
    Chris
  • Peter Jansson

    #2
    off-topic: Re: Reading out data from octal buffer

    This issue is off-topic as you may read in the C++ FAQ.
    You can get the FAQ at:


    Please read the FAQ.

    Regards,
    Peter Jansson


    Comment

    Working...