CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Ask for help

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
applecon2000



Joined: 29 Jul 2007
Posts: 31
Location: UK

View user's profile Send private message Send e-mail MSN Messenger

Ask for help
PostPosted: Fri Aug 17, 2007 5:29 pm     Reply with quote

Dear all,
after building RS232 interface in my LCD module, I wanna build I2C and SPI interfaces into it as well, is there any friend who can give me the suggestion about the code for those two interfaces.
As the codes I writing for I2C and SPI:

Code:
#USE RS232(BAUD=9600,XMIT=PIN_C6,RCV=PIN_C7)
#USE I2C(slave, sda=PIN_C4, scl=PIN_C3, address=0xA0)
...
while(1)
{
   while(!i2c_poll());
   lcd_putc("\f I2C data: \n");
   value3=i2c_read();
   lcd_putc(value3);
}                //end while of I2C

while(1)
{
output_low(PIN_A5);
while(!spi_data_is_in() && input(PIN_A5));
if (spi_data_is_in())
value3=spi_read();
lcd_putc(value3);
}                 //end while of SPI




But it seems not work well. My LCD module would be treated as a slave mode, just being used to receive data from other hardware.

Thanks for your help indeed.
_________________
Enjoy our EEE
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Aug 17, 2007 5:52 pm     Reply with quote

In your other post you were told not to post twice. You said you were sorry, and now you are again double posting...

Please post all follow-ups in the other thread.
applecon2000



Joined: 29 Jul 2007
Posts: 31
Location: UK

View user's profile Send private message Send e-mail MSN Messenger

Guide me please
PostPosted: Fri Aug 17, 2007 5:54 pm     Reply with quote

please tell me the right place I can post about my question.
and that's the last question, if you know the answer please give me your suggestion, I will stop post it.
thanks.
_________________
Enjoy our EEE
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group