Setting Time?

#2
Is there a way of setting the time via the web page?? and not using the set-up wizard?
Yep. Look at the Picaxe Net Server documentation on page 20. The shared memory allocation table says address 00 gives seconds, 01 gives minutes etc. It also suggests that this is read only, but that's not true. These addresses are just the Real Time Clock's registers and can be read and written in the same way as the general purpose registers.

What you should remember is that these are in Binary Coded Decimal format, so Hex 45 means 45 sec/min not 4*16+5.

[Having said that, I can't check the truth of it! I know for sure the PicAxe can write these locations and I'm 99% sure the web page can, but I cant get at my gear to test it our right now. I suggest you just give it a try.]
 

geoff07

Senior Member
#4
I realise that this is an old post, but this info may be useful to someone.

I can confirm that the time and date can be set programmatically via i2c, and therefore possibly by a web page as well, though I could not do it using the provided page which states that it works on the shared memory bytes and therefore may filter the input (I haven't studied the coding). It is not necessary to use the Wizard or the manual configuration mode. You could always pass a value from a web page to the picaxe and back to the DS1307 if you can't write directly, but I can't see any reason why your own web page would not work.

You will need the DS1307 data sheet if you want to change the control bits or to code BCD correctly for the device, but you can download that from MAXIM and it isn't difficult to use.

Byte 3 is the day of week, which can be used even if not provided for by Picaxe.

The PNS does not seem to use the time so probably won't be bothered if you change it. The manual is therefore a little over-cautious.
 
Top