|
|
View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Fri Jan 27, 2012 9:02 pm |
|
|
I'm confused if he's tried 112 different chips or tried the same one and the software's 'funny'.
How about trying another I2C device, say the DS1307 RTC, and confirming it works fine using the same PIC pins for I2C communications? At least that would prove it's not a PIC issue as the DS1307 driver works fine on my 4550 boards.
If you get that to work(or any other I2C device), then start totally fresh creating a driver for the device. Maybe there's a bad typo, misreading of the datasheet that looks ok but is really wrong ? |
|
|
prixsecco
Joined: 18 Dec 2011 Posts: 26
|
|
Posted: Sat Jan 28, 2012 1:44 am |
|
|
I am happy for any help. Doesn't matter when...
Thanks to all in the mean time.
I tried another i2c sensor and there the ack test program is working fine...
Found 1 chip etc. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Sat Jan 28, 2012 7:26 am |
|
|
Well the good news is you've proved the code works and the PIC isn't busted!
I downloaded the datasheet quickly read it.
I suggest a complete 'startover',beginning with a 'simple' read the device type program.No fancy driver,no writing to the devices RAM,etc. Just a simple read the data program.
Be sure to verify the correct bits are set for address,commands,etc. I use graph paper to layout the proper sequence of databits.Something as coding 'B5' when it should be 'E5' will cause you a LOT of problems! They look alike,especially after a couple of hours! Writing it down in binary ('0b00110011') may help.
If the device was $3 not $30, I'd buy one and cut the code as I like a challenge. You might try Googl to see if anyone else has used the chip,even in another language, it might help you. |
|
|
prixsecco
Joined: 18 Dec 2011 Posts: 26
|
|
Posted: Wed Feb 01, 2012 10:49 am |
|
|
Hey again.
I checked the bus using an oscilloscope. there i can see that the SDA line is just about 0.5V high. The problem is the pic expects Vih of 2V, right?
what can i do?
using a low power version pic?
or something wrong with my hardware ?
i will also ask the constributor for help, already called him. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 01, 2012 3:47 pm |
|
|
Quote: | there i can see that the SDA line is just about 0.5V high.
|
Do you see a signal, and the high level voltage of the signal is only 0.5v ?
If yes, something is probably wrong with the hardware.
The signal should go from ground to the pull-up voltage (+3.3v).
Look for a solder short to another pin. The only components connected
to the SDA and SCL pins should be the pull-up resistors. No capacitors. |
|
|
|
|
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
|