|
|
View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
toxie
Joined: 22 Jun 2009 Posts: 6
|
|
Posted: Mon Jul 20, 2009 3:23 pm |
|
|
Checked it again and yes.
Because i`m supplying the whole circuit from my pickit2 programmer is there a possibility that, when i insert the eeprom some voltage drop occurs which causes this ? I have 3.6V external batteries connected to the pcf8583 . |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jul 20, 2009 5:49 pm |
|
|
I tested it in hardware and I didn't have any problems.
I installed vs. 4.016 of the compiler. I plugged in a pcf8583 in an extra
socket on my PicDem2-Plus board. There is already a 24LC256 eeprom
on the board. Both chips are connected to pins C3 and C4 for the i2c
bus. The pcf8583 has its A0 pin connected to a +5v pull-up. The
address pins A0, A1, A2 on the 24LC256 are connected to ground.
The PicDem2-Plus has a +5v voltage regulator on it, which supplies
power to the board. The ICD2 does not supply power to the board.
I'm using the same test program for the pcf8583 as is shown in the
link for the driver.
http://www.ccsinfo.com/forum/viewtopic.php?t=27988
Because pin A0 is tied high on the pcf8583, the i2c addresses must
be changed to 0xA2 and 0xA3 as shown below.
Code: | #include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
#include <ctype.h>
#define PCF8583_WRITE_ADDRESS 0xA2
#define PCF8583_READ_ADDRESS 0xA3
#include "PCF8583.c"
// #define USE_EURO_DATE_FORMAT 1 |
Here's the output of the test program, and it's completely correct.
Quote: | Do you want to write a sample date/time of
12/23/06 23:59:50 (Sunday) to the PCF8583 ? (Y/N)
New date/time written to PCF8583.
Watch it rollover to 2007.
Reading date/time from PCF8583:
Sunday, 12/31/06, 23:59:51
Sunday, 12/31/06, 23:59:52
Sunday, 12/31/06, 23:59:53
Sunday, 12/31/06, 23:59:54
Sunday, 12/31/06, 23:59:55
Sunday, 12/31/06, 23:59:56
Sunday, 12/31/06, 23:59:57
Sunday, 12/31/06, 23:59:58
Sunday, 12/31/06, 23:59:59
Monday, 1/1/07, 0:00:00
Monday, 1/1/07, 0:00:01
Monday, 1/1/07, 0:00:02
Monday, 1/1/07, 0:00:03
Monday, 1/1/07, 0:00:04 |
I think you've got something wrong with your board. Either the
components, the connections, or the power supply, or something else,
is bad. |
|
|
toxie
Joined: 22 Jun 2009 Posts: 6
|
|
Posted: Mon Jul 20, 2009 6:02 pm |
|
|
I've noticed that the PIC16F690 is behaving strange. I'm getting junk on uart when the internal oscillator is enabled, when I put an external oscillator I'm getting junk only on bootup ... so maybe the microcontroller is faulty. I will try with another eeprom. Maybe 24C256 (Atmel) I couldn't find the 24LC256 (Microchip). Anyway thanks for testing the software. Can you tell me the value of the pullup resistors on your board ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jul 20, 2009 6:59 pm |
|
|
All pull-ups are 4.7K ohms. |
|
|
blue Guest
|
eeprom and ds1307 code on same i2c bus |
Posted: Fri Jul 31, 2009 7:54 am |
|
|
hey...asmallri,
Can you please post the code of 24lc512 and ds1307 on same i2c bus ?
I am a newbie with no idea how to do. |
|
|
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
EEPROM and RTC on same I2C bus? |
Posted: Sat Aug 01, 2009 2:31 am |
|
|
I use the FM3130 RTC and Memory in 1 Chip. Works very nice.
Also The PCF8563 and 24c64. Just make sure u check the adresses for this.
johan _________________ Johan Pretorius |
|
|
|
|
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
|