Page 1 of 1

SPI and I2C programming

Posted: Tue Jan 29, 2008 5:09 am
by Ondra
Good day all. Can someone help me? I have an embedded modem that has an SPI an I2C and RS232 interface. I am somewhat comfortable using the RS232 interface but would like to use the SPI or I2C interface. The device uses simple AT commands to configure and control it. My question is, are there any tutorials that can get me up to scratch using SPI and or I2C interface. Or can someone give me an example of what would be the process if I wanted to send my device a simple dial command such as ATDT2967189. And also I would like to get an example of reading back the response from the modem. An example of a response or data coming from the modem would be "ONLINE" or "PASSWORD". Thanks In advance.

Ondra

Re: SPI and I2C programming

Posted: Tue Jan 29, 2008 10:42 am
by Benj
Hello Ondra

SPI is a fairly simple protocol you simply throw bytes out as you would an RS232 port. However for the I2C it gets a bit more complicated. You will have to refer to the connection protocol diagrams in the modems datasheet to determin what you need to transmit to the device.