MCUmall EPROM BIOS Chip Burner Forum
MCUmall EPROM BIOS Chip Burner Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 MCUmall Forums
 Using The Enhanced/Dual power Willem Programmer
 writing to 93c46 serial EEPROM

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
mylog Posted - 09/02/2008 : 00:49:18
I have an M16C, a FT245BM USB interface IC and a 93C46 Serial EEPROM. I am using the MCU to write to the EEPROM on run-time. What I need to do is to overwrite one byte of data on a specific address on the EEPROM. Seemingly, I can do it successfully because I can see the change on that address point when I read the content of the EEPROM using MPROG. So far everything is fine. My problem is that FTDI drivers cannot recognize the device when I reset the USB or on the next power on after the writing to the EEPROM using program flow. However, when I write to the EEPROM manually using MPROG, I do not experience this problem. Why do you think the drivers cannot recognize the device although the content of the EEPROM in both situations (writing using MPROG and program flow) exactly matches.


Here is my Write Enable (EWEN) and Write code:

*************************

void EEpromEWEN(void)
{ char j;
char address=0x3F;
prc2=1;
E2P_DATA_DIR=1;
prc2=0;
E2P_CS=1;
write_1_();//start bit
write_0_();//0 ewen opcode
write_0_(); //0 ewen opcode
for(j=0;j<6;j++){ //send the adress
if((address>>(5-j)) & 0x01)E2P_DATA=1;
else E2P_DATA=0;
E2P_CLOCK=0;
eepromdelay();
E2P_CLOCK=1;
eepromdelay();
}
E2P_DATA=0;
E2P_CLOCK=0;
E2P_CS=0;
}

********************************

void WrEEpromData(char address, const int *ptr)
{ int EpromWriteWord;
char j;
EpromWriteWord=*ptr;
prc2=1;
E2P_DATA_DIR=1;
prc2=0;
E2P_CS=1;
write_1_(); //start bit
write_0_();
write_1_(); //write opcode

for(j=0;j<6;j++){
if((address>>(5-j)) & 0x01)E2P_DATA=1;
else E2P_DATA=0;
E2P_CLOCK=0;
eepromdelay();
E2P_CLOCK=1;
eepromdelay();
}
for(j=0;j<16;j++)
{
if(EpromWriteWord& 0x8000)E2P_DATA=1;
else E2P_DATA=0;
E2P_CLOCK=0;
eepromdelay();
E2P_CLOCK=1;
eepromdelay();
EpromWriteWord=EpromWriteWord<<1;
}
E2P_DATA=0;
E2P_CLOCK=0;
E2P_CS=0;
}

*************************

void write_1_(void)
{
E2P_CLOCK=0;
E2P_DATA=1;
eepromdelay();
E2P_CLOCK=1;
eepromdelay();
E2P_CLOCK=0;
}
**********************
void write_0_(void)
{
E2P_CLOCK=0;
E2P_DATA=0;
eepromdelay();
E2P_CLOCK=1;
eepromdelay();
E2P_CLOCK=0;//
}

************************


I appreciate your quick reply.

Many thanks.

MCUmall EPROM BIOS Chip Burner Forum © Copyright 2003 - 2009 Mcumall Electronics Inc. Go To Top Of Page
Generated in 0.1 sec. Snitz Forums 2000