Graphics demo problem
Leon
Posts: 7,620
I'm trying to get the graphics demo working on my hardware, which includes the three resistors connected to P12, P13 and P14 as on the Demo board. I've modified the code slightly by removing the mouse stuff (I haven't got one interfaced), and putting the Spinning Triangles code into an infinite loop. The problem is that I'm not getting any output on pins P12, P13 and P14 when I check with my scope. I've assumed that the demo uses those three pins, is that assumption correct? I can't seem to find where they are defined in the code.
Also, I want to use it with a PAL TV, so I've changed this one line in the DAT statement:
DAT
tvparams long 0 'status
long 1 'enable
long %001_0101 'pins
long %0001 'PAL mode
Is this all I need to do to change from NTSC to PAL?
Leon
Also, I want to use it with a PAL TV, so I've changed this one line in the DAT statement:
DAT
tvparams long 0 'status
long 1 'enable
long %001_0101 'pins
long %0001 'PAL mode
Is this all I need to do to change from NTSC to PAL?
Leon
Comments
The pins are defined in the TV.spin driver, found in your Parallax root directory.
'' tv_pins
''
'' 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
you must not change the code if you have no mouse connected. It is also working without this. Your changes looking fine, so that it should be work properly. I have this working well. The pins for tv you mentioned are right.
Did you have checked that the _xinfreq in CON section is set to the clock rate your crystal is running?
I think potatohead sees your problem. The pin selector is 3 bits long. If you set those to long %001_0101 then you are useing pins(47..40) that will only be available on the next generation Prop that isn't out yet. Unless I've misread the TV object you should use % 001
sorry, but that is not the problem. What Leon shows in his message is the default value from Graphics_Demo.
Bits 6..4 selects pingroup 15..8 and bits 3..0 selects baseband mode for the top nibble of pingroup, which are pins 15..12.
Post Edited (Kaio) : 4/12/2007 3:29:03 PM GMT
I can not view spin files on this machine so I will have to wait till later tonight to review the object. I don't see how you can apply 5 bit values to a three bit register.
Leon,
It is possible that I've misread the object.
What happens if you just run the graphics demo without any changes?
My homebrew setup seems similar to yours -- with a PAL TV (unless the TV's recognising an NTSC input!) and no mouse -- and all seems to work fine
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
BTW: I type as I'm thinking, so please don't take any offense at my writing style
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
I still can't find where the pins are defined, although I'd have thought that it would work straight "out of the box".
The only pins I can find are in TV.spin:
pins0 long %11110000_01110000_00001111_00000111
pins1 long %11111111_11110111_01111111_01110111
but the code can only be using three pins, as the schematic shows three outputs on P12, P13 and P14. Perhaps the values are buried in a mask somewhere in the assembler code. I'd have thought they would be defined in the top level file, but that seems too easy.
Leon
You'll need to understand TV.spin (I don't!)
Looks like all the info you need is in the comments near the bottom of the file.
Sorry if that's not very helpful!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
BTW: I type as I'm thinking, so please don't take any offense at my writing style
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
I've even checked all the pins for output, but there is no activity on any of them. I'm using a 5 MHz clock, I know that works OK.
Leon
Post Edited (Leon) : 4/12/2007 4:19:46 PM GMT
it works out of the box, but only for NTSC. What you has found have nothing to do with configurating pins.
As potatohead and I was mentioned above the pingroup will be configurated. The default value in Graphics_Demo.spin uses the pins 12 to 14. Please see my explanation above.
You can found this description in TV.spin.
You have only to change the mode, you has done.
What kind of board you are using?
Leon
It's outputting OK now (NTSC). I'll see what that looks like on my TV and then see if I can get PAL out of it.
Thanks for the help.
Leon
please try if TV_Text_Demo is working for you. You have to change one line in TV_Text.spin to the following.
Hope, that this will work.
Leon
nice to hear that you have found the problem.
If you would have the keyboard interface from Demo board on your Prop board you could be try POD, the on-chip debugger for assembly which I have made.
It's generating PAL now (in colour).
Leon
I finally got to look at the Parameters, Thanks for catching my mistake.
I was not thinking it was a 7 bit register.
Glad to hear your up and running Leon.
Anyway, I hope no animals where harmed in the making of this thread!
Leon
Now that there gone he has a problem with anything else·on 4 legs. I caught him yesterday trying to pull another dog(some stray after his food)·through his chain link fence by the nose!