Shop OBEX P1 Docs P2 Docs Learn Events
Question re video mode pins — Parallax Forums

Question re video mode pins

Dr_AculaDr_Acula Posts: 5,484
edited 2011-07-24 03:37 in Propeller 1
In a number of the TV drivers there is this code:
''    bits 6..4 select pin group:
''      %000: pins 7..0
''      %001: pins 15..8
''      %010: pins 23..16
''      %011: pins 31..24
''      %100: pins 39..32
''      %101: pins 47..40
''      %110: pins 55..48
''      %111: pins 63..56

Would someone be able to kindly explain this a bit more. I'm using "%010" at the moment which is pins 23-16, but in practice this is actually pins 16,17 and 18. Is it possible to make this, say, pins 21,22,23?

The reason I ask is that I'm experimenting with fast external memory, and this means more pins need to be devoted to driving the external memory chip. This has led me down a path that seeks to recycle pins 28,29 (the eeprom) and pins 30,31 (the serial download pins). I have a circuit that uses a 4066 chip to isolate these lines from the eeprom and the serial download chip once 3 seconds have elapsed after a reset (the timer is also reset by the serial Tx line, for very long C program downloads).

I figured that maybe 3 of those lines could be for TV, and a fourth for audio, as these would be things that one might want more commonly than other things.

If it is too hard though to rejig the mode in the TV code to use these pins, maybe I could put the keyboard and mouse on pins 28-31, and the TV plus audio on pins 24-27.

Thoughts would be most appreciated.

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2011-07-24 02:05
    What are bits 3..0 of your tv_pins value? From what you said (16..18) it probably is either %0000 or %0001. So change that to either %0100 or %0101 (20..22).
    ''    bits 3..0 select pin group mode:
    [COLOR="red"]''      %0000: %0000_0111    -                    baseband
    ''      %0001: %0000_0111    -                    broadcast
    [/COLOR]''      %0010: %0000_1111    -                    baseband + chroma
    ''      %0011: %0000_1111    -                    broadcast + aural
    [COLOR="red"]''      %0100: %0111_0000    broadcast            -
    ''      %0101: %0111_0000    baseband             -
    [/COLOR]''      %0110: %1111_0000    broadcast + aural    -
    ''      %0111: %1111_0000    baseband + chroma    -
    ''      %1000: %0111_0111    broadcast            baseband
    ''      %1001: %0111_0111    baseband             broadcast
    ''      %1010: %0111_1111    broadcast            baseband + chroma
    ''      %1011: %0111_1111    baseband             broadcast + aural
    ''      %1100: %1111_0111    broadcast + aural    baseband
    ''      %1101: %1111_0111    baseband + chroma    broadcast
    ''      %1110: %1111_1111    broadcast + aural    baseband + chroma
    ''      %1111: %1111_1111    baseband + chroma    broadcast + aural
    ''      -----------------------------------------------------------
    ''            active pins    top nibble           bottom nibble
    
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-07-24 02:33
    The value I have is
    modepins = %010_0000     ' dracblade = %010_0000, PROTO/DEMO BOARD = %001_0101, HYDRA = %011_0000   
    

    The 0000 was found by trial and error. I note that the demo board is 0101 and that is pins 12,13,14. I can't quite see the formula that relates the prop pins to the modepins.

    If it is possible to change " modepins" so it works on, say, pins 28,29,30, that would be great!
  • kuronekokuroneko Posts: 3,623
    edited 2011-07-24 02:42
    Dr_Acula wrote: »
    I can't quite see the formula that relates the prop pins to the modepins.
    That's simply hardwired. For the demoboard you get pin group %001 (8..15) and the %0101 selects the high-nibble within that group (12..15). The second column in the table is the 8bit pin assignment.
    Dr_Acula wrote: »
    If it is possible to change " modepins" so it works on, say, pins 28,29,30, that would be great!
    This would be pingroup 3 and the high nibble which for you should be %011_0100.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-24 02:45
    The manual is your friend :) Yes, the TV can use any group of 4 pins using base 4. i.e. 0-3, 4-7, 8-11, 12-15, 16-19, 20-23, 24-27, 28-31. What you are selecting a bank of 8, then baseband selects one half and broadcast the other. As you are using baseband, that group of 4 is selected and the other group of 4 is ignored. Now if you look at the mask you will find further that have enabled only 3 pins, being the lower 3 pins.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-07-24 02:59
    Thanks guys - that sounds great. This will free up pins 0-23 for memory (shared with sd card).

    Another quick question - how do you put "solved" next to a thread?
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-24 03:20
    I think you have to edit your first post (advanced)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-07-24 03:37
    Thanks - that works!
Sign In or Register to comment.