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 support@ccsinfo.com

16f88 I2C (slave) and SCL line LOW

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



Joined: 10 Jan 2008
Posts: 17

View user's profile Send private message

16f88 I2C (slave) and SCL line LOW
PostPosted: Thu Jan 10, 2008 3:02 am     Reply with quote

Hi.
I'using a Cypress Microcontroller for communicate with a 16F88 (slave) over I2C.

I have written this simple program:


//I2C_Control.h

#include <16F88.h>
#fuses NOWDT,HS, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
#use delay(clock=12000000)
#use i2c(Slave,Slow,sda=PIN_B1,scl=PIN_B4,restart_wdt,force_hw,address=0x50)


//I2C_Control.c

#include "I2C_Control.h"
void main()
{

setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

}



Is it simple?
Yes, but the problem is the SCL line (PIC) wired to the Cypress SCL line, goes LOW and block the Microcontroller USB.
This line (inactive in the software) must be high!

Is it a software mistake?

Someone can help me.

I use PCWH Compiler:

IDE version 3.221
PCB version 3.221
PCM version 3.221
PCH version 3.221

Bye
Franco
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