Sample/Example Code for I2C Download Protocol

I am starting to implement the I2C Download Protocol [described in AN-806] for the ADuC7020 using a bigger microcontroller - ADuC7128. The Boot Mode(BM) pin and the reset are controlled by the 7128 to put the ADuC7020i into Boot Mode.

I am wondering if there is any source/example code available as a starting point?

  • 0
    •  Analog Employees 
    on Mar 7, 2011 11:03 AM


    ADI provide the PC based program which communicates with a USB based dongle to do the I2C communications.

    That’s a different model to what you want to do and may hinder progress rather than help. (Various USB and dongle communications in the mix).

    The base protocol code is actually pretty simple, I could strip the necessary bits out and port to an embedded ADuC712x system if that helps.

    I mightn’t get to that for a while though, what sort of timeframe would it be useful to you in?

  • Hi Patrick,

    I need to have it in 4 weeks. I have already started to work on the protocol but if the source code for the PC based program is available that would be helpful.


  • 0
    •  Analog Employees 
    on Mar 8, 2011 1:01 PM

    I just PMed you some relevant code, for implementing AN-806.

    It is stripped from the PC utility source, and re-formatted.

    You can use it as a reference, but please be aware that I haven’t even re-compiled it or tested it on an embedded system yet.

    I will do further proofing in the coming days\weeks and will post it to this forum once complete. For now, I hope what I have just provided will give you some acceleration in your own work.

  • Hi

    Can i get the source code for AN-806 to download via pc i2c?



  • Hi

    I am using the Pickit I2C dongle But writing my own Program in C# to download . I get the 24 Byte ID reply after sending 04 08. But thereafter any other command fails no response i.e. I don't read an ACK or BEL char. afterwards. I am using the 7020 62i without a crystal and using the internal clock , Is my speed 100Khz the correct speed to use. Also I could not even do a mass erase. sending add 0x00000000 and 00 pages. Do I have to read continuously until I get an ACK. or do I need to set a timeout. and then read ?

    Please also send some command examples and startup sequence in hex format. I do believe my CS is correct.

    I have managed to over write 0x80014 with garbage using a bogus hex file. and can't recover. Any Ideas please

    How many pages does the 7020 have ? I assume 124 and a page size is 0x200 512 bytes??

    What flash address do I start programming my hexfile into.