I think one important rule is don't mix your IDE. Either use PropTool or FlexProp.
If you use code snippets in FlexProp that were generated in PropTool, be really careful and expect to be adjusting tabs and spaces when you modify the code.
Proptool converts tabs to spaces when saving. Flexprop doesn't. The different way they each handle tabs and spaces is what causes the issue.
@JonnyMac Thank you for your reply. Do you accept your tab stops being converted to spaces by the programming tool? Are new tab stops saved as spaces each time you save? Have you written spin code that compiles in PropTool and FlexProp?
Those "asm / endasm" commands are for FlexProp only. They cannot be compiled with PropellerTool.
PropellerTool uses "org / end" instead, but it's not even as simple as swapping the names to org in order to use PropellerTool, because the current version of PropellerTool's compiler doesn't allow more than 16 longs of parameters & local variables in nested org code. The video routines use almost twice that!
So you will need to use FlexProp, unless you are able to completely re-work the key functions such as gfxText8, to use no more than 16 parameters & local variables combined.
I've removed the tabs, so that now the code will work fine with FlexProp set to any user tabstop setting.
Just tested with the Parallax monitor, and they all work. I tried both DVI_800x480 and DVI_640x480.
The Parallax monitor is not compatible with DVI_800x600, so I couldn't try that one. If you are using a different monitor, you might also need to consider which resolutions your monitor supports. I think the 800x480 is not so common- although it seems good for the aspect ratio of the small wide screen monitors like the Parallax one.
Hopefully the updates will help you get past these initial hurdles?
Hi @VonSzarvas
The photo of my hardware earlier in this thread were all purchased from Parallax Inc including the display: https://www.parallax.com/product/7-hdmi-display-800-x-480/
Thank you for your excellent reply. I will work through your info and report back to you.
Kevin
@kg1 said:
@JonnyMac Thank you for your reply. Do you accept your tab stops being converted to spaces by the programming tool? Are new tab stops saved as spaces each time you save? Have you written spin code that compiles in PropTool and FlexProp?
Propeller Tool automatically converts tabs to spaces.
While I don't use FlexProp, I have accommodations in my program templates for it so that my programs can be run on any system. When I conduct training sessions for Parallax, I always verify that my demo code works in FlexProp.
A moment later....
There are some inconsistencies between Propeller Tool and FlexProp. The memory address of clkfreq, for example, which can create an issue in PASM. Some time back I wrote a version of an OLED driver that had Propeller Tool and FlexProp-specific implementations. That is to say, if you're using FlexProp, you may hit a snag running some of my programs. I only test in FlexProp when I absolutely have to.
Hi @VonSzarvas
I used the new code, changed the motherboard, changed the HDMI cable. Still no luck.
Never tried the display since I purchased it many months ago.
Could be the display is faulty?
@JonnyMac Thank you for your comments. I like the automatic conversion of tabs to spaces. However in FlexProp, if the number of spaces per tab is changed and new tabs are added... or if someone else's code has a mixture of tabs and spaces and your number of spaces per tab is different from the original author...
Perhaps at the beginning of each spin file a statement could be made that "this code was written in FlexProp / Protool etc with a setting of x spaces per tab".
Initially the project in this thread could have benefited from clarification like the above statement. If the intention of the user was to rewrite the driver in PropTool he/she would need to replace all tabs (using say Notepad++) before opening the file in PropTool.
@rogersyd Please provided a link to: " There is an earlier demo i found that appears to be similar and works fine, so Ill stick with that one for now"
@kg1
I'm wondering if the 5V signal is needed for that monitor.
As a test, try enabling the ACC HDR 5V output, then plugging a jumper wire between one of the EVAL board 5V output pins and touching it to the 5V pad next to the HDMI socket on the Digital Video Out board.
Later today I will also be able to confirm if it's needed or not. I know the breakout I used yesterday had the 5V attached, but can't recall just now if that monitor works both with and without 5V. Some require it, some don't.
BTW. To enable the ACC HDR 5V output, there's a jumper on the EVAL board, close to the PC USB socket.
First... I am Michael from support! VonSzarvas is my forum alias.
I got to the office and tested the adapter-- you do NOT need the 5V signal for the Parallax monitor.
The difference in the two photos you showed is that I had soldered a standard 0.1" pitch 2way male header to the adapter (and plugged a green shunt jumper on top), so I could quickly connect/disconnect the shunt jumper (like on the EVAL board) to apply power to the monitor wake-up input if needed. (that is what that 5V pad behind the HDMI header does).
That said, your version of the addon board is older than the version I had, and does not have the 2way pad holes. The newer (current) addon does have those pads for convenience. You can still solder a row of headers (or a single header) to the board you have though, and use a jumper wire from that 5V pad/pin to any 5V source on your EVAL board.
But as I said... you don't need that 5V signal for your experiments with the Parallax monitor.
For your monitor, I'm not convinced it's faulty as that's a pretty determined pattern output. So my next thought is that you are using the original P2-EC Edge module (and not the P2-EC32MB Edge Module). You need the 32MB version of the Edge module to run the video demos.
@VonSzarvas said:
For your monitor, I'm not convinced it's faulty as that's a pretty determined pattern output. So my next thought is that you are using the original P2-EC Edge module (and not the P2-EC32MB Edge Module). You need the 32MB version of the Edge module to run the video demos.
Doh !
Of course! You are using the EVAL board. As soon as I wrote that, I scrolled back in this thread and realised I had missed that detail before, being so focused on the code issue.
All the video drivers we have so far need the 32MB Edge module. That memory is used (needed) to buffer and output the video graphics.
It could be possible to use the HyperRAM addon for the EVAL board with some minor edits to the code. But for guaranteed compatibility you'd want to switch to the mini-breakout and P2-EC32MB module. The part numbers are all listed in that QuickByte article.
Please note the HyperFlash HyperRam in the photo. I wish to use this accessory, if possible, in this project. Sadly I am intellectually impaired due to old age. Do not be concerned, I am only 81. In 10 years of reading miles of scrambled information on this forum I have not improved my programming or electronic skills.
Quote: "It could be possible to use the HyperRAM addon for the EVAL board with some minor edits to the code.".
Are you willing to take a risk?
Kevin.
Chip has a 800x480 HDMI spiral demo in the Pnut zip file that runs within the 512 kB of hubRAM ... looks like it's also in the PropTool examples too.
Ah, you're using Flex, here's the code:
@rogloh - could I ask if you have a version of hyperram/flash driver that's a drop-in replacement for the psram driver ?
Not a drop in (yet). In time I still hope to rationalize all these driver variants so they would be drop in, and have started some of this work but it's not completed. The newer PSRAM can be accessed via a simpler driver wrapper vs the original HyperRAM board which still needs the complete memory driver which can support multiple heterogeneous memory devices with lots of APIs but is probably a little more complex to use. In the meantime however there is nothing stopping anyone from creating their own wrappers and communicating directly into the low level PASM driver with mailboxes etc. That mailbox interface stuff is reasonably well documented vs everything else right now. I think this is the solution that Wuerfel_21 used.
@Wuerfel_21
rogloh: " In the meantime however there is nothing stopping anyone from creating their own wrappers and communicating directly into the low level PASM driver with mailboxes etc. That mailbox interface stuff is reasonably well documented vs everything else right now. I think this is the solution that Wuerfel_21 used."
Hi Wuerfrl_21,
If you have example code, may I have a copy please?
Kevin
VAR
long exmem_mailbox[8*3]
long exmem_struct
byte exmem_cog
PRI exmem_sync()
repeat while exmem_mailbox[0]
PRI exmem_write(dst,src,length,async)
exmem_sync()
exmem_mailbox[2] := length
exmem_mailbox[1] := src
exmem_mailbox[0] := exmem.R_WRITEBURST + (dst & $fffffff)
ifnot async
exmem_sync()
PRI exmem_fill(dst,val,length,async)
exmem_sync()
exmem_mailbox[2] := length
exmem_mailbox[1] := val
exmem_mailbox[0] := exmem.R_WRITEBYTE + (dst & $fffffff)
ifnot async
exmem_sync()
PRI exmem_read(dst,src,length,async)
exmem_sync()
exmem_mailbox[2] := length
exmem_mailbox[1] := dst
exmem_mailbox[0] := exmem.R_READBURST + (src & $fffffff)
ifnot async
exmem_sync()
Initializing it, uhhh, lets just say I do it in a rather complex way (partially because I also use custom embedded access routines and the setup has to match what those do). What I mean is: DO ANYTHING BUT THIS (relatedly, why am I mallocing exmem_struct when it could just be a VAR array????)
Comments
I think one important rule is don't mix your IDE. Either use PropTool or FlexProp.
If you use code snippets in FlexProp that were generated in PropTool, be really careful and expect to be adjusting tabs and spaces when you modify the code.
Proptool converts tabs to spaces when saving. Flexprop doesn't. The different way they each handle tabs and spaces is what causes the issue.
@JonnyMac Thank you for your reply. Do you accept your tab stops being converted to spaces by the programming tool? Are new tab stops saved as spaces each time you save? Have you written spin code that compiles in PropTool and FlexProp?
Hi @kg1
Those "asm / endasm" commands are for FlexProp only. They cannot be compiled with PropellerTool.
PropellerTool uses "org / end" instead, but it's not even as simple as swapping the names to org in order to use PropellerTool, because the current version of PropellerTool's compiler doesn't allow more than 16 longs of parameters & local variables in nested org code. The video routines use almost twice that!
So you will need to use FlexProp, unless you are able to completely re-work the key functions such as gfxText8, to use no more than 16 parameters & local variables combined.
In the meantime, I've just updated the Parallax website with new versions of the code files. (For all 3 of the video demos).
https://www.parallax.com/search-articles/?swpengine=articles&swpquery=Intro+to+Using+Video
I've removed the tabs, so that now the code will work fine with FlexProp set to any user tabstop setting.
Just tested with the Parallax monitor, and they all work. I tried both DVI_800x480 and DVI_640x480.
The Parallax monitor is not compatible with DVI_800x600, so I couldn't try that one. If you are using a different monitor, you might also need to consider which resolutions your monitor supports. I think the 800x480 is not so common- although it seems good for the aspect ratio of the small wide screen monitors like the Parallax one.
Hopefully the updates will help you get past these initial hurdles?
Hi @VonSzarvas
The photo of my hardware earlier in this thread were all purchased from Parallax Inc including the display:
https://www.parallax.com/product/7-hdmi-display-800-x-480/
Thank you for your excellent reply. I will work through your info and report back to you.
Kevin
Propeller Tool automatically converts tabs to spaces.
While I don't use FlexProp, I have accommodations in my program templates for it so that my programs can be run on any system. When I conduct training sessions for Parallax, I always verify that my demo code works in FlexProp.
A moment later....
There are some inconsistencies between Propeller Tool and FlexProp. The memory address of clkfreq, for example, which can create an issue in PASM. Some time back I wrote a version of an OLED driver that had Propeller Tool and FlexProp-specific implementations. That is to say, if you're using FlexProp, you may hit a snag running some of my programs. I only test in FlexProp when I absolutely have to.
Hi @VonSzarvas
I used the new code, changed the motherboard, changed the HDMI cable. Still no luck.
Never tried the display since I purchased it many months ago.
Could be the display is faulty?
@JonnyMac Thank you for your comments. I like the automatic conversion of tabs to spaces. However in FlexProp, if the number of spaces per tab is changed and new tabs are added... or if someone else's code has a mixture of tabs and spaces and your number of spaces per tab is different from the original author...
Perhaps at the beginning of each spin file a statement could be made that "this code was written in FlexProp / Protool etc with a setting of x spaces per tab".
Initially the project in this thread could have benefited from clarification like the above statement. If the intention of the user was to rewrite the driver in PropTool he/she would need to replace all tabs (using say Notepad++) before opening the file in PropTool.
@rogersyd Please provided a link to: " There is an earlier demo i found that appears to be similar and works fine, so Ill stick with that one for now"
Many thanks.
@kg1
I'm wondering if the 5V signal is needed for that monitor.
As a test, try enabling the ACC HDR 5V output, then plugging a jumper wire between one of the EVAL board 5V output pins and touching it to the 5V pad next to the HDMI socket on the Digital Video Out board.
Later today I will also be able to confirm if it's needed or not. I know the breakout I used yesterday had the 5V attached, but can't recall just now if that monitor works both with and without 5V. Some require it, some don't.
BTW. To enable the ACC HDR 5V output, there's a jumper on the EVAL board, close to the PC USB socket.
Hi @VonSzarvas @"Ken Gracey"
Please ask Michael Mulholland the difference between the ex stock item:
and the item used in the video:
Not to be captain obvious, but have you tried just plugging it into your PC?
Hi @kg1
First... I am Michael from support! VonSzarvas is my forum alias.
I got to the office and tested the adapter-- you do NOT need the 5V signal for the Parallax monitor.
The difference in the two photos you showed is that I had soldered a standard 0.1" pitch 2way male header to the adapter (and plugged a green shunt jumper on top), so I could quickly connect/disconnect the shunt jumper (like on the EVAL board) to apply power to the monitor wake-up input if needed. (that is what that 5V pad behind the HDMI header does).
That said, your version of the addon board is older than the version I had, and does not have the 2way pad holes. The newer (current) addon does have those pads for convenience. You can still solder a row of headers (or a single header) to the board you have though, and use a jumper wire from that 5V pad/pin to any 5V source on your EVAL board.
But as I said... you don't need that 5V signal for your experiments with the Parallax monitor.
For your monitor, I'm not convinced it's faulty as that's a pretty determined pattern output. So my next thought is that you are using the original P2-EC Edge module (and not the P2-EC32MB Edge Module). You need the 32MB version of the Edge module to run the video demos.
Doh !
Of course! You are using the EVAL board. As soon as I wrote that, I scrolled back in this thread and realised I had missed that detail before, being so focused on the code issue.
All the video drivers we have so far need the 32MB Edge module. That memory is used (needed) to buffer and output the video graphics.
It could be possible to use the HyperRAM addon for the EVAL board with some minor edits to the code. But for guaranteed compatibility you'd want to switch to the mini-breakout and P2-EC32MB module. The part numbers are all listed in that QuickByte article.
Hi @VonSzarvas Originally I purchased:
https://parallax.com/product/p2-es-eval-board-accessory-set/
which is still available for purchase today. Perhaps there should be a version 2:
https://parallax.com/product/p2-eval-digital-video-out-add-on-board/
I actually live on the other side of the moon in a country called New Zealand. During the past three years, purchasing product from the USA it takes forever. I have been waiting for articles like:
https://parallax.com/video-hardware-character-map/
for what seems like years!
I have been very particular to include photos that show exactly what I have done. I even stated "My board is a Rev B?".
Never mind: I generally purchase items well in advance:
Please note the HyperFlash HyperRam in the photo. I wish to use this accessory, if possible, in this project. Sadly I am intellectually impaired due to old age. Do not be concerned, I am only 81. In 10 years of reading miles of scrambled information on this forum I have not improved my programming or electronic skills.
Quote: "It could be possible to use the HyperRAM addon for the EVAL board with some minor edits to the code.".
Are you willing to take a risk?
Kevin.
@kg1 For something immediate, rogloh published a demo using the HyperRam board that you could run on your setup : https://forums.parallax.com/discussion/173218/psram-vs-hyperram-testing/p1
@rogloh - could I ask if you have a version of hyperram/flash driver that's a drop-in replacement for the psram driver ?
Hi @VonSzarvas
"For something immediate, rogloh published a demo using the HyperRam board that you could run on your setup : https://forums.parallax.com/discussion/173218/psram-vs-hyperram-testing/p1"
I have not been able to find the demo.
Also looked:
https://forums.parallax.com/discussion/171176/memory-drivers-for-p2-psram-sram-hyperram-was-hyperram-driver-for-p2#latest
Chip has a 800x480 HDMI spiral demo in the Pnut zip file that runs within the 512 kB of hubRAM ... looks like it's also in the PropTool examples too.
Ah, you're using Flex, here's the code:
@evanh @VonSzarvas
Thank you evanh: HDMI_Spiral_Demo_800x480.spin2 compiles and runs in proptool and flexprop:
@evanh
VonSzarvas:
"For something immediate, rogloh published a demo using the HyperRam board that you could run on your setup :
Is there a demo using the HyperRam?
Here's one sitting in my collection from over two years back. I've had to remove the largest photo to make the zip file small enough to attach.
It doesn't use either of Roger's drivers. Looks like Rayman wrote the whole thing.
@evanh Many thanks
Yes, thanks evanh. I don't have any ready-to-go HyperRam demos here.
To make this thread complete:
Memory drivers for P2 - PSRAM/SRAM/HyperRAM (was HyperRAM driver for P2)
https://forums.parallax.com/discussion/171176/memory-drivers-for-p2-psram-sram-hyperram-was-hyperram-driver-for-p2
First page for files.
@rogloh Thank you
Also Roger's graphics driver as well - https://forums.parallax.com/discussion/170676/p2-dvi-vga-driver/p1
The two drivers are built to cooperate.
PS: I've not managed to dig through the complexities of his API myself.
Not a drop in (yet). In time I still hope to rationalize all these driver variants so they would be drop in, and have started some of this work but it's not completed. The newer PSRAM can be accessed via a simpler driver wrapper vs the original HyperRAM board which still needs the complete memory driver which can support multiple heterogeneous memory devices with lots of APIs but is probably a little more complex to use. In the meantime however there is nothing stopping anyone from creating their own wrappers and communicating directly into the low level PASM driver with mailboxes etc. That mailbox interface stuff is reasonably well documented vs everything else right now. I think this is the solution that Wuerfel_21 used.
@Wuerfel_21
rogloh: " In the meantime however there is nothing stopping anyone from creating their own wrappers and communicating directly into the low level PASM driver with mailboxes etc. That mailbox interface stuff is reasonably well documented vs everything else right now. I think this is the solution that Wuerfel_21 used."
Hi Wuerfrl_21,
If you have example code, may I have a copy please?
Kevin
If by "example code" you mean "poopy excerpt ripped from production code", I can do that. Full thing is here: https://github.com/IRQsome/MegaYume/blob/master/megayume_upper.spin2
Actually using the mailbox interface is easy.
Initializing it, uhhh, lets just say I do it in a rather complex way (partially because I also use custom embedded access routines and the setup has to match what those do). What I mean is: DO ANYTHING BUT THIS (relatedly, why am I mallocing
exmem_struct
when it could just be a VAR array????)@Wuerfel_21 Thank you for the info you have provided. I will study your site at:
https://github.com/IRQsome/MegaYume/blob/master/megayume_upper.spin2
Much further and will try to complete tests with my hardware within the next two weeks.
Kevin