View previous topic :: View next topic |
Author |
Message |
nicofer
Joined: 01 May 2013 Posts: 90 Location: GRJ
|
Posted: Sun Mar 23, 2014 9:39 pm Post subject: |
|
|
RDS TIME & date info .
This is an easy way to get and set TIME and DATE without GPS or web interface .
I wish they would make alarm clocks that would use this to set the time/date itself once switched on and tuned .
The FM decoder chips are very small and signal is normally strong enough with short antenna.
The other "automatic" method is to use a GSM module and then request the info from the service provider.
Cheers |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Sat Apr 05, 2014 8:14 pm Post subject: |
|
|
Lots of people browsing this thread, are any of you actually using this great code?
It is a lot of code to digest for me and learning more about the RDS standard but I have been working my way through it.
Thx again Roger, it has saved me so much time and has taught me a lot more about BASCOM programming.
Even learning a bit of German, as I go through the code's comments
So it will be some time, as I integrate it into my code and start testing it all out.
I will look at updating the system clock/calendar (RTC) with the time/date data from the RDS stream.
It can be a handy feature, to sync/setup the clock/calendar, if I determine that the RDS data stream is reliable.
I think the best is to have a function to explicitly synch the two up and not make it an automatic function.
Cheers
Rick |
|
Back to top |
|
|
astroschmidt
Joined: 04 Sep 2010 Posts: 33
|
Posted: Sat Apr 05, 2014 8:53 pm Post subject: |
|
|
rsavas wrote: |
I will look at updating the system clock/calendar (RTC) with the time/date data from the RDS stream.
It can be a handy feature, to sync/setup the clock/calendar, if I determine that the RDS data stream is reliable.
I think the best is to have a function to explicitly synch the two up and not make it an automatic function.
Rick |
Hi Rick,
but remember that there are 4 levels of error-correction of the RDS data that you can set the Si4735 to.
Even if you set it to the highest level (data valid only with 0 errors in an RDS-block) the time and date could still be wrong from time to time especially when the SNR-level is low.
For a check you could compare the RDS time and date exactly 1 minute later whether there is only a minute difference in the two RDS date and time variables.
Then you can be 99,99% sure, that time and date are valid.
Kind regards
Roger |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Sun Apr 06, 2014 2:33 am Post subject: |
|
|
Hi Roger,
You have studied AN332 and the RDS spec's both very well. I have AN332-v0.9 open while I am looking through your code.
Good ideas with the clock cross checking feature. From what I see S/N below 25dBuV, RDS is not usable. I guess it can come down to who's clock is more accurate or who has recently synch's their clock to a National standard.
I have basically taken all of your sub routines and folded into my library. Good to see you used new names over the original ones except for a few.
I have replaced all the common variables in my code with the ones you used. Who knows we may trade code back and forth.
Few things to work out in the UI/control structures etc.
I am also working on getting all the properties into eeprom, not just not the original ones (16) that were chosen, so your structuring helps me with this task. That way I can put together with my setup menu structure.
I am also working on editing the favourites, now that I have 50 each of them, not so easy to delete individual ones, all or nothing with this present code.
For the properties, the legacy is the windows gui since I have not done any work on this. Menus for only set 16 properties. Do you use the windows gui? I did a bit of extras commands on the terminal interface.
A question to ask you, if you where to design/ improve the DSP radio project, what features would you like to have, how about ordering features from most to least important. I know, #1, more Flash, bootloader ... Something that you can put in a nice enclosure and look professional.
I also need some ideas what to do as a next revision. I was thinking a stuffing option for either a Si4735 or a Si4770, possible external DAC or S/PDIF output. I have a Si4770 design finished but do not want to fab until I develop the current hardware and software. It is a big job. I wonder how long it took you to get your code to where it is, no dates on revisions.
So it is a slow and steady go ... in between periods of the hockey game and other stuff
Cheers
Rick |
|
Back to top |
|
|
astroschmidt
Joined: 04 Sep 2010 Posts: 33
|
Posted: Mon Apr 07, 2014 11:02 pm Post subject: |
|
|
Hi Rick,
rsavas wrote: |
For the properties, the legacy is the windows gui since I have not done any work on this. Menus for only set 16 properties. Do you use the windows gui? I did a bit of extras commands on the terminal interface.
|
Because I use the DSP-Radio basically as a standalone-device I didn't do much with the windows-GUI except for tryying it once with the original software.
In fact one of the "features" of the extended firmware was to make the features of the windows-GUI available with the rotary-encoder and the push-buttons.
rsavas wrote: |
A question to ask you, if you where to design/ improve the DSP radio project, what features would you like to have, how about ordering features from most to least important. I know, #1, more Flash, bootloader ... Something that you can put in a nice enclosure and look professional.
|
#1: A bigger LCD (20x4 or 40x4 would be great) with the push-buttons and the rotary-encoder directly below the LCD.
That way the LCD can show the momentary function of the push-buttons and the rotary-encoder ("soft keys")
#2: More Flash
#3: Perhaps 1 or 2 more rotary encoders so that you don't have to change between frequency-control and properties-control with the menu (though there are no more hardware pins available with the ATMega 168/328)
I used the so-called "Elektor project box" as a case which is basically two sheets of acrylic and some standoffs between them.
Because I have access to a lasercutter at the local fablab I engraved the front panel acrylic plate and cut out the holes for the push-buttons etc.
Looks quite nice and now I am working at a nice LED side-illumination so that the engraved inscriptions light up.
Advantage and disadvantage at the same time is that the "project case" is open at the sides.
That way one has access to all connectors but dust and dirt can crawl into the project case from the side.
Another idea would be to implement 2 speakers into the case so that the character of a standalone-device is still more pronounced?
rsavas wrote: |
I also need some ideas what to do as a next revision. I was thinking a stuffing option for either a Si4735 or a Si4770, possible external DAC or S/PDIF output. I have a Si4770 design finished but do not want to fab until I develop the current hardware and software. It is a big job.
|
That's up to you to find your desirable additional features
rsavas wrote: |
I wonder how long it took you to get your code to where it is, no dates on revisions.
So it is a slow and steady go ... in between periods of the hockey game and other stuff
|
Well I didn't count the hours. Sometimes it were whole nights
In the mean-time I found 2 bugs which I will correct in the near future.
Perhaps somebody else tries out the firmware in the mean-time because I am sure there are still some minor bugs hidden in the code.
Kind regards
Roger |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Tue Apr 08, 2014 6:23 am Post subject: |
|
|
Hi Roger,
Thanks for your feedback.
Quote: | #1: A bigger LCD (20x4 or 40x4 would be great) with the push-buttons and the rotary-encoder directly below the LCD.
That way the LCD can show the momentary function of the push-buttons and the rotary-encoder ("soft keys")
#2: More Flash
#3: Perhaps 1 or 2 more rotary encoders so that you don't have to change between frequency-control and properties-control with the menu (though there are no more hardware pins available with the ATMega 168/328) |
So basically I have done as you suggested, see attached pic showing what I have come up with, The tuner pic is too big to upload so the only low resolution, is the alarm menu with the big digits. I will try to get a low res of the tuner menu.
When I first did the pcb layout of the portable media player, I was thinking that I would use the old standard lettering for the front panel under the encoder/switched. Then when I was writing the code, I clued in that it was so much easier to use the bottom row as the menu soft keys. That way I could easily change the menu labels based on the op states. Well of course I screwed up the mechanics, encoders were not center to the pcb, thus the LCD is offset from the centroid. Oh, well next rev
Quote: | Looks quite nice and now I am working at a nice LED side-illumination so that the engraved inscriptions light up. |
That is a nice effect. I liked how Marantz did there stuff, with the tuner pointer getting lit up and dial light through the acrylic. People still love the old analog tuner dials, so one could do the same thing on a graphics lcd, yet another enhancement. I have been looking for a color graphics lcd the same size as my 4x40, but to no luck.
The mechanical/industrial design is a challenge for me. I used a cheap Hammond AL box for my two proto's. With wood sides they would not look so bad.
Completely surround the project case in plexiglass, to keep the dust/dirt out, great effect as well.
Having a complete stereo in a boom box, like an old ghetto blast is a good application. This was my idea, to do my own h/w, so that I could make a complete stereo unit except for speakers, but that is just a couple of tuned boxes. I recently helped my friend fix up his old beloved JVC RC-M90 blaster. It was TOTL back in its day, I think he said he paid $650 CDN back in the 80's = nuts, so it got new speakers, good cleaning for years of party spills and deox the pots/switched, new AC cord, IEC socket.
Check out the Maxim for a modern version.
http://www.maximintegrated.com/app-notes/index.mvp/id/4320
Keep me posted,
Take care
Rick |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Wed Feb 25, 2015 12:42 am Post subject: Code ported to xmega |
|
|
Well it has been a while, but I persevered and have Roger's code up & running on a xmega xm128a1, listening to FM radio.
Seems I was stuck for a long while, as I was getting a compiler error that made no sense & I could not figure out why.
Well, with the latest compiler, the problem all of a sudden was fixed, don't know why but thx Mark anyways, you solved my problem
Since I do not have the original hardware, Elektor DSP radio, I have manged to piece together a working prototype using some Sparkfun h/w, a XMega100 BOB, mounted on a protoboard with additional components equivalent to the Elektor DSP radio pcb & the obsolete Si4735c40 shield.
I had to do some mod's to the Sparkfun Si4735c40 shield to get it to work.
Since it is essentially Roger's enhancements to the original Elektor code, I will post the xmega code if anyone wants to use it, but if you use it on different h/w, it will require mods to match.
It is a lot of code but, I do not understand all the code enhancements. BUT have to thx Roger again for this great contribution.
Cheers
Rick
Report : Elektor DSPradio new(xmega) 1
Date : 02-24-2015
Time : 18:05:12
Compiler : BASCOM-AVR LIBRARY V 2.0.7.8
Processor : XM128A1
SRAM : 2000 hex
EEPROM : 800 hex
ROMSIZE : 22000 hex
ROMIMAGE : C864 hex -> Will fit into ROM
ROMIMAGE : 51300 dec
FLASH USED : 39 %
UART1 : 0.01 % ERROR
XTAL : 32000000 Hz
Stack start : 3FFF hex
Stack size : 80 hex
S-Stacksize : 80 hex
S-Stackstart : 3F80 hex
Framesize : 100 hex
Framestart : 3E00 hex
Space left : 5917 dec |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Feb 26, 2015 2:37 pm Post subject: |
|
|
hi Rick,
cool you got it working on xmega. it would be nice if you can upload the code and the circuit. DSP radio seems to be the future. _________________ Mark |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Fri Feb 27, 2015 12:37 am Post subject: Si435 enhancements running on xmega |
|
|
Hi Mark and other interested folks,
I am listening to the Beatles "Something" now using this setup. The scrolling RDBS data radio text data helped
I have the radio kludge hooked up through the aux audio i/p on the portable radio, so I can use the pre/power amp to drive my speakers.
One heck of a speaker "pop" when switching to/from Am/FM. In the portable s/w I muted the pre-amp when switching Am/FM. I guess with a small speaker it is not as bad, but with a 25W amp it is a loud "pop"
With this setup, I will try first by mod the code to mute the Si4735 when switching from AM/FM. See if a few pull downs on opposite sides of the AC coupling caps will help = more testing.
Rogers code is configured for Europe, so it needed some mod's to work better in US/Cdn. 200KHz FM step incr, 10KHz AM step, deemphasis to 75us. The code structure is easy to work with and mod, like I said it is a fantastic contribution.
As a general enhancement, I need to add/figure out a way to dynamically change the radio run configuration based on locale.
The original h/w display of 2x16, is a limiting factor, Roger has made the most of it.
I have yet to test out the volume control that used a pot hooked up to an ADC port.
I can not post the high res documents due to the 500KB limit
I have two jpeg images that are 3.5MB each.
I will email them to you, I think I still have it yes I do = enjoy
Cheers
Rick |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Feb 27, 2015 4:00 pm Post subject: |
|
|
thanks ! appreciate it.
When you (or other users) have problems with the upload quota just write to support. We can increase it. _________________ Mark |
|
Back to top |
|
|
astroschmidt
Joined: 04 Sep 2010 Posts: 33
|
Posted: Sun Mar 01, 2015 11:18 pm Post subject: |
|
|
Hi Rick,
great you got it working and found the places in the code to change the settings to US AM/FM-reception.
If you find any errors in the code please report here.
I still could not test all the "new" features
Best regards
Roger |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Sun Mar 01, 2015 11:47 pm Post subject: |
|
|
Hi Roger,
Good to see that you are still lurking about.
I am still getting familiar with the op u/i and the code details.
Of course I will report any bugs and hopefully be able to post a fix.
If anything I have enhancements too add, which I can also post if folks are interested.
I did notice the "st" symbol scrolling infrequently in the RText scrolled LCD display data, why?, I have no idea.
Need to verify if it is only in the LCD scrolled data or the rs-232 too.
I have two stations sending out time/date information. Both do not match the current time nor each other. Another one I have no idea as to the cause. Could be the sources!!
I folded in my US/CDN PI decoder, it presently gets added to the rs-232 stream with the "j2" command.
As far as testing all of the RDS advance decoding features, I am limited too, as in N/America, broadcasters just use a limited sub set of the standard and I do not thoroughly know the standard differences between RDS & RDBS.
If I was in your neighborhood, I'd buy you a nice dinner.
So far, as I can tell, your code is running great, below is an example.
RDS-Data over RS-232 --> Enter Control Byte: 22
PI = $C6D2 = %11000110 11010010
CICZ
TP = 0 : No Travel Program
TA = 0 : No Travel-Announcement
Music or Speech: Music
Program-Type: 5 = Education
Decoder-Information: Stereo, Uncompressed Transmission, Static PTY
Program-Name: BIL BY
Frequenz: 104.10 MHz
Country-Code: MT or GB or LT or nn or nn or
Area-Coverage-Code: Regional R3
Program Reference Number: 210
Language: nn
Radiotext (Länge): 41
PIANO MAN BY BILLY JOEL ON THE DOCK 104.1
Cheers
Rick |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Mon Mar 02, 2015 4:28 am Post subject: |
|
|
One enhancement, one that I was working on, is being able to delete entries in the stored favourites, "Fm_memory(50) As Word" & "Am_memory(50)" As Word. There are times when one puts in the same station or when you want to remove one entirely. I guess the code can be written to check that the new entry is not all ready entered. Another feature I thought of was to be able to sort them from lower to higher frequency. Lots and lots of ways to improve the features. |
|
Back to top |
|
|
astroschmidt
Joined: 04 Sep 2010 Posts: 33
|
Posted: Mon Mar 02, 2015 4:35 am Post subject: |
|
|
Due to the limited flash-rom in the ATMega328 there will be no place for any other features/enhancements with the orginial Elektor DSP-Radio.
Some features were already disabled to have enough space for the mandatory features.
That´s why with the ATMega 328 only bugs can be fixed.
Roger |
|
Back to top |
|
|
rsavas
Joined: 10 Aug 2010 Posts: 197 Location: Baldwin, Ontario
|
Posted: Mon Mar 02, 2015 10:25 pm Post subject: |
|
|
Yes it is unfortunate that you have hit the limit for the Elektor DSP radio hardware.
But the radio functions perfectly without any further expansion. It could be configured for North America, or Japan for instance, like I am doing, without going over the Flash limit.
To make things simple for expansion, if required, I suggest to design a specific tqfp(m644?) to 28 pin dip adapter(m168/m324), similar to the Si4735 adapter. I could bang one of those out in less than a day, if you want to order from a pcb fab. Name the part?
So I am on my own with enhancements, unless others want to participate in extending your base code, as I am doing.
For that I should start a new thread. Meanwhile I will report anything in your code that requires fixing.
I know one thing that I need, is IEC 62106, they want 330 Euro, so I am thinking about that one.
http://webstore.iec.ch/Webstore/webstore.nsf/ArtNum_PK/43224!opendocument&preview=1 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|