izmit escort escort ankara adana escort

 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: SAM3x8e TWI start stop condition code in Atmel studio 7
PostPosted: Wed Aug 23, 2017 10:10 am 
Offline

Joined: Wed Aug 23, 2017 9:59 am
Posts: 2
Hello everyone,

I am using Ardunio Due board (atmel SAM3x8e microcontroller) in Atmel Studio 7.

I am getting start and stop condition by code, i tried all options but still both SDA and SCL pins remains high

My code is
calling function as i2c_start(Twi1); etc

void i2c_start(Twi *p_twi)
{
//Twi *p_twi;
//p_twi=TWI1;
//p_twi->TWI_CR &= 0xFFFFFFF1;
//TWI1->TWI_CR = TWI_CR_START | TWI_CR_STOP;
//TWI1->TWI_CR = TWI_CR_START;
//p_twi->TWI_CR = TWI_CR_START;
p_twi->TWI_CR = TWI_CR_START;


}

void i2c_stop(Twi *p_twi)
{
//Twi *p_twi;
//p_twi=TWI1;
//p_twi->TWI_CR &= 0xFFFFFFF2;
//TWI1.TWI_CR = TWI_CR_START | TWI_CR_STOP;
//TWI1->TWI_CR &= 0xFFFFFFF2;
p_twi->TWI_CR = TWI_CR_STOP;

}

Please let me know if anybody knows how to get it by code.

Regards,


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Baidu [Spider] and 0 guests


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 post attachments in this forum

Search for:
Jump to: