question about PASM trying to decipher pin numbers
Hi guys I am looking at the TV.spin program that comes with the prop tool I am trying to change the composite TV pins to match a board I have I am using pins 16-19 the prop demo board uses 12-15
I found where the value is stored however the TV.spin uses assembly language so I have this
pins0 long %11110000_01110000_00001111_00000111
pins1 long %11111111_11110111_01111111_01110111
can some one please tell me how I can change that to match my pins of 16-19 how can I convert this binary to dec I just tired loading it into a scientific calculator then changing from bin to dec but that didn't work lol
thanks
I found where the value is stored however the TV.spin uses assembly language so I have this
pins0 long %11110000_01110000_00001111_00000111
pins1 long %11111111_11110111_01111111_01110111
can some one please tell me how I can change that to match my pins of 16-19 how can I convert this binary to dec I just tired loading it into a scientific calculator then changing from bin to dec but that didn't work lol
thanks
Comments
pins- Numb- 33222222_22221111_11111100_00000000 'Pin Number - 10 number + -
10987654_32109876_54321098_76543210 '- - 1 number, If You count from 1 add 1 to that number.
pins0 long %11110000_01110000_00001111_00000111
pins1 long %11111111_11110111_01111111_01110111
Regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Anyway, all that isn't exactly necessary. One of the parameters used to start TV.spin is the pin group. Have a look at TV_Text.spin and its tv_pin parameter (described in more detail in TV.spin). It's derived from the base pin (12 for the demoboard). Let it do the calculation for 16 and go from there.
basepin 12: $15 tv_pin value 16: $20
Post Edited (kuroneko) : 3/26/2010 2:47:39 AM GMT
I could identify ,, would you be able to point out to me where I could change the values in the TV.spin driver so I could use TV pins 16-19 instead of the 12-15.. I would be very thankful
I can not find basepin 12: $15 anywhere in the code
TV.spin doesn't use a hard-wired pin assignment. It's up to the caller to tell it what to use.
[noparse][[/noparse]1] tv:· the mostly assembly code hardware driver·doing the low-level tv signal generation (loads in new cog)
[noparse][[/noparse]2] tv_text:· the spin code·high-level software driver for making and using the text buffer (spin interpreter)
[noparse][[/noparse]3] tv_text_demo:· the short spin code "user" program of the preceding two tiers (also ran by spin interpreter)
I think this three-tiered approach has good organization, though one can certainly combine the two top tiers.
Due to the way the tv_text "middleware" is written, the tv_text_demo user program just needs to issue a "start" call to tv_text using:· text.start(basepin), assuming a tv_text object was declared in the OBJ section with text: "tv_text" and wherein basepin is replaced by the desired base pin number.· I've used this with base pins 0, 12 (the default) and 16, and they all work (two different dev. boards).· Then, tv_text will start the tv driver, and the tv driver will launch its own assembly code into a new cog.· So, though using a three-tiered approach, the combination·only uses two cogs (one cog for the interpreter·running tv_text & tv_text_demo and a another (new cog)·for tv).·
The bit of actual conversion magic that pulls off calculating the value for the third parameter (tv_pins) of the tv object's required 14 is found in the tv_text middleware's public start method:
Note that it uses·the basepin passed into it upon starting it from the tv_text_demo user.· Perhaps there's something there that might be useful to you (though you could, of course,·just focus on the tv driver itself).
I haven't actually thought about this line of code or looked at the low-level tv driver to see if there are any "rules" limiting pin usage.· However, for example, when using pin 0 as the base pin for the above three-tiered approach, one can start tv_text by sending it 0, 1, 2 or 3 as the basepin (4 would be "out-of-range," though).·
Post Edited (JRetSapDoog) : 3/27/2010 7:46:04 AM GMT
It makes a table of parameters which are sent to tv.spin and these include the pin assignment
There is absolutely no need to hack tv.spin
Graham