Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Software I2C in ASM

Status
Not open for further replies.

dak246

Member
I just finished making a successful rs-232 interface and now i want to add an I2C interface between my microcontroller and a memory IC. I want code my own virtual I2C interface instead of using the hardware. Im not looking for anything to specific, just a general reference about coding somthing like this in ASM ( or C, i could use it to get an idea and then redo it in ASM ). Can someone point me in the right direction? Also any suggestions on what type of memory IC to use? 4mb should be sufficient, but the more the better. By the way im using a pic16f877. Thanks.
 
Yes, my tutorials include what you want, assembler routines for master mode I2C - but most EEPROM's are far smaller than 4Mb, this is more of a FLASH memory size, which is a totally different interface.
 
Thanks i just took a look at the some of the zip files from your tutorials and it looks like it will be a big help. For some reason I think I overlooked these zip files last time I was on your site. As far as memory size, could I perhaps use a combination of EEPROM's and set the interface up with multiple slaves, and use addresses that designate both what chip and then the address on that chip? Or would it be better to look into using flash memory instead?
 
dak246 said:
Thanks i just took a look at the some of the zip files from your tutorials and it looks like it will be a big help. For some reason I think I overlooked these zip files last time I was on your site. As far as memory size, could I perhaps use a combination of EEPROM's and set the interface up with multiple slaves, and use addresses that designate both what chip and then the address on that chip? Or would it be better to look into using flash memory instead?

Yes, you can use multiple EEPROM's, what are you actually wanting to store?.
 
I want store a few minutes of audio in the EEPROM's. Im doing this so I can learn A/D conversion at the same time.
 
No i didnt actually. How slow. By your response im assuming to slow for audio? Is there somthing else you can recommend? Thanks for your responses by the way.
 
dak246 said:
No i didnt actually. How slow. By your response im assuming to slow for audio? Is there somthing else you can recommend? Thanks for your responses by the way.

The datasheet for a 24LC256 (256KBit EEPROM) gives a maximum 5mS write cycle, although you can write using a paging mode which completes more than byte at a time in a single cycle.

I think FLASH memories are probably better, faster read/write times and larger capacity - but using a totally different interface.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top