AXE033Y and DS1307 issues

Air_Addict

New Member
Hi Hopefully some can help me out with this issue !

I've recently bought the AXE033Y and also added the DS1307 RTC chip so that i can display the time. The plan was just to use the unit in the serial mode and send signals to the OLED from an 18M2, nothing very complicated just as per the manual !

I loaded the following code into the remote 18M2 and set up the time on the DS1307, without the battery fitted, and then load code into the 18M2 to print the time as shown in the attached photo.

The problem/issue is: when I fit the battery the time does not incriment ! also if i fit the battery before setting the time then all i get on the date time field is 00/00/00 00:00. The battery does keep the RTC working during power cycles because all i do to get the clock back is to remove the battery ! how odd is that ???

What have I missed because i can not figure out why the request to print the time on the OLED do not work when the battery is fitted

Code to set time

init: pause 500
main: serout C.7,N2400, (253,0,”06/11/11 11:00 ”)
pause 1000
serout C.7,N2400, (0)
end

Code to print time onn the OLED

init: pause 500
main: serout C.7,N2400, (1)
pause 10
serout C.7,N2400, (0)
pause 490
goto main
 

Attachments

SAborn

Senior Member
I think you need to read up on how to set the time on the DS1307 because if this is the code you are using than no wonder you get 00.00.00.00 as a time back.

Code to set time

init: pause 500
main: serout C.7,N2400, (253,0,”06/11/11 11:00 ”)
pause 1000
serout C.7,N2400, (0)
end
The DS1307 is a I2C device and the code above is for a serial device.
 

Air_Addict

New Member
Hi thanks for the replies.

The issues is when the battery is fitted the on board 18M2 does not appear to read any updates from the DS1307

See pic The AXE033 has an on board 18M2 that talks to the DS1307 over i2c. I'm talking to the on board 18M2 with an off board 18M2 over serial as per http://www.picaxe.com/docs/axe033.pdf. The on board 18M2 does the wizardry to talk to the ds1307 !!!!


AXE033 PCB.JPG
 

eclectic

Moderator
A-A

Perhaps I'm just confused.

Please can you describe
and provide a connection diagram of how it all fits together.

The AXE033 does not have a 18M2,
but a PIC chip, programmed by RevEd

I own both and AXE033 RTC and a more modern AXE133Y.
They both work.

e
 
Last edited:

Technical

Technical Support
Staff member
The chip on the AXE033 is not an 18M2, but we think you just mean the LCD firmware.

There is no explanation for what you are seeing apart from a physical error somewhere - are you sure, for instance, that the battery cell contacts on the back of the PCB are not shorting out to the back of the OLED module or something similar?
 

westaust55

Moderator
I think you need to read up on how to set the time on the DS1307 because if this is the code you are using than no wonder you get 00.00.00.00 as a time back.



The DS1307 is a I2C device and the code above is for a serial device.
note that the AXE033 can use serial commands to set the time of the inboard DS1307 RTC (see datasheet page 9 and page 12). You can also have the time displayed onto the AXE033 display.

What cannot be done without using i2c mode is to read the time into the PICAXE chip.
 
Last edited:

lewisg

Senior Member
Have you checked to be sure the battery is good and inserted the correct way?

It appears you are operating in accordance with the documentation since this is a unusual implementation of the DS1307.
 

Air_Addict

New Member
All thanks for the comments and suggestions.

It looks like there is some kind of hardware issue going on. I've tried both setups ie serial and i2c and the problem is the same as described above. Interestingly if i touch the battery + terminal with my finger then i get ??/??/?? for the time when reading the ds1307 over i2c !!I think this means that the DS1307 is not replying with vaild data ?
I've not been able to find a schematic for the board but I assume the battery is just connected to pin 3 on the ds1307.

I'm convinced the issue is hardware related !!! Technical : The back of the PCB is not shorting with the OLED , there is a reasonably good gap with the standoff that were supplied innthe kit.

Could I have a faulty ds1307 ?? I'll order another just in case !
 

eclectic

Moderator
Just a suggestion.

On your AXE033, attach wires for the I2C sda and scl.

Connect to the Picaxe using

V+ / Gnd / SDA / SCL

Then use the wizard to set the time.

I tried this last night, using my AXE033.

It worked.

e
 

wez

New Member
I also had problems with interfacing the ds1307 on my AXE033.
The AXE033 is connected to my main board which operates on 5V.
I use I2C.

I found out that the protection diode on the AXE033 was reducing the
voltage enough to make the ds1307 malfunction while the display was
working OK. The workaround is to short the J2 jumper to disable the
voltage protection diode.
 
Top