EPWrite location, data

Command Availability:

Available on all Microchip PIC and Atmel AVR microcontrollers with EEPROM data memory.


EPWrite is used to write information to the EEPROM data storage, so that it can be accessed later by a programmer on the PC, or by the EPRead command. location represents the location to read data from, and varies from one chip to another. data is the data that is to be written to the EEPROM, and can be a value or a variable.


    #chip 16F819, 8
    #config osc = int

    'Set the input pin direction
    Dir PORTA.0 In

    'Loop to take readings until the EEPROM is full
    For CurrentAddress = 0 to 255

    'Take a reading and log it
    EPWrite CurrentAddress, ReadAD(AN0)

    'Wait 10 minutes before getting another reading
    Wait 10 min


For more help, see EPRead