Shop OBEX P1 Docs P2 Docs Learn Events
NTSC versus PAL — Parallax Forums

NTSC versus PAL

Goran (Sweden)Goran (Sweden) Posts: 68
edited 2006-12-19 07:18 in Propeller 1
I'm just started with the prop. demo kit.
Checked out some samples.
Question:
In the full duplexSerial the PUB says:
PUB start(rxpin, txpin, mode, baudrate) : okay
'' Start serial driver - starts a cog
'' returns false if no cog available
''
'' mode bit 0 = invert rx
'' mode bit 1 = invert tx
'' mode bit 2 = open-drain/source tx
'' mode bit 3 = ignore tx echo on rx
'· stop
· longfill(@rx_head, 0, 4)
· longmove(@rx_pin, @rxpin, 3)
· bit_ticks := clkfreq / baudrate
· buffer_ptr := @rx_buffer
· okay := cog := cognew(@entry, @rx_head) + 1
***************
Now, there is a stop instruction.
Does it mean the cog first start ande then stop, which as I understand will make it unavailible?

Next:
How to change the TVdriver from NTSC to PAL.
I tried to change the _mode,#%0001 to _mode,#%0000 in the entire file, seems not working.

Hope anyone has an answer for me.

Regards Goran from Sweden

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-18 21:27
    1) The stop is there to stop any existing cog that was previously started before starting up a new one.

    2) The change in the mode value is the only thing needed. When the TV driver is started, all of these parameters including the mode value are passed to the start routine of the TV driver. You need to change the mode value in the caller of the start routine.
  • Goran (Sweden)Goran (Sweden) Posts: 68
    edited 2006-12-18 21:38
    As a newbie,
    The start routine, is it the PUB calling the start of the cog?
    What is the caller, is it a PUB/Var/Con/Dat.
    Sorry, but I tried smhair.gif
    Regards Goran
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-18 22:37
    For example, look at tvtext.spin. Near the end there is a DAT section with a table tv_params. Notice that this gets copied to some variables near the beginning, then the address of the variables is passed to tv.start in the tvtext.start routine. You need to change the mode value in the DAT section of tvtext.spin.
  • william chanwilliam chan Posts: 1,326
    edited 2006-12-19 02:13
    Why can't we have a clear CONSTANT name like mode_ntsc or mode_pal to make it easier to read?

    Which mode is clearer, NTSC or PAL?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Goran (Sweden)Goran (Sweden) Posts: 68
    edited 2006-12-19 07:18
    Thanks Mike for your support,

    Now it works with PAL tongue.gif

    I'm happy again.

    Regards, Goran
Sign In or Register to comment.