DS1307/AXE033 Frustration - or Me too!

bruciferofbrm

New Member
As discussed in by others in another thread, I too am seeing the SERIAL set time problem in my AXE033 unit.

I put in a new DS1307, a fresh 3v Cr2032 (I checked it) and have had no luck getting it to take my set time command.

I tried WestAust55's code and get the crawling character set across the top line, but line 2 still read as 06/06/00 05:02 on the bottom line. (no clock jumper in place)

Oye, this is frustrating.

Assembly wise, all you put together on a AXE033 is you connect the LCD to the drive board, and then solder on you power and data lines.

I did put a proper jumper across the CLK position and that works as expected (ie: shows time on screen when powered up) when installed but it never increments.

The one stand out point I want to make is that I have put a link across J2 for running off of 4.5v power.

I find it odd that people have the exact same problems in SERIAL mode. How could people get this wrong every time when they each put it together separately? Why do they always get the same symptoms?

I don't blame the an board firmware. If there was a problem, I couldn't use it as a display at all. Right?

So why does SERIAL mode have a problem talking to the DS1307? Did Maxon/ Dallas Semi change something functionally over the last few year that make the chip work differently?

I guess I'll have to fall back to trying out I2C mode now. Luckily I just bought a 28X1 and am not stuck on my 28A that I bought originally with my dev board and my AXE033.

Does anyone have any new ideas to consider?
 
Last edited:

westaust55

Moderator
Please post your code for us to look at.

The last case along the same lines only about a week ago, with the time always displayed on the bottom line was down to the program code.

The time will be displayed when a null character (value = 0) is sent to the AXE033 and in the mentioned case the problem was down to two quote marks with nothing between them.

that is something like:
SEROUT 0, N2400, ("")​
 

bruciferofbrm

New Member
and so...

Well, I2C works fine.

It takes a bit to get used to bouncing back and forth between the i2c devices, but it makes sense in the end.

Plus, if I yank the DS1307 off the board (or get another chip) I can use it with anything else I want to on an I2C bus. So it was worth learning.

But the whole issue with serial not working, and not working the same way for multiple people is frustrating.
 

bruciferofbrm

New Member
dont look at me...

I used your code too.

Cut and pasted out of the other recent thread. Run all by itself.

But I'll start a new thread and share my I2C code. It works.
 

westaust55

Moderator
I have several code snippets I have played with for the AXE033 so cannot identify which you have used and wheter it is 100% verbatim.

I still ask that you post your serial code exactly as you have tried it.
 

bruciferofbrm

New Member
well then...

Here is your code (from about a month ago):

main: pause 1000
serout 7, N2400, (254,1) ; clear the screen
pause 500
serout 7, N2400, ("hello Westaust55")
pause 2000
; remove REMs to set time
; serout 7, N2400, (253,0,"18/03/08 21:30 ")
; pause 10000 ; YES a TOTAL of 10 seconds !!!

b3=127-16
shwtim: for b0 = 32 to b3
serout 7, N2400, (254,1) ; clear the screen
pause 30
serout 7, N2400, (0) ; display the date and time
pause 10
serout 7, N2400, (254,128) ; move to start of line 1
for b1 = 1 to 16
b2= b0+b1
serout 7, N2400, (b2) ; display a different char each loop
pause 2000
next b1
next b0
end

-----------------

My own attempts were the classic examples from manuals. With the classic mistake of not reading the need for two extra spaces at the end of the setting string.

I didn't both to save those since, A: they didn't help at all (no resolution), B: no investment in time.

I don't write out blank values ("") in my code. And I wasn't going over the top trying to push out a big program with time functions on top. Just straight manual based examples.

Right now serial is unsoldered (I hate excess wires when not required) on the AXE033 - and I am going to stick to I2C.
 

westaust55

Moderator
Did you remove the semicolons (REMs) from lines 7 and 8 as per the note on line 6?

Code:
main: pause 1000
serout 7, N2400, (254,1) ; clear the screen
pause 500
serout 7, N2400, ("hello Westaust55")
pause 2000
; remove REMs to set time
serout 7, N2400, (253,0,"27/10/08 13:30  ")
pause 10000 ; YES a TOTAL of 10 seconds !!!

b3=127-16
shwtim: for b0 = 32 to b3
serout 7, N2400, (254,1) ; clear the screen
pause 30
serout 7, N2400, (0) ; display the date and time
pause 10
serout 7, N2400, (254,128) ; move to start of line 1
for b1 = 1 to 16
b2= b0+b1
serout 7, N2400, (b2) ; display a different char each loop
pause 2000
next b1
next b0
You only run this once to set the clock.

Then put the semicolons back to remark/comment out writing the time to the clock so the code the displays the time and slowly displays the character set.

From the Manual 2:
Comments are used to add information into the program for future reference.
They are completely ignored by the computer during a download. Comments
begin with an apostrophe ( ‘ ) or semi-colon ( ; ) and continue until the end of the
line. The keyword REM may also be used for a comment.
I tend to use the term "REM" (for remark) to cover REM or semicolon for in code comments.
Comes from use of BASIC in years gone by
 
Last edited:

bruciferofbrm

New Member
Ha, of course not!

Read instructions? What 'newb' does that?

I worked blind using the original time setting code from the manual. You know the one. Where you don't see you have to put in two extra spaces at the end until you read that paragraph as well. I ran the time set the correct way the second time. But you would never know it even by setting the CLK jumper to make it read time for itself.
 

westaust55

Moderator
My past finding was also that it can take up to a minute before the set time is displayed. Apparently the AXE033 only reads from the RTC chip once per minute at minute roll-over.
 

bruciferofbrm

New Member
Yes, I read that. A lot of people don't believe it, or fight it.

I am with them, in having to say, after setting it, I can walk away for half an hour, leaving it running and no change.

I do not think you are wrong. Nor do I think the chip is bad, etc. Either all of us who try serial mode and cant get past this exact same problem are doing something entirely wrong (thus an excellent area for RevEd to try and find a bullet proof answer to), or there is something more to setting time in serial mode we just don't get when following the examples.

Or the very small possibility that something has changed in the 1307's basic design that is keeping the firmware from talking to it these days.

I2C mode does work. It takes two wires to do, but at the same time those two wires can talk with a lot of other components. So one input loss isn't to terrible in most projects I would guess. Which I guess could play into someones decision to switch to a 40x if they cant get enough from a 28x with I2c in play.
 

Technical

Technical Support
Staff member
We've just tested with a brand new AXE033 and AXE034 from stock.

1) Soldered up AXE033 - inserted DS1307/battery from AXE034
2) Connected CLK jumper
3) Connected power (V+ and 0V) to 5V power (on AXE090 experimenter board)
4) Adjusted contrast until welcome message and date/time (all 0's) displayed
5) Disconnected power
6) Removed CLK jumper

7) Connected 'IN' on LCD directly to PICAXE-18X output3
8) Reconnected power
9) Downloaded this program to PICAXE
Code:
init: pause 500
main: serout 3,N2400, (253,0,"27/10/08 11:45",$20,$20) '($20=space)
 pause 1000
 serout 3,N2400, (0)
 end
10) Disconnected power
11) Attached CLK jumper

12) Reconnected power
13) Time as expected (27/10/08 11.45) shown on screen
14) Disconnected power
15) Removed CLK jumper

16) Reconnected power
17) Downloaded this program
Code:
init: pause 500
main: serout 3,N2400, (1)
 pause 10
 serout 3,N2400, (0)
 pause 490
 goto main
18) Time displayed as expected on LCD (27/10/08 11.51)
 

Technical

Technical Support
Staff member
The CLK link simply puts the module into standalone 'alarm clock' mode.

In this mode the unit simply displays the time continuously on screen, and does not respond to serial instructions. It will however set the alarm output if an alarm time has been set.

Therefore it is useful for testing the time in the unit, because the time is always shown on screen. However the CLK jumper should not be left permanently in position (unless you want to use that function!)
 

bruciferofbrm

New Member
Techincal: thanks for going the extra mile. I guess I'll have to go and resolder up my serial wire and try mine again with your code.

The only differneces in this equation (outside of experience levels) are:
- You used 5 volts - I have the 4.5 volt link in place on my AXE033 and am runningt from the typical (for three years ago?) three battery clip.

- You show a new variation (and far clearer) of chaining the space character in the time setting SEROUT line.

I think I should give that a spin with the chained spaces.

Personally I fully understood the point of the CLK link (which is why mine is a jumper and not a link) on the unit. But I guess some people might not get it. {I wonder if it would have any value to specifcally add three jumpers ot the board: one on the 4.5 volt power jumper - another on the I2C jumper and the last on the CLK jumper. Maybe not - people would likely get them confused again as well.}
 
Top