 |
 |
|
|
Philips Pronto NG Family Forum - View Post
|
|
 |
|
11/18/09 - A major update brings our collection to over 1,350 manuals for 115 brands.
11/04/09 - New features, hundreds of 2-way and RS-232 modules, plus a web browser for the MX-6000.
9/04/09 - Latest activity-based model features a color screen at an economical price.
9/03/09 - * OK, one string – you may have to learn something!
8/22/09 - As it turns out, those who do not learn from history... still won't repeat it.
|
|
 |
|
The following page was printed from RemoteCentral.com:
| Topic: | RU990 Jumps and delays This thread has 32 replies. Displaying posts 31 through 33. |
|
| Post 31 made on Monday October 19, 2009 at 07:14 |
Mark4323 New Member |
Joined: Posts: | September 2009 20 |
|
|
|
That's frustrating! Could you send me your pcf so I can run it on my Pronto and see what happens?
|
|
| Post 32 made on Tuesday October 20, 2009 at 22:33 |
texasbrit Founding Member |
Joined: Posts: | December 2001 509 |
|
|
|
On October 19, 2009 at 07:14, Mark4323 said...
That's frustrating! Could you send me your pcf so I can run it on my Pronto and see what happens? I will try to get this to you by the end of the weekend....
|
|
| Post 33 made on Sunday October 25, 2009 at 08:38 |
texasbrit Founding Member |
Joined: Posts: | December 2001 509 |
|
|
I decided to send you a "test" PCF instead of my full one, and in building it made some interesting discoveries. First, if I just do a series of jumps to a set of very simple countdown pages, with a one-second delay between each jump, followed by a "beep" at the end, I get a clean countdown (delay should really be slightly less than one second because of the time taken for the jump, but it's close enough). Then if I make each of the countdown pages much more complex, things start to go wrong, as I had posted. The pages take much longer to display, and so the sequence of jumps finishes after ten seconds, but it takes much longer than ten seconds for all the pages to display. I had suggested in my post that this is because the display channel runs asynchronously from the main cpu - the main cpu does not wait for the display of each page to complete before it executes the next jump. So far so good - this just indicates that if you want to do a correct countdown it's important to make the pages you display as simple as possible so they are displayed within the "delay" time. But I noticed some strange things happening to the "beep" at the end of my ten jumps. Sometimes it was there, sometimes not. Some other posts reported this problem. So I did another experiment. I added beeps to every step of the countdown, so my code now looked like : jump to page ten delay 0.8 seconds beep 0.2 seconds jump to page 9 delay 0.8 seconds beep 0.2 seconds etc etc
With the "simple" displayed pages, this worked perfectly. With the complex pages, this also worked, except the time between each page was significantly longer than one second.
Without knowing what chips the 7000 uses, it is difficult to know the exact sequence of events. But I think this is what is going on. When the 7000 processor encounters an instruction (jump for example) it will execute it if it can. If it is an instruction that uses the display bus, the command will be executed but the processor will NOT wait for the results of the instruction to be completed, it will move on to the next instruction. This is why using complex display pages cause a sequence of jumps and delays to be executed before all the pages have been displayed. To put it another way, on a ten second countdown the jumps/delays take ten seconds, the display of the ten pages can take longer (15-16 seconds on my test). You can see this by using the sequence: jump delay jump delay etc Works fine with simple display pages, does not if the pages are complex. But things change if you have a command that needs I/O but is not buffered like the display channel seems to be. Like creating a "beep". If you request a beep, for some reason the processor will wait for the writing of the last display page to finish before you get the beep. It's just the way the hardware works. So if I use the sequence: jump delay beep with complex pages, each jump will not execute until the previous beep has executed, which means the display has completed also. So a ten-second countdown like this with complex pages will give you ten beeps, but they will be more than one second apart because of the display write time.
What does that mean for the implementation of countdowns? Well all the problems go away if you have very simple display pages in the countdown. A sequence of jump delay jump etc with pages with just one simple label on each page - ten, nine etc - work fine. If you want to use complex pages, you may need to make your countdown less granular - two seconds maybe, or even longer, to allow for the longer dispaly write time.
|
|
 |
Before you can reply to a message... |
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now. |
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.
|
|
|
|
|