Shop OBEX P1 Docs P2 Docs Learn Events
? about TV_TEXT object — Parallax Forums

? about TV_TEXT object

AGCBAGCB Posts: 327
edited 2015-06-19 01:55 in Propeller 1
I'm not understanding how to use the
out($0A)       or  out ($0b)
to set the cursor column or line position in the TV_TEXT object. It says "x follows". But follows exactly what and how? A little guidance will be greatly appreciated. I can find no demo or code where that instruction is used.
Aaron

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2014-09-07 04:48
    AGCB wrote: »
    I can find no demo or code where that instruction is used.
    Check TV_Text_Demo.spin (PropTool library).
    repeat
        text.str(string($A,16,$B,12))
        text.hex(i++, 8)
    
    Packing it in a string is just easier to read than 4 separate out() calls (but doesn't work for 0 coordinates as they are treated as string terminator).
  • AGCBAGCB Posts: 327
    edited 2014-09-07 04:54
    Thanks KURONEKO. So fast and so easy. I guess I've used almost the same with the Parallax Serial Terrminal.
    Aaron
  • AGCBAGCB Posts: 327
    edited 2014-09-07 06:12
    Now for a follow-up question. Is there a way that I can clear selected text from the TV screen while leaving other text in place?

    I have the two texts running in separate cogs (one running time of day at top of screen and the other [not working yet] running a countdown timer in the center of screen. I'd like to reset the countdown timer and some text that goes with it but leave the time of day untouched.

    I've tried setting the cursor at the beginning of text to be erased and then writing spaces over it but so far not working.

    I'm using a RTC for the TOD. The program will also do some other stuff intermittently which is why the separate cogs for time so it doesn't go away while the other stuff (EMIC 2 speech) is happening.

    Maybe I'm all wet but I hope this can be done somehow.

    Thanks'Aaron
  • kuronekokuroneko Posts: 3,623
    edited 2014-09-08 18:41
    AGCB wrote: »
    Now for a follow-up question. Is there a way that I can clear selected text from the TV screen while leaving other text in place?

    I've tried setting the cursor at the beginning of text to be erased and then writing spaces over it but so far not working.
    Can you attach your code here? Writing spaces usually works ...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-08 19:06
    You can also use my tv_wtext.spin object instead, which allows you to define separately-addressable windows on the screen:

    -Phil
  • AGCBAGCB Posts: 327
    edited 2014-09-09 05:03
    I did get it to work and I'm not even sure what the problem was.

    @PhiPi I'll look at that. I'm always looking for the most usable objects for my purposes

    Thanks

    Aaron
  • AGCBAGCB Posts: 327
    edited 2014-09-10 14:54
    You can also use my tv_wtext.spin object instead, which allows you to define separately-addressable windows on the screen:

    -Phil

    WOW! There's way more things than I even hoped I could do on a TV with that object. Time to study and play.Thanks Phil

    Aaron
  • oodesoodes Posts: 131
    edited 2015-06-18 02:36
    Sorry for the hijack but figure it somehow related?, but how do you increase the size of the text in Tv_Text if possible? I've played around with the values in 'tv_params' but no joy
  • kwinnkwinn Posts: 8,697
    edited 2015-06-18 05:50
    You cannot increase the text size, at least not easily. To get larger characters would require creating a new lookup table for larger characters and rewriting the TV_Text and "tv"programs.

    TV_Text works a bit like the old school text terminals. The screen is treated as a number of tiles arranged as X rows by Y columns. Each tile corresponds to a byte in memory, ant the program uses that byte and the lookup table to "draw" the character on the screen.
  • oodesoodes Posts: 131
    edited 2015-06-18 05:57
    Thanks Kwinn , cheers for the info. I can increase the size of the text with the Graphics object if needs be.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-18 08:00
    kwinn wrote: »
    You cannot increase the text size, at least not easily.

    I don't think it's as hard as you think.

    I think one just needs to change a couple of constants in "TV_Text.spin" object.

    Starting on line 10 of the object you'll find:
    cols = 40
      rows = 13
    

    I'm pretty sure reducing the values of these constants will increase the text size.

    I used the following values on one of my 2.5" displays.
    cols = 22
      rows = 7
    

    IIRC, there are some values which don't work well. I have a note in my program indicating the object didn't work well if I set "rows" to the value of 8.
  • oodesoodes Posts: 131
    edited 2015-06-18 08:08
    I had came across a previous thread in which Phil Pilgrim mentioned this also:

    http://forums.parallax.com/showthread.php/130008-Really-BIG-Letters-amp-Numbers?highlight=TV_terminal

    I have a 3.0" TFT LCD http://www.brilldea.com/assets_files/30lcdanddriver/3.0%20LCD%20and%20Driver%20PCBA-Datasheet-Rev009.pdf

    I have tried a number of values , including your set just now and still doesn't seem to make any difference
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-18 10:53
    I'm pretty sure I have that same display.

    Can you get the display to work at all? What is it doing you don't want it to?
  • oodesoodes Posts: 131
    edited 2015-06-18 12:03
    The display is working the best. Have no issues there. It's just the text size in Tv_Text is very small . If I use Tv_Terminal that uses the graphics object I can increase the text size on the screen but this uses another cog and a lot more memory. If the adjust the constants you mentioned , it doesn't alter the text size but does sometimes move the text to a different location on the screen.
  • kwinnkwinn Posts: 8,697
    edited 2015-06-18 15:19
    Duane Degn wrote: »
    I don't think it's as hard as you think.

    I think one just needs to change a couple of constants in "TV_Text.spin" object........................................
    ................................................................

    I stand corrected. After seeing Duane's post and looking at the TV_Text and TV code it does seem to allow for 16x16 and 16x32 tile sizes, and possibly a 32x32 tile size. That would allow for two or possibly three different tile and character sizes. From the comments in the code it sounds like a limited number of tile rows/columns choices would work well.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-06-18 23:54
    If one is using the ROM font, making bigger characters comes down to reducing the resolution of the display. Setting fewer tiles in X and or Y results in fewer pixels. Those get larger, and or may require the offset parameters need tweaking to center things up.
  • oodesoodes Posts: 131
    edited 2015-06-19 01:55
    Sound Job lads , got it eventually.
    You need to reduce the cols and rows in Tv_Text CON section and increase the hx and vx values in the DAT section also
Sign In or Register to comment.