• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

Code to read and write to EPROM

Hi,

Can someone help me with a snippet or code that will allow us to read and write data to an EPROM in either C or C++

Biren
0
birenshukla
Asked:
birenshukla
3 Solutions
 
BrianGEFF719Commented:
What type of EEPROM?


Brian
0
 
birenshuklaAuthor Commented:
EEPROM is Atmel 24C family.

Basically, we are going to use hte i square C protocol to program the EEPROM. It is a hardware device that attaches to a computer's USB that serves as a license key.
0
 
Jaime OlivaresCommented:
Appears to be you are trying to crack a license dongle.
Besides this, code to read the EPROM will be useless because it is protected by USB logic, you will need to learn how to "talk" to the device through the USB driver. That's not a trivial task if you are not the device's designer.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
birenshuklaAuthor Commented:
We are designing the device. We are the manufacturer. I just want to know how to achieve this task of being able to read and write to the EEPROM on the device(which is USB) when the software wants to check to see if the client has the license hardware or not.
0
 
Jaime OlivaresCommented:
well, in that case you have to choose a microcontroller to manage the memory, have you did it?
The secuence is:
You have to build a device with a USB enabled microcontroller or a standard microcontroller with an USB controller device, plus memory.
Write the software (or firmware) for the microcontroller.
Write the specific USB driver for windows
Write the code portion to talk to the device through the driver.

0
 
cryptosidCommented:
Hi,

Check O-Reilly publications..

http://www.oreilly.com/catalog/embsys/index.html

They have book on Embedded systems programming..Also.. check this.

http://www.linuxjournal.com/article/7289
http://www.linuxjournal.com/article/7920



Might give you some idea.


Regards,
Siddhesh
0
 
mrblueCommented:
"Write the software (or firmware) for the microcontroller."
1. Likely there will be support for I2C protocol in microcontroler (simple instructions like I2CSTART, I2CSTOP, I2CWRITEBYTE, I2CREADBYTE)
2. You wil have to handle USB endpoint to exchange data with windows driver

"Write the specific USB driver for windows"
Probabely there will be some generic windows driver for microcontroler (read data, write data). This will spare you writing your own dirver.
0
 
Jaime OlivaresCommented:
If you really want to spare LOTS of time, I suggest you to buy this book:
USB Complete
By Jan Axelson
http://www.lvr.com/usbc.htm

I have the book, it has the basics to design both sides of USB (PC and device).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now