Skip to content

Bug: writeEnable doesn't work with Adress widths greater than 8 bits. #1

@MarkGen

Description

@MarkGen

An 93LC86C EEPROM has an address width of 10 or 11 bits depending upon configuration. Further the writeEnable command expects two 1's as the MSB of data in combination with the Op code. The writeEnable function sends 0xFF as data to the transmit function, i.e only eight bits of 1's. For and address width greater than eight, leading zeros are then transmitted as MSB's. The fix is to change the data value being sent writeEnable to the transmit function from an 8 bit value of 0xFF, to a 16bit value of 0xFFFF.

void MicrowireEEPROM::writeEnable(void)
{
send_opcode(0);
//---------------------------------
//transmit(0xFF, ADDRWIDTH); Original statement.
//
//MG - Increased 1's data from 8 bits to 16bit
//EEPROM 93LC86 has 11/10 bit Address width
//0xFF is 0000 0000 1111 1111 results in sending
//leading zeros for ADW's > 8
//0xFFFF fills all 16 bits of the INT with 1's
//0xFFFF = 1111 1111 1111 1111
transmit(0xFFFF, ADDRWIDTH);
digitalWrite(CS, LOW);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions