Author |
Message |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Wed Dec 06, 2017 3:31 pm Subject: I2C issue on PIC16F877A |
PCM programmer,
WONDERFUL! You got me on the right track; I now have a perfectly working timer! My code ended up like this:
#bit I2CEN = 0x14.5 // SSPEN bit to enable/disable hardware I2C m ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Tue Dec 05, 2017 6:56 pm Subject: I2C issue on PIC16F877A |
I figured it out!
I am suffering from a locked up I2C bus. At some point in time a data transfer was interrupted, or an incorrect sequence run that left the bus in an unknown state.
When not active ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Tue Dec 05, 2017 10:26 am Subject: I2C issue on PIC16F877A |
Ttelmah,
I indeed do not get that one (does not seem very clear in the documentation), but I will go with it. Also thanks for fixing my code for the lacking NACK on my last read, very simple, THANK ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Tue Dec 05, 2017 9:16 am Subject: I2C issue on PIC16F877A |
Thanks everyone for the responses!
Ttelmah:
In order to determine where my code hangs, I insert a line that turns on a LED on my project. If it lights, I know the code reached that point. If it do ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 9:21 pm Subject: I2C issue on PIC16F877A |
Thanks, PCM programmer,
Using the I2C1 did solve the error issue. However, I am still locking up on the second line; being the first write command. My read code is:
void I2C_RTC_Read(int8 a2, ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 4:23 pm Subject: I2C issue on PIC16F877A |
The DS3231 is a very flexible part; the following is from the DS3231 manual:
ELECTRICAL CHARACTERISTICS
(VCC = 2.3V to 5.5V, VCC = Active Supply
The part will work fine on 3.3V as well as 5V, ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 3:50 pm Subject: I2C issue on PIC16F877A |
in MAIN.h :
#include <16F877A.h>
#FUSES NOBROWNOUT,LVP,NOWDT,HS,NOCPD,NOWRT,NOPROTECT,NOPUT
#use delay (clock=4000000)
#use FIXED_IO( B_outputs=PIN_B5,PIN_B4,PIN_B3,PIN_B2,PI ... |
Topic: I2C issue on PIC16F877A |
OldPhart
Replies: 19
Views: 44374
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 3:24 pm Subject: I2C issue on PIC16F877A |
Hello....
I am working on a timer project, using a PIC16F877A, and a LCD readout. I am using an I2C bus RTC (DS3231). I am using the demo (V.5.074d) compiler.
The LCD is working, and I can write to ... |
|