This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Control MCU Via RS-232 Interface

Hi,Dear All;
Sorry.I posted this message again because this is the detailed informaiton of my project.
I want to write a program to modify the data in AT93C46(EEPROM IC)by controlling the MCU via RS232 interface
from the PC.Do you have any application notes on this subject? And any example codes? Can I implement it with the Hyper Terminal? The MCU I am using is AT89C51/52 by Atmel Corp.
Thanks in advance.

  • Well, this is a 3-wire bus serial eeprom. How to access is is described in the datasheet and it is not very complex, so first you should implement the "actions" described in the datasheet (their waveforms). That is not difficult, just make shure that you don't exceed the maximum bus frequency of 2MHz (usually no problem with a standard 80C51). Make sure, that you check the busy flag (or whatever indicates that a write cycle is presently executed) before you write to the eeprom (again).

    The serial communication is found in many application notes and on free source pages like http://www.8052.com. I could even e-mail you the C51 or some A51 source code for that.

    For data transmission, you should choose something that can detect transmission errors. That can always happen and it would eb bad to have currupted data been written to your EEPROM, right? A prety simple thing is the Intel HEX format. It is easy to understand and provides a checksum at the end of each data line. It is well described in the Keil Assembler/Linker/Tools whatever manual.

    You could also chose a protocoll that is implemented in Hyperterminal such as x-modem or Kermit, but those protocolls are pretty complex and not royalty free. So it is cheaper to write a hex loader and maybe simple terminal program for PC that sends a hex file and in case the micro doesn't acknowledge the reception of a hex line (due to transmission errors), repeat a couple of times the transmission of that line. That will probably not take much longer than 1 or two days of work. Implementing a complex protocol like x- y- or z-modem or kermit will usually take longer and will cost you some money (the receive module from industrial z-modem is US$2000 at http://www.omen.com).

    Take care
    Sven

  • Hi Sven,
    Thanks very much for your guide.
    (1)For the serial communication via RS-232C,Would you please email me the source codes?(Both C51 and A51 for that)
    (2)For the Hex-Loader(Terminal program for the PC),I have no any examples,how to find the references?
    Would u please contact me at this email address? [address omited]
    Regards,
    Youngar