Shop OBEX P1 Docs P2 Docs Learn Events
ds1302 and professional development board — Parallax Forums

ds1302 and professional development board

mosquito56mosquito56 Posts: 387
edited 2009-09-11 15:13 in Propeller 1
·I hooked up the ds1302 on the pdb and got everything working fine. I am using the object from the object exchange. I hooked up a battery to the green posts and verified the voltage at 6.5vdc. I moved the jumper to ext.

When I turn off the pdb the ds1302 goes back to 0 on everything.


This is the config subroutine from the ds1302 object. I have tried removing the config and the settimedate from the program when I load the eeprom.
I have also left the config in and just removed the settimedate.

code·
PUB config
· write($90,$a6)······ ' Init chargeing register 1010 0110·· charge activée une diode , R=4K
· write($8e,0)········ ' Init write-protect bit
· 'x := read($85)······ ' read register
· 'x &= %01111111······ ' reset bit 7 (12/24h cycle)
· 'write($84,x)········ ' write 12/24h cycle
· write($84,0)········ ' write 12/24h cycle
· x := read($81)········ ' read clock halt
· if x & %10000000···· ' If not clock halt
··· write($80,0)······ ' enabled clock halt
·/code

Any help or suggestions?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet


Post Edited (mosquito56) : 9/10/2009 11:51:41 PM GMT

Comments

  • Agent420Agent420 Posts: 439
    edited 2009-09-11 11:38
    I don't have a pdb, so I'm just going by the schematic.· Note that the green external voltage posts and jumper are actually related to the servo circuitry - it is just coincidence that those posts are located near the DS1302.· To provide battery backup for the DS1302, you need to provide ~3v to the BAT pin on header X22 near the chip (and ground of course).· Typically, the small 3v CR2032 lithium coin cells are used for this purpose, but if you refer to the DS1032 datasheet you can enable a built in trickle-charger that uses a 'supercap' battery type supply.

    You probably do not want to connect >5v to the battery, so consider using something other than the 6.5v battery you originally tried.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Agent420) : 9/11/2009 11:43:21 AM GMT
  • mosquito56mosquito56 Posts: 387
    edited 2009-09-11 15:13
    Thanx, that was it. I mistook the green for the 1302. When I read your post I checked the schematic and found you were correct. Thanx a bunch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
Sign In or Register to comment.