Opensource Videomodem - Page 3 - RC Groups
Thread Tools
Jun 28, 2012, 05:51 AM
Registered User
How many delays have you used?
Sign up now
to remove ads between posts
Jun 28, 2012, 11:23 AM
Registered User
jalves's Avatar
1 delay before the 1st SPDR (to put the output where I want it horizontaly in the line) and another delay after the SPDR to allow the SPI transmission to finish before the next SPDR start.
Jun 28, 2012, 11:34 AM
Registered User
Ther should be 16000000/500000 = 32 delays (cycles) after writing the bits in the spdr.
How does it look if you only write 1byte out per line? Does the error with LSB=1 happen too?

EDIT: In theory. Please correct me if i'm wrong
Jun 28, 2012, 12:03 PM
Registered User
jalves's Avatar

I am not a programmer, I express my self in simple terms.

My "delays" involve the number of cycles needed to reflect what I want to see in the screen.

I found out that using maximum speed for SPI, I can write LSB=1 without problems with video syncronism but if I use 500KHz we got the snapshot you can see earlier, vertical sync all disrupted (independent of the line choosed).
Jun 29, 2012, 03:33 AM
Registered User
i had a closer look to dennis actual firmware for the DIYOSD. But see yourself

// Align text. On different screens/video signals I have seen, that the text is not alligned perfectly. Decreasing the number will move all text left, increasing the number will move it right.
// Smallest number allowed is 1
// Please be aware - no limits have been made, so you can move the entire text as much as you want. If you push the text "over the edge" (when you can't see it anymore) this will cause the text 
// to interrupt with the "new line sync". You can give it a try to see what it does - but I deffinately recommend to keep the text on the screen when flying :) 
#define align_text_ 22
Then if a line appears where something is put out
Do you use a bw or color camera jalves?

EDIT: Here is my new version for testing (not tested yet)
Jun 30, 2012, 07:22 PM
Registered User
Ok, seems the bw issue is fixed...

On monday, i will try with my laptop and arduino.
So stay tuned...
Jul 02, 2012, 05:48 AM
Registered User

have you tried your code (with delays) with other spi-frquenzys?
e.g 1Mhz and 2Mhz?

When i look to the code of "decoding closed captions", a single bit is in the array ~8bit wide. Have a look at "bpos"...

128bits per line could be captured
Last edited by muerzi; Jul 02, 2012 at 08:02 AM. Reason: EDIT: Here is the code for changing the SPI-Speed
Jul 02, 2012, 08:36 AM
Registered User
jalves's Avatar

I am reading and working to find the best hardware combination to decode the telemetry.

So far, LM1881 + LM393 + Arduino but I am searching for other possible solutions.

Here you have:
Jul 02, 2012, 08:49 AM
Registered User
So the size of the area of the screen where telemetry data will be transfered, will be like in the last picture? Or smaller
Jul 02, 2012, 09:17 AM
Registered User
@jalves: thanks for the pictures. Will them analyse later today. Looks nice, isn't it?
Seems that the last bit we spi-out is longer cause of writting the next byte to the array. I'll try to add the "dim" function like dennis. Then it should be defined to 1 and 0 and we have a better comparison...
What hardware are you using? If the diyosd, try to adjust the poti a little bit. Will the white bars become "sharper", or does it only look in the photo so "bad"?

@msev: The data is (now) in the picture for debug reasons. So we can see if the data is written out correctly. When it works, we put it to line 6-22 (they are not visible).
Last edited by muerzi; Jul 02, 2012 at 09:28 AM.
Jul 02, 2012, 11:45 AM
Registered User
jalves's Avatar
Originally Posted by muerzi
What hardware are you using? If the diyosd, try to adjust the poti a little bit. Will the white bars become "sharper", or does it only look in the photo so "bad"?
diyosd hardware (vienna osd style), it is bad as it looks.

When running diyosd code the characters are a little more stable.
Jul 03, 2012, 01:53 AM
Registered User

here is my new version of the code.
DimOn & DimOff is now added.

Can pleas post the pictures again with the new code?

About the circuit you are trying.
Do you think the LM393 is fast enough to do that?
At 500kHz it should be no problem, but with e.g. 4MHz?
Jul 03, 2012, 02:40 AM
Registered User
jalves's Avatar
It is a simple and reliable solution used by Dakar/Lynx osd/tracker.

I read about other solutions, more complicated in terms of hardware.

Here you have it:

EDIT: Dim pin 8 directly connected to diyosd (don't have a 50Ohm resistor...)
Last edited by jalves; Jul 03, 2012 at 07:24 AM. Reason: Replace the Pics.
Jul 03, 2012, 04:47 AM
Registered User

have you build the osd like in Dennis thread?
Seems the Dim does not work.

Please try to adjust the poti that the section in the video is as dark as possible

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log Opensource frames design files! DexterIt Multirotor Drone Talk 5 Apr 26, 2012 08:42 AM