I cannot seem to write to this device. I am using library protocols in MikroC to address this device. I am able to address the smaller 24C02 without any difficulty. I have a small veroboard with 3 I^2C devices + dip switch arrays to preset device addresses.
I know that the 24C32 is addressed correctly because it returns a value of 255 only when its address corresponds to my variable set in code. If I remove the device or change its address, it does not return the value of 255. I am using the identical protocol as I do with the 24C02. There is no change in code. I am prefixing the device address with 1010 ****. The ONLY difference is the chip. Below is my code. I am using eeprom data address #9. Initially, I thought the device might be faulty, so I swapped it out, but to no avail. The value in variable "test" is what I am trying to write to the 24C32. Again, this code works perfectly on the 24C02. Any idea as to why that is? I'm stumped. (These are both Atmel devices.)
Yes. When you run a C program in a PC, the OS takes control when your program ends. But that does not happen in case of a microcontroller. And the mc becomes unstable(kind of).
There may be other problems in your code but correct the structure of the program first.