programming external 93C66 EEPROM with Arduino UNO - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: programming external 93C66 EEPROM with Arduino UNO (/thread-12986.html) |
programming external 93C66 EEPROM with Arduino UNO - Mantix - Sep-22-2018 Hi everyone, I am very new to all this and still figuring it all out. so far I have programmed my Arduino with a sketch for reading/writing of M93Cx6 eeproms and also have Python scripts set up for automation of reading/writing, but the script for writing halts at "INFO:state - Ready. here is the web page I've been following. https://github.com/RiLights/Nissan_skyline_eng_lcd/blob/master/README.md I have been able to dump the ROM to a .Bin from the EEPROM but cannot write to it with a new modified file. bellow is the python script I am using to write the eeprom with ////////////////////////////////////////////////////////////////////////////////// import sys import argparse from sky_setup import logging,serial_port parser = argparse.ArgumentParser() parser.add_argument ("-i", "--input", dest='input_dump', default='temp_eeprom.bin', type=str); args = parser.parse_args() if args.input_dump: bytedata=[] input_dump = args.input_dump with open(input_dump, "rb") as f: byte = f.read(2) while byte != "": # Do stuff with byte. if byte: bytedata.append(byte) byte = f.read(2) serial_port.write('w') logging.info('State - {}'.format(serial_port.readline())) for i in bytedata: serial_port.write(i) logging.debug('Byte: {}'.format(serial_port.readline())) logging.info('State - {}'.format(serial_port.readline())) serial_port.close() |