ahmet2004
Member level 3
have problems with i2c sometimes my PIC 18F2620 is hanging on i2c_start () function. I´m using i2c with FORCE_HW, SLOW but without setup_spi(FALSE). If I use setup_spi(FALSE) then it doesent work.
I´m using 10K pullups on C3 and C4 with 24C256 and PCF8583.
In a thread I found setup_spi(FALSE) in the docu I can't find "FALSE"
The problem (stop on i2c_start()) I can reproduce when I connect to different USB serial adapter (with PL2303) for a while then sometime it does stoping on i2c_start() and waiting.
If I use the software I2C then it it work´s . The init_i2c function I use from the CCS sample, Compiler Version 3.222
I use a software RS232 on B5 and B6.
Is there something to delete, if an error on RS232 to work with I2C.
If I call set_tris_c, is there switched off the spi save ?
I´m not sure if I switch to software I2C to have solved my problem.
Is software I2C better than hardware I2c to use
I´m using 10K pullups on C3 and C4 with 24C256 and PCF8583.
In a thread I found setup_spi(FALSE) in the docu I can't find "FALSE"
The problem (stop on i2c_start()) I can reproduce when I connect to different USB serial adapter (with PL2303) for a while then sometime it does stoping on i2c_start() and waiting.
If I use the software I2C then it it work´s . The init_i2c function I use from the CCS sample, Compiler Version 3.222
I use a software RS232 on B5 and B6.
Is there something to delete, if an error on RS232 to work with I2C.
If I call set_tris_c, is there switched off the spi save ?
I´m not sure if I switch to software I2C to have solved my problem.
Is software I2C better than hardware I2c to use