Shop OBEX P1 Docs P2 Docs Learn Events
sxvideo revD pal question and remark — Parallax Forums

sxvideo revD pal question and remark

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2009-07-02 20:58 in General Discussion
I adapted the sxvideo revD pal version to use port B pins (attached) on a sx18.
It runs currently @50MHz.

Is it possible to run this @20MHz and what needs to be changed to make that work?

I have a remark regarding the resistor values used.

Current setup
VsyncPin --[noparse][[/noparse]1000]---+
··················· +----· //·
+
VoutPin· --[noparse][[/noparse]470]----+····cable······ |
··································· [noparse][[/noparse]75]
···································· |
···································· V

The output impedance equals 1000//470 = 320 ohm. So there is an impedance mismatch.

Alternative setup
VsyncPin --[noparse][[/noparse]625]----+
················· · +----· //·
+
VoutPin· --[noparse][[/noparse]268]----+····cable······ |
·················· ·|·············· [noparse][[/noparse]75]
················· [noparse][[/noparse]125]············· |
················· ··|··············· V
················· · V
The output impedance equals 625//268//125 = 75 ohm.
I expect this to give a sharper picture (no reflections) when a long videocable (approx. 10 meters) is used
compared to the current setup. Any comment on this? I have not tried this out yet as I don't have
a long video cable.

regards peter

Comments

  • BeanBean Posts: 8,129
    edited 2007-04-24 19:33
    Peter,
    · I have attached the current version of the firmware (the current version does run at 20MHz).
    · Note that you need to dedicate an entire port for the video (it uses shifts to move bits to video).

    ··You are probably right about the resistor values.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-24 19:47
    Thanks Bean, I will test this.

    One remark: The routine

    GetChar:
    · IF sRecvd = 0 THEN GetChar ' Wait until received bit is high
    · PUT __PARAM1,sData········ ' Save the received character
    · sRecvd=0·················· ' Clear the received bit
    · RETURN

    is the same as in revD. I had to replace the line
    PUT __PARAM1,sData
    by
    char = sData
    to make it work because the calls are GetChar @char, so the return value is not used.
    Or the calls must be changed to
    char = GetChar

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-25 15:32
    I succesfully adapted the rev.F to use single pins for the video.
    To make that happen I had to use a 7x5 font and discard the
    special graphic characters (codes 16-31).
    The adapted version runs @20MHz. I run it using a sx18, but a sx28 should work as well.
    The character patterns are written as binary bytes, which makes
    it easy to change the patterns.

    regards peter

    Post Edited (Peter Verkaik) : 4/26/2007 2:47:10 PM GMT
  • BeanBean Posts: 8,129
    edited 2007-04-25 18:07
    Peter,
    Did you notice any difference with the different resistor values ?

    Are you making a cool new "toy" or what ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-25 18:14
    Bean,
    I have not tested that yet. I only have a 3 feet videocable. Maybe
    tomorrow I can get a 10 meter SVIDEO cable.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-26 14:43
    Bean,
    Today I used a 10 meters long coaxial cable (75 ohm) with the two-resistor setup.
    I didn't notice any difference with the short cable I used before.

    To answer your other question: I am designing a new javelin board that incorporates
    an sx18. Since I have a few pins left I thought it would be nice to include a video
    output.

    I noticed your overlay board uses a LM1881 to detect the horizontal sync.
    Have you seen this page:
    http://www.sxlist.com/techref/ubicom/lib/io/dev/video/hsync-ng.htm
    If you have, and rejected that approach (or perhaps tried to follow it up)
    could you tell if it is feasible? I rather not spent time on it if you already
    tried it with no success.

    regards peter
  • BeanBean Posts: 8,129
    edited 2007-04-26 15:39
    Peter,
    · Wow! sounds like a cool project.
    · Did you develope the Javelin ?

    · I tried using the comparitor, but it was really touchy.
    · It wasn't that exact circuit, but something similar.
    · I decided it was more trouble than it was worth and just put the LM1881 on the board.
    · The new overlay board uses the EL1883 because it can run from 3.3V.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com


    Post Edited (Bean (Hitt Consulting)) : 4/26/2007 3:44:16 PM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-05 19:02
    Bean,
    I got a LM1881 and succeeded in generating overlay with a SX18/28 @20MHz, including sound.
    The attachment runs as is on my PAL tv. Could someone·test it for NTSC (in theory just
    setting a jumper) and let me know the results?

    I managed to put the special graphic symbols (codes 16-31) back in. I changed these
    symbols to support horizontal and vertical bargraphs as seen on many tv's.

    I added a watchdog function (to reset my javelin in case it hangs).
    For the sx28, port C is used for 8 extra output pins.

    I had to remove the plot functions that were available in·the sources this adaptation
    is based on. There still is the cursorXY command and the DOT graphics so you can
    still plot lines. Calculation must be done externally.

    Next step is to try the internal comparator as sync separator.

    regards peter


    Post Edited (Peter Verkaik) : 5/5/2007 7:11:37 PM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-06 03:17
    Bug fix on my previous uploaded version.
    Since chardots gets overwritten prior to outputting bit2, this bit got corrupted (routine videoline).
    For this reason I rightshifted the patterns by 2 bits and save bit0 in the carry
    prior to overwriting chardots.
    The error did not show until some graphic symbol was used, because for most
    character patterns bit2 (now bit0) is 0.

    I also noted a thing about constants
    HSYNC_OVL CON 3
    HSYNC_EXPIRED CON HSYNC_OVL+1
    generates more code than
    HSYNC_OVL CON 3
    HSYNC_EXPIRED CON 4 'HSYNC_OVL+1
    so I changed that for the better.

    I also added the character as comment in the pattern tables.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-15 08:29
    I adapted my program to free up some program space and ended up
    with three programs.

    The 6x16 is the same as my previous uploaded program with a small bugfix:
    the invert mask in routine VideoLine had to be reset before each character,
    not just at the start of a line.

    To free up program space, I encoded the 8x6 font using all 12 bits in a code word.
    The tradeoff is that than only 13 chars per line can be displayed. There is
    however 75% of program space in code page 2 available (approx. 380 words).

    To get more text than 6x13 I redefined the display memory use.
    Instead of a rambank array holding a line of text, I defined it to hold
    2 columns of text, so to get a 8x12 display. And there still is the same
    amount of program space available as for 6x13.

    I defined some display properties as constants.
    You set ROWS and COLUMNS and calculate the values of the other constants.
    By setting ROWS and COLUMNS to a value < maximum, you can free up some
    ram space which you can then use by declaring aliases.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-18 14:46
    I adapted my 6x16 version by reassigning VideoOutPin and SyncInPin.
    I used Bean's idea of using a single port register as shiftregister.
    However, simply rotating RB only works if all pins are outputs.
    I have overcome this by using
    RL CharDots
    RR RB

    The conditions are therefore:
    VideoOutPin must be either at port.7 or port.0 so the bit can be outputted in 2 cycles.

    This version has also 6 button input support, programmable watchdog output
    and a bidirectional serial channel (1200 baud).
    Code page 2 is only used by 18 words, so plenty of space left
    for additional graphic characters or some other functions.
    Screen resolution is 6 lines by 16 characters.
    The code as is works for PAL. To make it work for NTSC change VidSize (not tested).

    I attached the SRC also because the SXB must be compiled with compiler 1.51.03

    regards peter
  • BeanBean Posts: 8,129
    edited 2008-06-18 15:47
    Peter,
    · I love it !!!
    · Quite a bit of function with a humble SX18.
    · Good idea using the two rotates. Frees up 7 pins.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Uhhhm, that was on fire when I got here...

    www.iElectronicDesigns.com

    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-21 10:31
    I added some functions to the program.
    I added the ability to let lines blink in any combination. Blinking lines all
    blink simultaneously and at a compiled rate (0.5sec on, 0.5sec off).
    This is·great for·displaying alert warnings.
    Also added the ability to set a doubleheight font (display appears as 3x16).
    This means only lines 1,3,5 are displayed but you still write display contents
    on a 6x16 display.
    A·nice feature when using doubleheight font is updating offscreen lines and then
    swapping screens to make updates appear instantly.

    I added a detailed command description.
    The upper half of codepage 2 is still available, together with 1 free rambyte and 1 free rambit.

    Another feature (not implemented yet) using doubleheight font is to treat the
    display as 3x32 and having left and right shift or rotate (for walking text).

    One minor issue:
    When changing from normal font to doubleheight font, my TV sometimes fails to synchronize
    on the vertical sync. From doubleheight font back to normal font always works.
    If anyone can spot why this is, that would be a great help.

    regards peter

    Post Edited (Peter Verkaik) : 6/21/2008 10:41:01 AM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-26 05:09
    Here is my final revision (apart from possible bugfixes).
    I implemented doubleheight font, invert, blink/flash and walk, per line.
    Blinking is line on/off every 0.5sec
    Flashing is line inverting every 0.5sec
    You can select at runtime either blink·or flash but not both.
    Walk is performed using two consecutive lines.
    You can also select which lines should be hidden.
    See the commands 11,12,14 and 15.
    See also command 6 for all possible effect functions.

    Also attached is a pdf with possible output screens.
    The last screen shows a doublewidth doubleheight font can be used
    for a single image or text encoded in the 16 graphic symbols. This is
    established by writing characters $10-$1F into a single line.

    regards peter
    ·
  • BeanBean Posts: 8,129
    edited 2008-06-27 01:47
    Peter,
    It looks like the __RAM variable declarations aren't what they should be. That is causing the warnings.
    I'll look into it...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Uhhhm, that was on fire when I got here...

    www.iElectronicDesigns.com

    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-27 01:53
    Bean,
    I know that for SX/B beta the ram addresses $FD-$FF need to be changed to $F5-$F7.
    However, that does not resolve the warnings.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-27 02:05
    Here is compiled result of VidSizeVar VAR __RAM($F0)
    VidSizeVar······ EQU· (__RAM+($F0 & $F0) + $F0) | $10
    This yields $1F0
    So it must be
    VidSizeVar······ EQU· ((__RAM+($F0 & $F0) + $F0) & $FF)·| $10
    or
    VidSizeVar······ EQU· ((__RAM+($F0 & $F0) + $F0)·| $10) & $FF
    regards peter
  • BeanBean Posts: 8,129
    edited 2008-06-27 02:13
    OOPS,
    Peter I meant to post the above is in the Beta forum...
    But anyway, the problem is that the __RAM array should NOT do the "span bank" calculation. It should just use the value as it.
    I have fixed it, I will post a new version shortly (a couple minutes).

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Uhhhm, that was on fire when I got here...

    www.iElectronicDesigns.com

    ·
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2008-06-27 03:19
    Some time ago...
    Peter Verkaik said...
    Next step is to try the internal comparator as sync separator.
    I am wondering if you ever explored this possibility.

    - Sparks
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-27 03:33
    No I didn't because Bean mentioned having tried it without
    satisfactory results. The LM1881N chip does a great job
    and for only video output (no overlay) you can simply
    leave that chip out.
    My latest board has an SX18 setup with LM1881.
    Works great.

    regards peter
    1280 x 960 - 321K
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-07-02 20:58
    Here is an update to my 6x16 osd program.

    I added a DS2401 (Silicon Serial Number chip) to the Serial Input/Output line.
    The program can be used with either SXB1.51.03 or the SXB2.00.27 (the _SXB2 file).
    The SXB2 file has an array DummyBytes located just under PROGRAM Start
    to move down the remaining code. These bytes are not available in the SXB1.51.03 file.
    (SXB2 has shorter PROGRAM code).

    As far as I know this is the first osd program that compiles with SXB2.

    regards peter

    Post Edited (Peter Verkaik) : 7/4/2009 1:48:55 PM GMT
Sign In or Register to comment.