We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello there,
Please help me, i am looking for a code using CodeVision on How to store and read data from FRAM(FM24C256)...im waiting for your reply.. Thanks in advance...........
Bryan
This connects up as an I2C device. Look at the data sheet for the device, it explains what is required to communicate with the device.
I have been using the SPI parts for years. Same protocol, difference interface.
an I2C device. ... the SPI parts for years. Same protocol, difference interface.
NO WAY, the protocol is totally, absolutely, completely different.
One added point: there are '51 derivatives galore ($1 up) that have harware IIC and/or SPI interfaces and the code for those (except for the SILabs f3x, f4x, f5x Deviates) is either ready when done with CodeArchitect, free from http://www.esacademy.com or can be modified to fit in 15 minutes or less.
Bit-banging, while it does handle the protocol (code 'examples' all over), is very likely to cause other problems because it hangs the processor during the transfer.
Erik
Sequence of outputing bytes is what I referred to as protocol. Transfering bytes to the device is the hardware layer, spi, i2c, etc.
You said initially that you're using CodeVision - which is not a Keil product
Your code looks like it's for an AVR:
#include <mega16.h>
PORTB = 0b00000000; DDRB = 0b00000000; /*-HW UART-*/ UCSRA = 0x00; UCSRB = 0x18; UCSRC = 0x86; UBRRH = 0x00; UBRRL = 0x17;
Keil tools do not support the AVR.
So why are you posting this in the Keil forum? http://www.keil.com/forum/
The forum you need for the AVR is: http://www.avrfreaks.net/