Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: roolku on December 07, 2006, 11:41:38 AM

Title: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 07, 2006, 11:41:38 AM
I have added an RTC chip to my player and documented the process http://www.rockbox.org/twiki/bin/view/Main/RTCModH1x0 in case anyone is interested in doing the same.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Genre9mp3 on December 07, 2006, 11:47:15 AM
I'm really impressed by this mod! I wasn't even aware that this could be possible!

Great job! Congratulations!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on December 07, 2006, 12:00:26 PM
SWEET! This is something that I've wanted for a while now. Just a quick question, would this make recording time stamp the files with the correct time? If so, this could be very valuable.



ps. Having rockscrobbler have the time would be fun as well!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 07, 2006, 12:12:11 PM

Just a quick question, would this make recording time stamp the files with the correct time?


Yes it does. Not only does rockbox use date and time, but also the FAT time stamps are set. :)

Quote

ps. Having rockscrobbler have the time would be fun as well!


I don't use last fm and haven't checked it, but if it is implemented correctly (i.e. uses the RTC_CONFIG define) than it should add the time to the log file like it does for the other targets with an RTC.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on December 08, 2006, 11:26:08 AM
Just curious of the safety issues with this, would it hurt the device if I had the timer installed and was running with an unpatched version of Rockbox? Or would it just not have the clock functionality?

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on December 08, 2006, 11:52:01 AM
OH MY GOD!  :o

I only dreamed that this was possible.  Only in my dreams could this be done.   :D
I will attempt this as soon as it has totally matured. This is truly amazing to me.

Thank you so much.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: matnik on December 08, 2006, 07:40:52 PM
The mod looks mature enough to me :-) Kudos to roolku.

I went on Maxim's web site and I got confused about what part number to select.  I wondered what was the difference between DS1339C-2/DS1339C-3/DS1339C-33 and then I figured that "-2"/"-3"/"-33" was standing for the voltage supply required by the chip ... ::) As indicated by roolku's wiki, you need to get a 3.3V compatible chip and DS1339C-33 should fill the bill.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 08, 2006, 10:11:59 PM
I am glad you all like my little addition to the h120 rockbox. :)

I have now added the missing wake-up alarm function (optional - one additional connection) and will see if my h120 will wake me up tomorrow.  ;)

Wiki and patch tracker have been updated.

Quote
I will attempt this as soon as it has totally matured.


I'll keep testing and working on it, but I doubt the hardware bit will change. Both, my h120 and my h140, are now modded.

Quote
Just curious of the safety issues with this, would it hurt the device if I had the timer installed and was running with an unpatched version of Rockbox? Or would it just not have the clock functionality?


Without the optional wake-up alarm part, the hardware is completely dormant and has no impact. OF or unpatched rockbox run without problems (and without clock functionality).

With the alarm mod you will need to run a patched rockbox at least once after each power loss (i.e. battery dead).

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on December 09, 2006, 12:47:46 AM
 ;D Request for samples sent into the company! Hopefully by this time next week I can post how my attempt went. Thank you so much for doing the research into this very useful mod!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: JdGordon on December 10, 2006, 07:32:47 PM
Congrats, that hack looks awesome.
Now you need to nag the swedes to have it commited and put on the cvs build page (the 8mb ram hack for the archos models is there so you have a chance :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bluebrother on December 11, 2006, 03:09:53 AM
wouldn't it be nice to have Rockbox autodetect this? That way it could get in the standard builds ... on h100 I believe there is no problem with code size, so adding a few bytes shouldn't hurt anyone.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 11, 2006, 06:49:58 AM

Congrats, that hack looks awesome.
Now you need to nag the swedes to have it commited and put on the cvs build page (the 8mb ram hack for the archos models is there so you have a chance :)


Yes, it would be good to have it in cvs, so I don't need to worry about the patch getting out of sync. I believe Linus is doing the mod (albeit with a different clock chip) so it is looking promising. :)


wouldn't it be nice to have Rockbox autodetect this? That way it could get in the standard builds ... on h100 I believe there is no problem with code size, so adding a few bytes shouldn't hurt anyone.


Yes, it could be done like with the radio chip detection, but there are a few issues, e.g.
 
- while one could detect the presence of the chip, the alarm mod can not be detected
- people might want to use different rtc chips requiring different drivers?
- some other compile-time options depend on RTC_CONFIG (i.e. filename generation for recording) which would need to be changed to run-time detection as well

If only a few people are using it I don't think it is worth the effort. Let's see how many people will do the mod.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 13, 2006, 01:56:40 PM
I just received a couple of the RTC chips and hope to do the mod later this week.  I plan to skip the alarm function.  I would like to see more information about the battery voltage issue with VCC on the chip.

BTW, this chip is very small.  This is the first surface mount chip project for me.  Fortunately, I have a very small soldering iron.  I will need to scavenge for some very small gauge wires.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 13, 2006, 03:49:50 PM

I just received a couple of the RTC chips and hope to do the mod later this week.


Great. You must be in the US - it took nearly a month to arrive in the UK.

Quote

 I plan to skip the alarm function.


Fair enough if you don't need it. I just had to try it. :)

Quote

I would like to see more information about the battery voltage issue with VCC on the chip.


No problems with VCC - it's rated at 2.97 to 5.5V. However for some reason Vbackup max is: 3.7V and a fully charged battery will be just above 4V (say 4.1V). To be on the safe side you could use a resistor in series between the battery and the Vbackup, maybe

(4.1-3.7)V /400nA = 1MOhm or so.

But personally I don't think this is a problem. I have done my h140 and my h120 and both work perfectly.

Quote

BTW, this chip is very small.  This is the first surface mount chip project for me.  


It was my first SMD IC as well. It is easier than it looks. Just make sure you cover the wire tip nicely with solder, fix the position of the wire precisely above the pin and give it a dip with the iron to make the bonding.

Good luck.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 13, 2006, 05:17:03 PM
Thanks for the soldering tips and yes, I am in the USA.

I was wondering what value resistor would work.  I figured a small silicon diode in series would give me a 0.6 volt drop from the max of 4.3 for the battery.

For me, the RTC was the last missing feature.  Date-time stamped recordings are important.  

**EDIT**

I just read in the data sheet that a diode in series with the VCC backup should NOT be used or improper operation will result.    The data sheet also stated that the supply voltage MUST be held between 1.3 and 3.7 volts, so I will choose either the resistor or a small lithium button cell.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 13, 2006, 06:37:10 PM

I just read in the data sheet that a diode in series with the VCC backup should NOT be used or improper operation will result.    


Well spotted.

Quote

The data sheet also stated that the supply voltage MUST be held between 1.3 and 3.7 volts, so I will choose either the resistor or a small lithium button cell.


I wonder if this is an error/omission in the data sheet. Looking at a similar chip (DS1340 - an alternative if you don't need the alarm) it states http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3914 :
Quote
VBACKUP
Connection for a Secondary Power Supply. For the 1.8V and 3V devices, VBACKUP must be held between
1.3V and 3.7V for proper operation. Diodes placed in series between the supply and the input pin may
result in improper operation. VBACKUP can be as high as 5.5V on the 3.3V device.

 
Which would make more sense...
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 13, 2006, 09:36:21 PM
I tend to agree with you that this may be an omission on some data sheets.  Some data sheets specify ranges for different models for Vbatt.  But some have only one range 39c/38.  Since your Hxxx players are working with the 4.2 volt input, I think that this confirms it.

One would think that if the main circuits can handle VCC up to 5.5 then the backup input should be able to do the same.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 17, 2006, 03:42:42 PM

I just received a couple of the RTC chips and hope to do the mod later this week.  


Just curious how you are getting on. Did you get a chance to try it?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 18, 2006, 02:00:32 PM
I haven't done it yet.  

I am a several steps along the way.

1) Got RTC chip

2) Installed VMMWare Rockbox

3) Downloaded rtc.patch

4) Got successful build with rtc.patch

5) Rounded up very small gauge wires and twelve watt soldering iron

Now I need some alone time to solder.

***EDIT

6) Attached wires and tape to the RTC chip

The soldering turned out to be fairly difficult.  I think I need even smaller gauge wire than I am using now.  I would prefer a gauge so small that moving the wires would not put any stress on any solder points.  The wire I am using now is about the same size as the chip leads and is solid.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 20, 2006, 06:05:48 PM


The soldering turned out to be fairly difficult.  I think I need even smaller gauge wire than I am using now.  I would prefer a gauge so small that moving the wires would not put any stress on any solder points.  The wire I am using now is about the same size as the chip leads and is solid.



Yes, I agree, the leverage of the wire is very stressfull for the little pins. I used stranded wire with maybe 6 very thin strands (ripped from an old mouse cable). But still the wire really needs to be kept in a fixed position without any tension once attached.

I made little 90 degree bends, and placed the wire on the chip (legs up) with the wire tip pointing outwards above the pin. While pressing the wire onto the chip and holding it in position with one  hand I use the other to dip the prepared soldering iron onto the wire tip to make the bond.

Good luck
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on December 21, 2006, 01:00:09 AM
Well, I've installed the chip (Without the alarm mod for now) and have a patched version of rockbox, but it's still not showing time anywhere. I applied the rtc_with_alarm.patch . I even have gone to /General Settings/System , but there is no set time option. I am using rockbox with flashed firmware, could that be the problem? If you have any ideas, please tell me.

--EDIT--

ACK I didn't notice that I needed to uncomment those two lines, clock is working, and as soon as I sodder the alarm button on, I can test that! Thanks A Lot!!!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 21, 2006, 09:56:31 AM

ACK I didn't notice that I needed to uncomment those two lines, clock is working, and as soon as I sodder the alarm button on, I can test that! Thanks A Lot!!!


Glad to hear it worked!

Roolku
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on December 21, 2006, 02:23:43 PM
Well, did some further testing and the clock is working great, tested the clock plugin and scrobbler and such, working great. The one caveat is that the alarm isn't working in any way. Right now I just have that wire going nowhere. Whenever I hook it up it starts the last song and play/pauses it forever. I have a patched firmware with both of those two lines uncommented, so I thought that it took care of that. Any ideas?

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 21, 2006, 08:17:26 PM

Whenever I hook it up it starts the last song and play/pauses it forever. I have a patched firmware with both of those two lines uncommented, so I thought that it took care of that. Any ideas?


Rockbox with the the alarm mod patched and enabled should disable the alarm pin on start-up. So you can check that you have the menu entry "wake-up alarm" under General Settings/System.

Also you might want to double check that you haven't accidentally shortened the SQW/INT pin with another one (i.e. the SCL) when soldering on the wire.

That is all I can think of at the moment.

Roolku

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 23, 2006, 04:03:18 PM
I finally had success with the mod!

However, it was a sobering experience.  My first attempt resulted in an H120 that would not power on.  Resetting the H120 did not work.  I thought I bricked it.  I disconnected the mod and still it would not power on even with a reset.  But about a half hour later I tried plugging it into a charger and it powered on!

BTW, I followed the suggestion about using mouse wires.  I found an old serial connected mouse and cut up the cable to obtain the thin flexible wires inside.

I decided that since my first attempt did not permanently brick it that I could try again.  This time I looked for another Vbackup source other than the power connector on the other side of the mainboard.  I found a source that was the same voltage as the battery.  The bottom right of the mainboard (oriented with the headphone jack on top) has two square solder coated objects.  The rightmost of the two has a 4.1 volt reading, so I decided to use that solder point.  It saves unscrewing the mainboard and flexing more leads and routing the Vbackup wire around the board.

This time I tried to be very careful of where the dangling unsoldered wires wandered about the board.  Everything went fine and the clock plugin started working.  It did not work without the RTC chip installed.

BTW, I like the date-time naming of the recorded filenames.  That avoids problems with editing the file contents and changing the date-time modified value.

Overall, using the flexible mouse wires and using the new Vbackup source made the project relatively easy.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 24, 2006, 04:20:34 AM

I finally had success with the mod!


Well done. :)

If you don't mind I will transfer some of your experiences to the wiki (when the site is back up).
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on December 24, 2006, 03:41:16 PM


I finally had success with the mod!


Well done. :)

If you don't mind I will transfer some of your experiences to the wiki (when the site is back up).

No problem.  Anything to help.  Maybe this can encourage others to look for more easy solder points.

BTW, to clarify, the Vbackup solder point is at the bottom right of the mainboard when the board is oriented with the headphone jack uppermost.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: flintstone on December 25, 2006, 06:41:27 PM
If the alarm function works properly now,
would it be possible (...he asked with
trembling hands...) to add a patch
that started and stopped recording
based on the time of day?

I've got a project that needs a way to
automatically record for a few minutes, then
wait for a specified time, record, wait,
record, and so on.   Duration of recording
limited only by disc space and battery life.

It may be simplest to set the recording time
and the waiting interval from a text file (start
at 8:00, stop at 8:10, start at 9:45, stop at 9:58,
and so on).

There are a couple of commercial solutions
to this problem.  They are either inflexible
(recording starts and stops at fixed intervals),
unreliable, or very expensive (often all three).

I would be very willing to pay for development
time, or to donate an amount to support the
community forums, to get this capability added.

To reply to me privately, send email to xyz at
muchomail com. Substitute my name below for
the xyz.

Many thanks, and Happy Holidays to all.

Flintstone

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: jmdearras on December 25, 2006, 07:38:41 PM

Well, did some further testing and the clock is working great, tested the clock plugin and scrobbler and such, working great. The one caveat is that the alarm isn't working in any way. Right now I just have that wire going nowhere. Whenever I hook it up it starts the last song and play/pauses it forever. I have a patched firmware with both of those two lines uncommented, so I thought that it took care of that. Any ideas?



I had the same issue.  Something is not working in the init code.  I managed to set an alarm with the remote, after locking the main keyboard, and that stopped the toggleing.

YBIC,
Jim
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: LinusN on December 26, 2006, 04:48:17 AM
I think it was a bad idea to choose a chip that outputs a waveform on the alarm pin by default.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 26, 2006, 05:45:27 AM

I think it was a bad idea to choose a chip that outputs a waveform on the alarm pin by default.


Possibly, but that is easy to say after the fact. At the time I was just looking for a chip with the features listed at the wiki. Could you suggest a better chip?

Also once the alarm has been set, it isn't a problem anymore. The trick seems to be to disable the play button with the hold switch on the main unit and set the alarm once with the remote.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 26, 2006, 06:08:42 AM

If the alarm function works properly now,
would it be possible (...he asked with
trembling hands...) to add a patch
that started and stopped recording
based on the time of day?


Yes. But someone needs to program it. I may give it a go if I got too much spare time on my hand.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: jmdearras on December 26, 2006, 10:07:52 AM


I think it was a bad idea to choose a chip that outputs a waveform on the alarm pin by default.


Possibly, but that is easy to say after the fact. At the time I was just looking for a chip with the features listed at the wiki. Could you suggest a better chip?

Also once the alarm has been set, it isn't a problem anymore. The trick seems to be to disable the play button with the hold switch on the main unit and set the alarm once with the remote.



I have ordered a few DS3231 clock chips, with TCXO, and trim.  They are the same size, and look like the firmware will operate it without change.  Pinout is different.  And the -INT/SQW pin defaults to -INT, and it's disabled.  So no square wave on startup.

YBIC,
Jim
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on December 26, 2006, 11:25:01 AM

I have ordered a few DS3231 clock chips, with TCXO, and trim.  They are the same size, and look like the firmware will operate it without change.  Pinout is different.  And the -INT/SQW pin defaults to -INT, and it's disabled.  So no square wave on startup.


They have indeed changed the default value for the INTCN on powerup to logic 1.

Let me know how you get on.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: jmdearras on December 26, 2006, 11:30:00 AM


I have ordered a few DS3231 clock chips, with TCXO, and trim.  They are the same size, and look like the firmware will operate it without change.  Pinout is different.  And the -INT/SQW pin defaults to -INT, and it's disabled.  So no square wave on startup.


They have indeed changed the default value for the INTCN on powerup to logic 0.

Let me know how you get on.


I will. I actually ordered these a week ago, before I hit this issue, it was luck they fix it.  I went for the TCXOw/trim feature, as I am an accuracy freak.  It also can return it's temperature.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: jmdearras on December 27, 2006, 06:49:13 PM


I have ordered a few DS3231 clock chips, with TCXO, and trim.  They are the same size, and look like the firmware will operate it without change.  Pinout is different.  And the -INT/SQW pin defaults to -INT, and it's disabled.  So no square wave on startup.


They have indeed changed the default value for the INTCN on powerup to logic 0.

Let me know how you get on.


The parts arrived and I have installed 4 DS3231 chips so far.  They work perfectly with the patch code.  Also, they have no effect on operation even without RockBox installed, including the alarm patch.  The first one I installed was on an old iHP120 I had just repaired, but had not yet flashed Rockbox.  After installation, the iRiver firmware ran without noticing the new chip.  Then when I flashed Rockbox and installed the patched code, the clock showed up, and alarms worked!

Here's the wiring (DS3231 shown upside down, as installed):

(http://www.goochlandband.com/rockbox/ClockConnections.png)

Here's the VBat connection point, from a recommendation:

(http://www.goochlandband.com/rockbox/Bat.png)
This point is not directly connected to the battery, there is a RC curcuit in the path of unknown value, that causes this point to rise to vBat (no diode drops) over a few seconds after initial battery connection.  

Here's Ground:

(http://www.goochlandband.com/rockbox/GND.png)

Here's the play pad, for the Alarm part of the mod:

(http://www.goochlandband.com/rockbox/Play.png)

I prepared the chip for mounting upside down with superglue by flatening and shortening the leads as below:

(http://www.goochlandband.com/rockbox/ClockChip.png)

(Now that I am writing this, I realize there is no good reason to mount the chip upside down, after bending the leads flat like this!  Hindsight is 20/20! )

Here's where I super glued the chip:

(http://www.goochlandband.com/rockbox/Place.png)

Chip installed:

(http://www.goochlandband.com/rockbox/ClockPlace.png)

Here's the final product:

(http://www.goochlandband.com/rockbox/ClockWires.png)

Many thanks to my son for taking the pictures, sizing and adding graphics!

YBIC
Jim
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on January 03, 2007, 11:50:04 AM
I'm getting an error when trying to build against the latest CVS, is there anything else I should try?

http://www.rockbox.org/tracker/task/6419

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on January 04, 2007, 07:35:00 AM

The parts arrived and I have installed 4 DS3231 chips so far.


Great stuff. I have added a link to this posting to the Wiki page.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: IpaqMan on January 04, 2007, 09:42:48 PM

I'm getting an error when trying to build against the latest CVS, is there anything else I should try?

http://www.rockbox.org/tracker/task/6419



I ran into that same problem, too.  I modified the patch file as follows:

 #endif /* HAVE_EEPROM_SETTINGS */
@@ -136,6 +137,8 @@
 drivers/rtc/rtc_pcf50605.c
 #elif (CONFIG_RTC == RTC_S3C2440)             <---
 drivers/rtc/rtc_s3c2440.c                                  <---
+#elif (CONFIG_RTC == RTC_DS1339C)
+drivers/rtc/rtc_ds1339c.c

This seemed to fix the problem.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Software_Samurai on January 12, 2007, 08:55:43 PM
Fantastic mod! I've been depressed that my poor H120 didn't have an RTC. (But it will soon now!)

IpaqMan: Did you modify the patch file and save it back into the system, or will I need to download the patch file and apply your patch to it?

Cheers!

PS: I ended up buying 10 of the DS3231 chips. As soon as I mod my H120 and make sure it's all working, I'd be more than happy to sell the remaining 9 to anyone for $6/ea (+shipping...probably $2 or less I'm guessing).
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bluebrother on January 13, 2007, 10:01:57 AM
PS: I ended up buying 10 of the DS3231 chips. As soon as I mod my H120 and make sure it's all working, I'd be more than happy to sell the remaining 9 to anyone for $6/ea (+shipping...probably $2 or less I'm guessing).
Maxim ships them as samples for free ... (you usually get 2 pieces; I'm using various Maxim samples at my university and there's no problem in getting hands on them)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Software_Samurai on January 13, 2007, 03:24:14 PM

Maxim ships them as samples for free ... (you usually get 2 pieces; I'm using various Maxim samples at my university and there's no problem in getting hands on them)

I tried to ask for samples, but they told me that since I wasn't with any university or company (I'm just an individual doing a home-mod project), I'd have to purchase them. :(

Cheers!

p.s. I only have 8 chips left... Accidentally broke a pin off of one.  :-\
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on January 13, 2007, 08:01:22 PM

IpaqMan: Did you modify the patch file and save it back into the system, or will I need to download the patch file and apply your patch to it?


The patch on the tracker is up-to-date.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Software_Samurai on January 13, 2007, 09:08:00 PM

The patch on the tracker is up-to-date.

Thanks! I just finished installing the chip in my H120, so now I'm off to build a custom Rockbox for it!  >woot!<

Cheers!
Title: It works!
Post by: Software_Samurai on January 14, 2007, 08:55:21 AM
Success! My little H120 now has a real time clock! >woot!<

Just a note to anyone else who is thinking about doing this mod: Use 30 gauge wire! Anything bigger and it will put too much stress on the little pins on the chip when you're trying to bend the wires around.

Cheers!
Title: Re: It works!
Post by: roolku on January 14, 2007, 07:47:00 PM

Success! My little H120 now has a real time clock! >woot!<


Great! I have added you to the list of successful modders on the wiki page. :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: whatboutbob on January 16, 2007, 05:52:05 AM
Got a couple of sample chips from maxim in the mail today. Will try to get to the mod this week, but might have to wait 'til next week to find some time.  Thanks roolku for putting in the groundwork and to jmdearras for the extremely detailed photos - they should come in very handy for a noob like myself. ;)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pilot000 on January 16, 2007, 06:04:32 PM
I need that mod. Where can I buy in Switzerland or Europe a DS3231S ?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 21, 2007, 05:37:51 PM
I just ordered some samples of the DS3231S chip from Maxim. I may have some questions after they arrive and I decide whether I want to do this mod or not.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Bedlore on January 21, 2007, 09:19:37 PM
What a mind blowing excellent mod!  

I live in Australia and am trying to get my hands on the DS3231S which is proving almost impossible, Dallas wants $50 to ship internationally, local provides want a minimum order of 20 pieces at $8 each.  Can someone suggest where I can get a few at reasonably costs or alternatively be prepared to sell and post a few to me directly please?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on January 21, 2007, 11:08:03 PM
Ok, so I finally got enough time to do some more testing getting it to work for me. I have the first chip, and I had gotten the time to work but not the alarm. Even with a correct build, the play button was doing the rapid press thing. Today I had and idea and set the alarm to a specific time and enabled the alarm, and then soldered on the wire to play. Now both the clock and alarm are working without the problem of the play button.

So I think it would be a good idea to make it a bit more plain that you not only need the correct build, but also have the alarm enabled before you hook up that last wire.

But altogether I now have an entirely working rockbox with both the Clock and Alarm. THANKS MUCH!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on January 22, 2007, 04:41:59 AM

So I think it would be a good idea to make it a bit more plain that you not only need the correct build, but also have the alarm enabled before you hook up that last wire.

But altogether I now have an entirely working rockbox with both the Clock and Alarm. THANKS MUCH!


Good to hear another success story. :)
I'll amend the wiki when it's back up.


Where can I buy in Switzerland or Europe a DS3231S ?



Can someone suggest where I can get a few at reasonably costs or alternatively be prepared to sell and post a few to me directly please?


If you work for a university or a company that's somewhat electronics related you can probably get away with ordering free samples (I did). Otherwise maybe you can get in contact with Software_Samurai:

http://forums.rockbox.org/index.php?topic=7605.msg63600#msg63600
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 22, 2007, 08:25:53 AM
wiki?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pilot000 on January 29, 2007, 09:54:07 AM
I received 2 samples from maxim today for free (sent to switzerland). Now I have to wait until my new 2200mAh battery arrives. Then I will apply the mod to my player. Thanks in advance for the detailed illustrated instructions.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 29, 2007, 10:31:40 AM
Once the chip is installed and the software recognizes it, how do you set the correct time and configure it?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pilot000 on January 29, 2007, 10:45:29 AM
in the menu: "System Options / Time and Date / Set Time/Date"
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 29, 2007, 10:52:21 AM
Thank you.

I can't find the wiki that was refered to earlier. Is there more information there?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pilot000 on January 29, 2007, 11:35:20 AM
check this: http://www.rockbox.org/twiki/bin/view/Main/RTCModH1x0
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 29, 2007, 02:00:06 PM
Thanks again!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 01, 2007, 08:40:23 PM
I just got the DS3231S chips today. I'm going to start working on the mod this weekend.

How do I apply the RTC patch to Rockbox?
Also, I don't want to use the alarm feature. Is there something I have to do special?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 02, 2007, 01:50:40 PM

I just got the DS3231S chips today. I'm going to start working on the mod this weekend.


I wish you success.


How do I apply the RTC patch to Rockbox?


Have a look here: http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling


Also, I don't want to use the alarm feature. Is there something I have to do special?


1) you don't need to connect the pin SQW/INT to the play button pad
2) you don't need to uncomment the line

#define HAVE_ALARM_MOD

in the patch (i.e. leave it as  /*#define HAVE_ALARM_MOD */ )

But since you are using the DS3231S you won't have any startup problems, so if you feel comfortable with the soldering, you might as well have it.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 02, 2007, 02:03:49 PM
Great! Thank you, very much for the reply.

I will report back on how it went. Soldering is the part I am most comfortable with, as I am an electronics tinkerer. It's the patching code stuff that throws me...

PM sent...
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 02, 2007, 04:09:38 PM

Great! Thank you, very much for the reply.

I will report back on how it went. Soldering is the part I am most comfortable with, as I am an electronics tinkerer. It's the patching code stuff that throws me...

PM sent...


That simple guide to compling is not so simple.  ??? Would someone be willing to apply the RTC patch to Mmmm's latest build (with the recording Enhancements) for me and post it somewhere?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Bedlore on February 02, 2007, 07:00:06 PM
Howdy TaperChuck, I'll be attempting this mod tomorrow and also want to use the Recording Enhancements Pack so if I succeed I'll give you a copy, although if we can talk the REP maintainers to put it in themselves that would be the smartest solution.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 02, 2007, 08:39:31 PM
Cool, let me know how it goes.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 03, 2007, 11:53:04 AM
I know it's weird to quote oneself but here it goes:


OH MY GOD!  :o

I only dreamed that this was possible.  Only in my dreams could this be done.   :D
I will attempt this as soon as it has totally matured. This is truly amazing to me.

Thank you so much.


So now that the appropriate chip has been found that does both RTC and alarm without any installation caveats (other than the obvious ones) I would like to purchase four (4) DS3231 chips as I have three H1x0 units and want another H120. (don't ask why)

Does anyone have four chips to sell? And if so how much for then shipped to 10013?

Thanks.  ;D
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 03, 2007, 03:04:41 PM
Well, I installed the DS3231S and the recorder still works fine.  ;D
I used double sided carpet tape to anchor it to the circuit board and placed a small piece of electrical tape over it before I replaced the hard drive.

I just need some help getting the RTC patched REP version of Rockbox. Anyone...  ???
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 03, 2007, 09:46:02 PM

Well, I installed the DS3231S and the recorder still works fine.  ;D
I used double sided carpet tape to anchor it to the circuit board and placed a small piece of electrical tape over it before I replaced the hard drive.


Well done. :)


I just need some help getting the RTC patched REP version of Rockbox. Anyone...  ???


You can get the current svn (r12186) build with the REP patch from this post
http://forums.rockbox.org/index.php?topic=2513.msg65917#msg65917 and the latest rtc patch here: http://roolku.pwp.blueyonder.co.uk/rockbox_rep_rtc_r12186.zip.

Enjoy
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 03, 2007, 10:57:23 PM


Well, I installed the DS3231S and the recorder still works fine.  ;D
I used double sided carpet tape to anchor it to the circuit board and placed a small piece of electrical tape over it before I replaced the hard drive.


Well done. :)


I just need some help getting the RTC patched REP version of Rockbox. Anyone...  ???


You can get the current svn (r12186) build with the REP patch from this post
http://forums.rockbox.org/index.php?topic=2513.msg65917#msg65917 and the latest rtc patch here: http://roolku.pwp.blueyonder.co.uk/rockbox_rep_rtc_r12186.zip.

Enjoy



Thank you very much roolku! My RTC is working properly, now and I'm using REP too.  Add me to the list of happy modders who have done the RTC mod.

Chuck
Title: Success - Woohoo!
Post by: Bedlore on February 04, 2007, 02:28:18 AM
A huge thanks to roolku for contributing such a brilliant mod!  
Thanks to Software_Samurai for been willing to ship me the chips too.

I spent the first half of the day installing VMWare and working out how to compile in order so that I could use the REP flavour.  Then I saw roolku made that too, thanks again.  Will the REP pack always support the RTC by default now?

I thought I killed my unit at one point, I soldered two legs together on the U23 chip and without the right tools it took me a lot of scratching and reheating to get it off.  After I had finished the unit wouldn't boot but after I powered it from mains things came right again, phew.  So go very easy  with your solder and try not to use too much.

In summary I am extremely pleased, I have a habit of recording lots of files over months without clearing my unit.. now I will know when it was recorded to the second!   ;D
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 04, 2007, 06:16:34 AM
Glad it worked out for you two. :) I have added you to the list of successful modders.

As for the REP - the build I made is really a one-off, as the REP clashes badly with some of my other patches and I am not using it myself. Maybe you could work something out within the REP crowd?

Cheers
  Roolku
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pilot000 on February 09, 2007, 09:50:40 AM
Touchdown. My H140 is successfully modded. I received from Maxim 2 samples, but I broke one, because I've no experience with soldering. On the same time, I replaced the battery with a iPod 2200mAh.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 09, 2007, 11:19:32 AM

Touchdown. My H140 is successfully modded. I received from Maxim 2 samples, but I broke one, because I've no experience with soldering. On the same time, I replaced the battery with a iPod 2200mAh.


Congratulations! This makes 10 h1x0 players with the RTC mod that I am aware of. I wonder when we will reach critical mass for inclusion in SVN.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 09, 2007, 12:30:10 PM
I just received four of these chips from software samurai and will report back here when I mod my H120 and my two H140s. Will try to get to it over the weekend. Stay tuned.

(off topic but related) did you guys see this (http://forums.rockbox.org/index.php?topic=8716.0) post relating to USB charging for the H1x0?  Can any of you hardware gurus be of assistance?
(back on topic)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 10, 2007, 11:52:05 AM
I just bought an iHP-140 and plan to use the extra Maxim chip to mod that one as well.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 11, 2007, 06:01:12 PM
WHAT!!!!   ;D  :D  :)

I just performed the mod successfully. It took a while as this was the tinyest soldering I've ever done.

Booting into iRiver firmware works fine.
Booting into an unpatched version of Rockbox works fine.
Booting into the patched version of Rockbox gives me a beautiful Real Time Clock with functioning alarm.

Roolku, jimdearras, Software_Samurai... THANK YOU!

RTC on my H120!

W00t.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 11, 2007, 06:14:07 PM
Welcome to Team RTC!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 12, 2007, 03:15:55 PM
So as long as the modders use the DS3231 chips (instead of the DS1339c) what is the harm in including the patch into SVN?

I suggest modifying the Wiki page to tell new modders not to use the DS1339c and to use the DS3231 chips instead and then just put the code into Rockbox!

I'm going to mod my other units this coming weekend.  ;D
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 12, 2007, 03:24:56 PM

So as long as the modders use the DS3231 chips (instead of the DS1339c) what is the harm in including the patch into SVN?


Have a read here:

http://forums.rockbox.org/index.php?topic=2513.msg67109#msg67109

and test the patch with auto detection (especially with un-modded units).

Than it is just a question of lobbying the right person with commit access...


I suggest modifying the Wiki page to tell new modders not to use the DS1339c and to use the DS3231 chips instead.


Will do.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 12, 2007, 03:59:29 PM
Will test the auto-detect build before I mod the H140s.

What exactly should be done to insure that there are no unwanted side effects?

- What else?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 12, 2007, 06:59:25 PM

Will test the auto-detect build before I mod the H140s.


Thank you, I think it is more likely that I might have broken rockbox for units without RTC.


What exactly should be done to insure that there are no unwanted side effects?


Anything that I haven't anticipated.


  • Playback files.
  • Record some files and play them back.
  • Make sure not HAVE_RTC functions are present...

- What else?


Creating files on target by various means (text_editor, write cfg files, recording) and check that the fat timestamps and (if appropriate) the filenames are correct. Check if the scrobbler log still works. Check that RTC related menus only appear if there is an RTC mod. Check out what the clock plugin does. Or any other plugins that use the clock. Whatever action might possibly access the RTC and check if correct behaviour happens for modded and un-modded units...

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 15, 2007, 04:32:59 PM
The patched build of the REP Rockbox I got from roolku doesn't write the .cfg files the same as the regular build. They are much shorter and doen't seem to save settings the same as the regular build. I wish I understood how to patch the software better.  ??? Anyway, I need all the functionality offered by the regular REP build, but I also want the RTC mod code patched into it. For now, I'm going back to the regular REP build, until either the RTC mod is added in, or I can get a version that writes the .cfg files correctly.  :(
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on February 15, 2007, 04:48:15 PM
I have downloaded two different REP-RTC rockbox zipfiles.

rockbox_rep_rtc_r12186.zip
rockbox_rep_rtc_r12213.zip

Which one is the one you're using? Also (roolku) is the 12213 the latest version?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 15, 2007, 07:01:09 PM

The patched build of the REP Rockbox I got from roolku doesn't write the .cfg files the same as the regular build.


Huh? Can you give an example please (attach the cfg files). I am not touching the settings stuff and it would be a strange bug indeed.


For now, I'm going back to the regular REP build, until either the RTC mod is added in, or I can get a version that writes the .cfg files correctly.  :(


Well, Linus reviewed it and I changed what he wanted and synched it with the SVN. However with JdGordon's menu changes it goes out of sync sometimes on a daily basis and I am getting tired of updating it constantly. So I will do an update if someone is willing to commit it or if the updates have slowed down a little.


I have downloaded two different REP-RTC rockbox zipfiles.

rockbox_rep_rtc_r12186.zip
rockbox_rep_rtc_r12213.zip

Which one is the one you're using? Also (roolku) is the 12213 the latest version?


The 12213 is the one with the auto detection.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 15, 2007, 07:15:03 PM
config1 is the RTC build file
config2 is the normal REP build file

Please school me if there is something I am doing wrong, because I really like the RTC mod and plan to do it to another iRiver soon.

[attachment deleted by admin, too old]
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 16, 2007, 03:04:40 AM

config1 is the RTC build file
config2 is the normal REP build file

Please school me if there is something I am doing wrong, because I really like the RTC mod and plan to do it to another iRiver soon.


Well, I think you will find that this is part of JdGordons settings patch/commit. Try on official build and you will get the same short cfg file without the comments. I can only assume that your REP build is rather old.

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 16, 2007, 08:18:56 AM
The first one is the REP build that is in Mmmm's signature line. That's the most recent build isn't it?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 17, 2007, 06:56:39 PM
Well, I just moded an iHP-140 with a Real Time Clock. My second iRiver device with the RTC mod. I happen to have one of the chips left. If someone wants it, PM me...

BTW, Mmmm, just commited the new menu to his build. The version in his sig line has the new menu. :)

And Roolku, yes, the new build does have the truncated .cfg files, so I'm back to using the build you compiled a while ago. I freaked a bit, thinking something was wrong...

I would really appreciate it if someone would compile the new REP build with the RTC clock patch and post it somewhere. I really like the new menu.



Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 19, 2007, 02:42:22 PM
I will wait a little longer until the dust over jdgordon's menu changes has settled and update the auto-detection patch so it applies to svn. At that point I will also have a look if it still clashes with the REP and most likely compile a new version.

Until then you can still use the non-auto-detecting patch. This is what I have in my personal build and it still compiles for me.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 19, 2007, 02:51:31 PM
Great. Thanks roolku! :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 20, 2007, 04:21:41 PM

...I will also have a look if it still clashes with the REP and most likely compile a new version.


I have updated the rtc patch, but I can't find  an up-to-date REP patch. :(

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on February 20, 2007, 04:29:00 PM
http://homepage.ntlworld.com/martin.scarratt/Rockbox/rockbox.zip

Here is the link to the build in Mmmm.s sig line.  It has the new menu incorporated. Please let us know if you do patch it, I'd love to have the new menu on my RTC iRivers.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Mmmm on February 20, 2007, 04:38:17 PM
...I will also have a look if it still clashes with the REP and most likely compile a new version.

I have updated the rtc patch, but I can't find  an up-to-date REP patch. :(


There is an up to date patch in post#1 of the REP thread (http://forums.rockbox.org/index.php?topic=2513.msg17218#msg17218) in the recording forum.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 20, 2007, 05:38:37 PM

There is an up to date patch in post#1 of the REP thread (http://forums.rockbox.org/index.php?topic=2513.msg17218#msg17218) in the recording forum.


It gave me 3 failed hunks when patching current svn which seemed easy enough to fix, but the resulting code wouldn't compile for h120... I don't have the time to investigate further at the moment unfortunately. :(
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Mmmm on February 21, 2007, 01:14:44 PM
Ah, yes...it's gone out of date already  ::)

Just those #ifs and#ifdefs by the look of it......

Should be ok now.... Try the same link for the updated version
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: x1jmp on February 21, 2007, 01:57:50 PM
Yesterday I did my first soldering ever (we don't do this at school >:().

After some hours of difficult soldering under the microscope (at first connected Vcc to SDA...) the chip worked perfectly.

I had to use the "deprecated" DS1339c chips, because I first read about the DS3231 after I received the samples.

So the difficult part after the soldering was to disable the sqare wave, as I wasn't able set the alarm in advance because of the autodetect feature.

Unfortunately I have no soldering gun at home and forgot to take the remote with me. It ended up in switching the hold switch off, pressing a button and switching it on again very fast hoping there's no signal from th RTC chip  ;D
After some minutes I finally managed to get into settings menu for setting an alarm.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 21, 2007, 02:41:12 PM

Ah, yes...it's gone out of date already  ::)

Just those #ifs and#ifdefs by the look of it......

Should be ok now.... Try the same link for the updated version


Hi Mmmm,

I got the same compile errors as last night and on closer inspection it appears that I am missing the files user_action.c and user_action.h. Is it possible you forgot to include them in the patch?

EDIT:

I pinched the two files from an older version of the patch and it seems to work now. You could append the file below to your patch.

There are two minor clashes between our patches that were easily resolved. I have put a compiled build at the URL below. Please report any problems.

http://roolku.pwp.blueyonder.co.uk/rockbox_rep_rtc_r12213.zip





[attachment deleted by admin, too old]
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 21, 2007, 02:48:50 PM

Yesterday I did my first soldering ever (we don't do this at school >:().

After some hours of difficult soldering under the microscope (at first connected Vcc to SDA...) the chip worked perfectly.


This is really impressive. Congratulations. And under a microscope as well.

I'll add you to the "Hall of successful Modders" :)


After some minutes I finally managed to get into settings menu for setting an alarm.


Once you got over the initial hurdle you should be fine. During normal operation the battery will never discharge enough to fail the backup supply.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: stripwax on February 21, 2007, 05:48:43 PM
It should be possible to have the firmware autodetect the square wave too and automatically disable the alarm if the alarm has never actually ever been set before  (i.e. on the first reboot after installing the mod).  Has anyone looked into that or is it not really worth it?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 21, 2007, 06:05:56 PM

It should be possible to have the firmware autodetect the square wave too and automatically disable the alarm if the alarm has never actually ever been set before  (i.e. on the first reboot after installing the mod).  Has anyone looked into that or is it not really worth it?


I think it should be possible. In fact I expected it to work like that, considering it can disable a 'real' alarm. However since it is only a minor inconvenience after the initial installation I haven't looked into it again, especially as it would require me to power down the chip in order to test it.

EDIT:

I just had a look at the code and realised that I had in fact optimised away the functionality that was there originally in an attempt to save an I2C write. There is a new patch with it restored on the tracker - untested, but should work. Thank you stripwax for making me check again and apologies for the unnecessary grief that has caused.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Mmmm on February 22, 2007, 05:51:14 AM


Ah, yes...it's gone out of date already  ::)

Just those #ifs and#ifdefs by the look of it......

Should be ok now.... Try the same link for the updated version


Hi Mmmm,

I got the same compile errors as last night and on closer inspection it appears that I am missing the files user_action.c and user_action.h. Is it possible you forgot to include them in the patch?

EDIT:

I pinched the two files from an older version of the patch and it seems to work now. You could append the file below to your patch.

There are two minor clashes between our patches that were easily resolved. I have put a compiled build at the URL below. Please report any problems.

http://roolku.pwp.blueyonder.co.uk/rockbox_rep_rtc_r12213.zip

oops..yeah that'll be it! :D
I'm always forgetting that one!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on February 28, 2007, 09:33:49 AM
Good news: driver with runtime detection is now in svn! No more patching rquired.

Sorry Mmmm - that means you need to adapt the REP again. Should be a simple fix though.

EDIT:

I have changed the wiki page a bit to clarify the two options and add the fact that the code is now in SVN. Please feel free to correct or improve it if you think something is not clear.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: mlind on February 28, 2007, 04:11:32 PM
Anybody outside the US who managed to get your hands on the D3231 chip?
Sweden?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Mmmm on February 28, 2007, 04:16:18 PM
Good news: driver with runtime detection is now in svn! No more patching rquired.

Sorry Mmmm - that means you need to adapt the REP again. Should be a simple fix though.


Consider it fixed! :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: x1jmp on March 01, 2007, 02:30:07 PM

Anybody outside the US who managed to get your hands on the D3231 chip?
Sweden?

Not the D3231, but I received some DS1339c within a few days without any problems.
The Chips were shipped from Belgium.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on March 01, 2007, 03:09:29 PM

Good news: driver with runtime detection is now in svn! No more patching rquired.

Sorry Mmmm - that means you need to adapt the REP again. Should be a simple fix though.

EDIT:

I have changed the wiki page a bit to clarify the two options and add the fact that the code is now in SVN. Please feel free to correct or improve it if you think something is not clear.


I just loaded the latest current build onto my Modded H120 and it is not showing me a RTC.

I cleared settings. It was working with a patched REP build. FYI.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Llorean on March 01, 2007, 03:13:01 PM
The code is in SVN now, but not in the default builds (since it adds 4k to the binary size).

If you compile yourself though, it's I believe just a case of changing a define in the target .h file from #if 0 to #if 1.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on March 01, 2007, 03:14:18 PM
Just noticed:

1 Mar 12:47   Linus Nielsen Feltzing    firmware/export/config-h120.h  [diff]
   H100: Disable RTC support by default, for now

Ooops  :-[

My dev environment went poof a while back so I'll just an old custom build I got from roolku.

Sorry for the false alarm!  :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: pixelma on March 01, 2007, 03:29:09 PM

The code is in CVS now, but not in the default builds (since it adds 4k to the binary size).

First it was 6k but... I think the more important reason was that all H1x0 (regardless of mod) had gotten the clock plugin for example.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Llorean on March 01, 2007, 03:30:13 PM
Yeah, that is an important point, people ending up with plugins they can't use.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: luminol on March 08, 2007, 01:36:58 PM
I installed DS3231 on H120.
It was a pleasant work process to be excited at!

This RTC is very precise.
(Is influence to battery slight?)

I thank roolku, jmdearras and people of "Team RTC".  :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: syrou on March 09, 2007, 06:25:52 AM
I have also installed the RTC chip, pretty easy stuff if you have ever modded a PS2  :P

Just recommend to any of you that are going to mod the player that you use AWG30 wrapping wire to solder connections between chip and motherboard. Don't have to worry about Vcc/GND pins because it has an active current (Icc) of just 0.1mA  :o

I have use double sided fixing tape to "glue" the chip to the motherboard, and have put it upwards (as recommended in the wiki). It's a pity that autodetection code has been taken out from the code.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on March 09, 2007, 07:55:29 AM
Congratulations to the two new successful modders. I have added you to the wiki table:

http://www.rockbox.org/twiki/bin/view/Main/RTCModH1x0#User_Experiences

(if anyone is misrepresented, please correct the entry)

Roolku
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on March 11, 2007, 10:29:37 AM
Don't forget to move your clocks ahead one hour for Daylight Savings Time, which started at 2:00 am in most US cities.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: syrou on March 11, 2007, 04:06:35 PM

Don't forget to move your clocks ahead one hour for Daylight Savings Time, which started at 2:00 am in most US cities.


Not yet here in Europe!  ;) We move our clocks last sunday of March.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on March 11, 2007, 05:04:56 PM
Yeah, our politicians decided to move the date up a bit  ???
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Peter200lx on March 17, 2007, 05:29:35 PM
Just wanted to report a successful upgrade from the old RTC chip to the new one. ie, Now I don't have to worry about the play button lockup bug. Went quite smoothly, everything working great.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: crypt@ on April 15, 2007, 10:41:12 AM
I won't call it smoothly performed, as it took 8hrs and killed 4 * DS3231(SN#). 24AWG wires are still unmanagable on these weak SOIC legs. All 4 chips sustained broken pins while trying to fit the chip into position on the motherboard.

The successfully installed chip is a DS3231S#.

Instead of completely straighten the legs, I only straighten the ends such that it is still angled to the body, but when placed on the board, the legs do not touch the surface. And also it is installed face upwards.

After jamming the fifth chip into the iHP-140, and closed out, it could not power up on battery. It was fixed by plugging in the charger, then powered on.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on April 15, 2007, 10:51:44 AM
But, success in the end! Congrats!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: crypt@ on April 15, 2007, 11:03:22 AM
Just a thought, shuffle is seeded by Mersenne Twister dued to lack of RTC on h1X0. Now that RTC on iriver is possible, is there a chance that the RTC can be used to seed the shuffle list?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on April 15, 2007, 11:30:49 AM

Just a thought, shuffle is seeded by Mersenne Twister dued to lack of RTC on h1X0. Now that RTC on iriver is possible, is there a chance that the RTC can be used to seed the shuffle list?


I am not sure I follow. Mersenne Twister is the algorithm, not the seed. And all of rockbox's RTC features should work now, so if RTC is used on other targets to seed the generator, it is for the modded h1x0.

Congratulations by the way. I have added you to The List. :)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: crypt@ on April 15, 2007, 11:29:41 PM
Oops, I actully meant to ask "if RTC is used in srand to provide the seed for Mersenne Twister"?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: safetydan on April 15, 2007, 11:35:20 PM
From a quick look at the code it looks like the seed for the playlist shuffle is actually the current_tick not the current time. The current_tick is the number of ticks since the player was booted and updates at 100Hz if I remember correctly. So it should be pretty random regardless of whether the target has an RTC or not.

So to answer your question, no the RTC is not used to seed the shuffle randomness, but it doesn't matter anyway as what is used to seed it is good enough.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Heriver on June 06, 2007, 09:05:50 AM
Hello.

First:
I've compile the soure with the RTC enable and after a few try's, it must be good.
No error's but only 2 remarks.
I have installed to the H120 and it start-up ,wow, try some thing's looks good,
and i see an empty time, only this --:--
and thats my problem now, how do i get these IC's?
Some visit at Maxim's site doesn't sound good.
EDIT: I have r'ved  these DS3231S IC's finaly!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on June 06, 2007, 04:13:52 PM
Has anyone patched the 05-13 build of Mmmm's REP with the RTC code?
I haven't been able to run the RTC after I had some problems with an older REP build and would like to get the RTC up and running again. I tried reading through the stuff on patching and gave up  :(
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Heriver on June 06, 2007, 06:45:47 PM
Hello TaperChuck.

Within 24 hr (and a night over) I've installed CygWin, and followed the instructions
mentioned in the Wiki.
I have stopped to that point before the Patch-command, i've looked if i have these utils
downloaded and installed, and i have!
But it is not usefull for me to go further because i can't test without the Dallas chip's.
Compiling the source is also time consuming, it was about 1h15 and 100% CPU-load.
But your question was,how to patch
This commands must/can be used:

cd to/source/root ; (maybe a dummy)

and follow by:

patch < patchfile  

I don't know if this right,
because Cygwin give already an error with this command ../tools/configure , caused by the double dots ../
But i'm not sure if these are the only commands, or maybe more commands to follow.
I see we have both or worries!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on June 06, 2007, 06:59:34 PM
Yeah, I don't have the patience to do the patch. After my initial attempt, I gave up. All I can hope for now, is that a kind soul will share a patched version.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Davide-NYC on June 06, 2007, 08:41:28 PM
I would be willing to do it the day Mmmm releases a new version. No later.
Otherwise the code is likely to be too far out of sync for me to bother.
I'm not a dev! I just love the rockbox.

(Just purchased a Toshiba Gigabeat F today! W00t!)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on June 06, 2007, 08:51:38 PM

I would be willing to do it the day Mmmm releases a new version. No later.
Otherwise the code is likely to be too far out of sync for me to bother.
I'm not a dev! I just love the rockbox.

(Just purchased a Toshiba Gigabeat F today! W00t!)



Cool. Please post here if you do patch the next build. I'd be happy to have any of the post 05-01 Mmmm REP builds patched with the RTC code...
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: ItsJustMe on June 08, 2007, 08:53:21 PM
Me too! ;D
Mmmm, please release a new version. I have some problems with version 07/05/13.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bpfiguer on June 24, 2007, 12:35:50 AM
I just finished the real-time clock mod in my iRiver H140.
Could somebody provide me a Rockbox build that has the real-time clock driver enable? I don't know how to compile Rockbox. Thank you
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: roolku on June 24, 2007, 08:14:54 AM

I just finished the real-time clock mod in my iRiver H140.
Could somebody provide me a Rockbox build that has the real-time clock driver enable? I don't know how to compile Rockbox. Thank you


http://roolku.pwp.blueyonder.co.uk/rockbox-r13696M-070624.zip

Better learn how to compile as this will go out of date in no time... ;)

Which RTC chip did you use?
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bpfiguer on June 24, 2007, 09:40:56 AM


I just finished the real-time clock mod in my iRiver H140.
Could somebody provide me a Rockbox build that has the real-time clock driver enable? I don't know how to compile Rockbox. Thank you


http://roolku.pwp.blueyonder.co.uk/rockbox-r13696M-070624.zip

Better learn how to compile as this will go out of date in no time... ;)

Which RTC chip did you use?



Thanks for your help, I used the DS3231S chip. Now the RTC is working.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Heriver on July 23, 2007, 12:27:42 PM
Finaly.
EDIT: I have mounted 2 RTC-chip's (3 to go,if...) topside-up.
I've bend a bit the pin's up so they are free from the PCB, but they are not flat!
At the location i used insulation tape and glued the chip on.
I've used Wire-Wrapping wire and pre-solder it first then soldered at the desired pin locations.

I have used a RTC enable-build from begin june, that i have already compiled (as a studycase),
and the RTC is working now.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: johnp_g on October 09, 2008, 01:56:29 PM
Hello!

At last I bit the bullet and did the RTC mod to my H120!
 :)

I got 2 free samples of DS3231SN from Maxim, sent to the UK and have just installed the chip, upside down as per the original mod sheet, using enamelled copper wire 0.25mm dia.

I just checked out the latest r18756 and compiled with RTC support.

Amazing, works first time and seems to complete the perfect H120!

Thanks for the mod and the compilation config to allow it to be enabled easily.

Cheers,

John
 

Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: poPFxv8V1 on January 16, 2010, 08:14:41 AM
Just wanted to report another successful RTC mod using the ds3231.

I departed a bit from the instructions though:


Attached is a picture of the finished product.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: TaperChuck on January 17, 2010, 01:10:22 PM
Good job. It's good to see people still doing this. I still have not found a better 44.1 k recorder/player than the hP-120/140...
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: botinky on January 27, 2010, 01:30:42 PM
nice job ;D
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: GaardenZwerch on February 15, 2010, 08:00:36 AM
Did the mod last week (DS3231SN from maxim). It went so well that it was almost no fun at all  ;)

Frank
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: jayjech on February 06, 2011, 05:09:27 AM
Another year, another successful RTC mod.  I used the DS3231SN and mostly followed poPFxv8V1's revisions.

Thank you to everyone who contributed their comments, experiences, etc.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bpfiguer on April 16, 2011, 02:33:56 PM
Does anybody have Rockbox 3.8 with real time clock enabled for iRiver h1x0 ? I am not familiar with programing for Rockbox. Thank you!
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bluebrother on April 16, 2011, 03:45:40 PM
Does anybody have Rockbox 3.8 with real time clock enabled for iRiver h1x0 ? I am not familiar with programing for Rockbox. Thank you!

You don't need to know how to program just to build Rockbox :)
http://www.alice-dsl.net/dominik.riebeling/rockbox/rockbox-iriverh120-rtc-3.8.1.zip
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: E on January 30, 2016, 06:51:15 AM
Sorry, this topic is very old, but I was wondering if there still is a RTC-version of Rockbox available for those who doesn't do programming of rockbox? The link above does not work any longer. Could you please post a link here? Regards E
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: wodz on January 30, 2016, 12:56:17 PM
You may ask on IRC. There is a chance some dev with toolchain handy can build it for you almost instantly. Otherwise PM me and I'll build it for you.
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: mih140 on February 01, 2016, 05:43:51 AM
Maybe an old thread, but not dead !
Recording from optical entry is so precious for me, but
I'm fed up with all those records on 2008-10-19 !!
I've finally gotten a Maxim chip ;)
Before the electrical mod, I'm looking for a recent compatible RB version ...
Thanks for your help
MB
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: bluebrother on February 03, 2016, 02:31:13 PM
As I said before, you don't need to do programming for Rockbox to be able to build it. And all versions are "compatible". It's just that the official builds have RTC support disabled, so the RTC simply won't be available.

Anyway, I've created a build for Rockbox 3.13.

https://drive.google.com/folderview?id=0B8pPsvGJ3RdKRVY4aHZjeVNwLWM&usp=sharing
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: mih140 on February 06, 2016, 11:15:39 AM
THANKS  so many :D

I'm a simple old win xp user, and it seems very difficult for me even to install the cross compiler :(
I've updated my H120, (recovering all my presets !) ... and
I will post back, for (I hope) a successful mod !
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: wodz on February 06, 2016, 02:20:54 PM
running VM is not hard (and considerably easier then setting up cross compiler on WIN suitable to build rockbox)
Title: Re: iriver h1x0 - RTC (real time clock) mod
Post by: Datman on August 25, 2018, 04:38:59 PM
Hi all

I made this mod many years ago and it worked fine. At that time, the H120 was my only mp3 player, then I was using it every day. Later I bought a smaller player with microSD card and I kept the H120 mainly for recording, via mic in or, for better quality, via optical in (by a Behringer DEQ2496 as a converter).

After some time, I found the battery flat, so I recharged it, but it went low more times. I suspected the RTC mod... Some days ago I noticed that after a full charge the player works for only a few minutes, then the HDD doesn't spin up. It tries indefinitely, until I reset the player!

Only today I opened the H120 for replacing the battery with another one I had from an old broken H120 and I measured battery drain:
HDD running: 580~680mA
Playing: 55~60mA
Off: 436uA (! with DS3231)
Off, after disconnecting pin 14 (Vbat) of the DS3231: 155uA.

A 1,3Ah battery, then, can last about 22h playing (a bit less, because sometime the HDD is running) and:

8400h (about 1 year) Off without RTC
2980h (about 4 months) Off with RTC.

Deep discharging damage a Li-po battery. :(