UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Television Standards Converters, Modulators etc

Notices

Television Standards Converters, Modulators etc Standards converters, modulators anything else for providing signals to vintage televisions.

Closed Thread
 
Thread Tools
Old 5th Aug 2011, 3:18 pm   #121
ppppenguin
Retired Dormant Member
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Simple memory card player idea

Quote:
Originally Posted by Karen O View Post
You probably know that, with both buttons pushed in on the TV9-90, this nice little TV accepts a UHF signal but uses a 405-line line frequency.
I'm aware of that trick but have never had to use it since I have the A/V version of the TV9-90 with the "lump" on the side. They really are most useful little sets.
ppppenguin is offline  
Old 5th Aug 2011, 6:24 pm   #122
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Simple memory card player idea

Wow, that's looking pretty good!

Are we going to get a diagram and some code - I'd really not mind doing something like that up myself!

Dom
dominicbeesley is offline  
Old 5th Aug 2011, 8:15 pm   #123
jjl
Octode
 
jjl's Avatar
 
Join Date: Jan 2003
Location: Ware, Herts. UK.
Posts: 1,082
Default Re: Simple memory card player idea

Quote:
Originally Posted by Karen O View Post
I've yet to see the effects of bad blocks.
You are most unlikely ever to see any bad blocks until your compact FLASH card is completely worn out. All CF cards made in the past 10 years or so, all SD cards and all USB FLASH drives contain a microcontroller that manages bad blocks, wear levelling etc.

John
jjl is offline  
Old 5th Aug 2011, 10:07 pm   #124
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: Simple memory card player idea

I wonder if it slows down at all and "skips" while its hunting but I suppose most of the magic occurs during writes which we're not worried about in this case.

Dom
dominicbeesley is offline  
Old 6th Aug 2011, 8:37 am   #125
jjl
Octode
 
jjl's Avatar
 
Join Date: Jan 2003
Location: Ware, Herts. UK.
Posts: 1,082
Default Re: Simple memory card player idea

Yes, block management is usually performed when writing.

John
jjl is offline  
Old 13th Aug 2011, 7:33 pm   #126
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

I'm back from a relaxing week of horizontal rain and airborne sand

Kat, we've been trying to get the script to run but we keep getting the complaint:

Unrecognised option: -vf

Thinking we had an old copy of Ubuntu/ffmpeg we installed Ubuntu 11.0.4 and ffmpeg 0.6.2-4 but still we get the same complaint.

Any ideas where we're going wrong?
Karen O is offline  
Old 13th Aug 2011, 8:35 pm   #127
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

It's okay - we recompiled ffmpeg and it works!

We have moving pictures!!!!!!!
Karen O is offline  
Old 14th Aug 2011, 4:45 pm   #128
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

I have video playback working perfectly but it wasn't the case to start with: approximately once per second there was a discontinuity in a frame. I found such a frame using my rewind/fast forward buttons and it was immediately obvious that some page boundary (actually 4MByte) was being crossed which caused a line and a half to be lost while the card sorted itself out internally.

I feared this sort of thing might happen. The fix is straightforward though - don't cross 4MByte boundaries within a picture. I've gone further than that and ensured that no field crosses a 256 sector boundary. I did this because I can't predict the internal implementation of CF cards and so my feeling is that as few as possible boundaries should be crossed within the video, even if this impacts on total playing time (my 8GByte CF card can still store over 20min of 405 lines).

I'm VERY happy with the quality of the playback - much better than I expected with a resistor video DAC (the artifacts I had before turned out to be caused by the JPEG compression of the photo I downloaded!)

Next step: get audio working, and despite all the help Kat has given that has enabled me to get the video working I'm going to be cheeky and ask for help on the audio side

Basically, I'm going to do a run of ffmpeg prior to the video conversion run (involving reinterlace.c) to generate a raw audio file. It won't be too big - audio is 1% the size of the video.

I need ffmpeg to produce a raw file of monophonic 16 bit samples at 40500 samples per second. Is that possible? I'll settle for stereo and convert to mono in reinterlace.c
Karen O is offline  
Old 14th Aug 2011, 11:24 pm   #129
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Simple memory card player idea

Hi Karen,

Bear with me, I'll look into it. If FFmpeg won't do it, I'm convinced I'll be able to find something that will. (My general impression of using Linux for some years is that if I think something should be possible, it probably is. How to achieve it is another matter entirely...)

Given your comments about your DAC, I'm now inspired to try something similar. I've had a few ideas for adding technically correct sync to the 405-line output from the Linux system. It'd be nice to get a test pattern if the computer's video input is missing or running at the wrong line/frame rate. Plus with no input it'd make a handy little box with a test card in it. Video DACs seem to be various combinations of spendy, surface-mount and over-specified for 405-line video.

Oh, here might be as good a place to ask as any; I haven't played with PICs at all but reckon I should. I've now got a (cheap) parallel-port programmer (which I'm currently reverse-engineering, as one does) which will program some of them. So I'm running out of excuses and really should stop using either a Z80 or a board full of CMOS for everything!

Do you happen to know if a PIC would object unduly if its clock were externally-generated from an oscillator locked to, say, the field-sync of an incoming video signal? I'm assuming that it might be a problem if the clock jumped when the PLL locks/unlocks, but if it drifted a bit more slowly in and out of lock it ought to be okay.

Is this the point where I inspire you add genlock capability to your player so it can be synchronised with another video signal..?

Kat
Kat Manton is offline  
Old 15th Aug 2011, 12:50 am   #130
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

Hi Kat,

It is certain ffmpeg can generate raw audio because I've found script examples which do that for the purpose of catenating audio files (ffmpeg is used to generate multiple raw audio files that are then simply joined together using cat). This is a line lifted from such a script and is probably very close to what I need (I've tampered with it e.g. -ac 1 to request mono but I'm sure you can spot the tweaks that'll make it do what I need):

ffmpeg -i <inputfile> -vn -f u16le -acodec pcm_s16le -ac 1 -ar 40500 - > temp1.a < /dev/null &

On external clocking of PICs: you can most certainly clock them from an external clock, however, I have had great success locking PICs to externally provided clocks by using an L/C in place of the crystal and using a varicap to alter the PIC clock in response to a voltage.

I have used this to lock a PIC to a narrow band TV (32 line) waveform, and even to line lock a PIC to 625 line sync (the latest NBTVA newsletter has details of my single PIC 625-to-32 line standard converter that uses this). It works but would be even better if the phase detection was done by, say, the relevent parts of a 4046 (as I remember, the 4046 VCO can't go higher than about 12MHz so the L/C/varicap solves a problem here)

As for adding genlock to my CF player: I produce accurate 405 sync on a digital output. This could be sent into a 4046 along with the external sync waveform to generate a control voltage for the said L/C VCO. Don't know how you'd deal with frame sync though - genlock's not my forte. The CF player would need a 25MHz L/C which is something I haven't done before - for some reason I always find it necessary to have my PIC clocks running at around 18MHz.

I'll send you an example circuit if you like...

I'm guessing your 405 line output from a VGA port needs some kind of sync combiner to generate 405 line sync? Well, I think this would be an ideal application for a PIC - VGA line and frame sync in one side, 405 line sync out of the other! If you've done real time assembler for the Z80 you'll soon master the PIC - once you get used to it's restrictions.

BTW, ffmpeg seems to convert more than twice real time on my Dell Latitude laptop. This kinda proves that real time standard conversion can be done on a modern PC (I had ffmpeg converting a region 2 DVD rip to 376p for my CF player)
Karen O is offline  
Old 15th Aug 2011, 2:33 am   #131
DangerMan
Heptode
 
Join Date: Jul 2009
Location: Stoke-on-Trent, Staffordshire, UK.
Posts: 719
Default Re: Simple memory card player idea

Hi Kat,
I'd be inclined to lock the PIC's clock oscillator to line syncs, and then I don't think it would be a problem.
After that, the frame syncs can be _locked_ to the line syncs according the code you write... which is what you want, after all.

Pete
DangerMan is offline  
Old 15th Aug 2011, 3:52 am   #132
Kat Manton
Retired Dormant Member
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
Default Re: Simple memory card player idea

Hi Pete,

I thought that was what I wrote, evidence suggests I didn't! What was in my mind was locking the PIC clock to line sync, then vaguely "generate something" with the PIC which, when gated externally with the original H/V sync, produces mixed sync and probably blanking (as that'd be useful too.) It'd need to "know" the relationship between H and V sync to determine odd/even field and act accordingly.

I like the idea of feeding line sync from the PIC and the incoming H sync into a phase detector then using that to control the PIC's oscillator. It saves a lot of monkeying around with higher-frequency oscillators and possibly chains of dividers. I doubt it'd be too much trouble to detect several standards and lock to them, but I'm getting ahead of myself and it's really a subject for another thread. (You can see where this was going in this thread before I got sidetracked into something else...) I'll think about this some more once I've managed to do something like flash a LED; surely the "embedded" equivalent of the traditional "Hello world" program

Kat
Kat Manton is offline  
Old 15th Aug 2011, 1:17 pm   #133
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

The PIC can act as the divider chain. For example, in my CF player one display line is 617 instruction cycles. You'd have to modify that number for a different standard.

But don't get the idea that it's easy - I have coded many time-critical PIC applications where it is trying to do two or three things at once and so quickly that interrupts are useless (I rarely use interrupts!) The CF player is no exception. You go mad counting cycles

Anyway, I've tried that ffmpeg line and it produced a file of the expected size (well, 10msec over but I'll live with that). I'll get some of it into MATLAB and have a peek at it so that I fully understand the byte order etc.
Karen O is offline  
Old 15th Aug 2011, 2:01 pm   #134
neon indicator
Retired Dormant Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

JAL is good for PIC10, 12, 16 & PIC18
At least timing on PIC is totally deterministic. Even if there is a single regular timer interrupt ( I use then SW counters to get slower tasks synced by flags)

Example put together very quick of a Frequency counter and Voltmeter:
http://www.techtir.ie/node/1003701

I used to use a homebrew "JDM" programmer for years for PIC. I'm glad I bought PICKIT2. (Works on Linux too, as does JAL compiler) Far Far more reliable and more PICs and also "test gear" in its own right.

I used PIC16F877, PIC16F628 etc for years, but unless there are special constraints I use the PIC18F2550 or PIC18F4550. Cheaper, more features, more RAM and Code space, the 16Bit rather than 14bit flash makes storing Byte data more efficient and all my PIC16 code recompiles. Not hard to port PIC10/12/16 assembler as it's basically similar but better (HW Multiply, less need to bank switch etc).

Also unlike PIC10/12/16 it has internal VCO option up to 96MHz (48MHz CPU clock vs 20MHz max of 16F) but ability to PLL to different crystals. Very flexible on clock and also only needs 1 capacitor and socket or cable to add it as USB perpherial.
neon indicator is offline  
Old 16th Aug 2011, 3:47 pm   #135
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

You are right, Neon indicator, anyone wanting to get into PICs really should go for the modern ones and not the dinosaurs I use. With me it's resistance to change - that and having a tubeful of devices (all used up now). I'm constantly castigated by a colleague who says I should be using AVRs but I don't switch my affections that easily!

You mentioned determinism and that is extremely important to me. In my professional life I work with a DSP that has a cache. When we get a blip we are never sure whether its a coding error or a cached access taking a little longer than usual. Caches are anathema to me.
Karen O is offline  
Old 16th Aug 2011, 9:49 pm   #136
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

I have audio working!

I'd like to post a movie but the attachment options don't include movies. Maybe I can put it in a zip file...? It'll have to be brief to stay within 1.9MByte.

Some strange flashes and spots on the picture have been traced, but not to errors in the CF card: they were in the original mpg file!

I'm really pleased with this little player.
Karen O is offline  
Old 16th Aug 2011, 11:24 pm   #137
jay_oldstuff
Octode
 
jay_oldstuff's Avatar
 
Join Date: Jan 2005
Location: Hyde, Greater Manchester, UK.
Posts: 1,074
Default Re: Simple memory card player idea

upload a video to youtube then post a link to it.
cant wait to see your progress.
Jay
__________________
The light at the end of the tunnel is probably the headlight of an oncoming train
jay_oldstuff is offline  
Old 17th Aug 2011, 9:18 pm   #138
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

Well, here's a link to my video (expertly recorded by hubby). The high frequency hiss is a puzzle - it's detectable but not that loud to either me or Kev and it's definitely not on the sound replay - no sign of it when played through active computer speakers.

Anyway, here it is:

http://www.youtube.com/watch?v=yqa_xQFMmsI

Enjoy
Karen O is offline  
Old 17th Aug 2011, 11:02 pm   #139
jay_oldstuff
Octode
 
jay_oldstuff's Avatar
 
Join Date: Jan 2005
Location: Hyde, Greater Manchester, UK.
Posts: 1,074
Default Re: Simple memory card player idea

stunning results there. just a thought about the high frequency hum could you camera somehow be picking up the line frequency? I noticed the frequency of the hum changed slightly when the blank raster was replaced by the image.

Jay
__________________
The light at the end of the tunnel is probably the headlight of an oncoming train
jay_oldstuff is offline  
Old 18th Aug 2011, 11:28 am   #140
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

Hi all,

I traced the source of the high pitched noise to my Maplin modulator. The racket is there even with my CF player switched off. I did a search on 'noisy Maplin modulator' and I found a link - back to this forum! :

https://www.vintage-radio.net/forum/...ad.php?t=13712

The mentioned modification only actually requires the smaller of the two capacitors. It appears the larger capacitor is inserted in a cut wire link, which serves no purpose - a piece of wire is a better low impedance than a capacitor, by and large. A 10n ceramic seems a good choice for the second capacitor.

I notice too that my modulator has a heatsinked 7805 while the one at the link has a 78L05. I have found several references to these modulators shutting down after a period of operation. The conclusion in these references is that the 78L05 is over-heating and going into thermal shutdown. Their recommendation is to replace the 78L05 with a 7805. If you follow that advice (which incidentally, is not mine) then watch the orientation!

Peace at last
Karen O is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 9:40 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.