Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/10/05 09:28
Read: times


 
Msg Score: -1
 -1 Offensive/Flame
#84630 - Display routine is not enough
Responding to: ???'s previous message
First, there was no need to quote the post in full length.

Amey Sane said:
Please reply as soon as possible.

Techfest deadline approaching? My recommendation: give it up! Even the length of my list should indicate, this is NOT a beginner's task.

But, as an another recommendation, don't give up trying to do the thing! - not for the techfest (and the price), but for your own benefit of learning new things.

Amey Sane said:
I would be oblidged to learn more about how to write the display routine.


Oh, I describe you how do I usually approach new problems.
First, I make a cup of coffee. Then I start searching the net for ideas. A sip of coffee. Finding out I am surfing on a completely different (but very interesting) topic. Another sip of coffee. Sketching a diagram or writing some pseudocode to a piece of paper. Another sip of coffee. Searching for a piece of old and proven startup code. Sip of coffee. Making a new directory (for a new project), copying and renaming the old file. Starting the favourite editor (se) and erasing the irrelevant piece from the old code. Sip of coffee. Hastily writing the core algorithm. Sip of coffee. Assembling, simulating, debugging; several cycles. Work done, cup empty.

The idea behind the drawing is to have a description, how the "pen" should ride - a set of coordinates. Something like:
- move to 0,0
- draw a line to 10,0
- move to 10,10
- draw a line to 0,0
- repeat from beginning


This I would represent as data in RAM:
0,0,10,0
10,10,0,0
endmark


The endmark is anything out of the allowed range of coordinates (which is 0-10 here) - say, 0FFh. Alternatively, you can store the number of drawn lines and have no endmark.

Now the drawing algorithm is in pseudocode:
start:
{main program - e.g. checking inputs, game algorithm etc.}
set pointer to table beginning
label:
get x,y
if x=endmark, goto start
set DACs to x and y
advance pointer
switch z on ("pen down")
get x,y
set 
switch z off ("pen up")
goto label


There should be an initialisation, which copies a "basic" table to the RAM (which might be internal or external), including the endmark. Then, when the main program wants to draw an another line, it inserts it to the end of table and places the endmark after it. Removing a line is a more cumbersome task, the whole remainder of table after the removed line should be moved.

But, as a beginner, you should perhaps read through tutorials, try running various example codes etc.etc.etc.

Jan Waclawek


List of 48 messages in thread
TopicAuthorDate
Interfacing the 8051 with a CRO            01/01/70 00:00      
   Display something on CRO            01/01/70 00:00      
      Display on CRO            01/01/70 00:00      
      More Elaborate!            01/01/70 00:00      
         Re: More Elaborate.            01/01/70 00:00      
            More elaborate            01/01/70 00:00      
         First test            01/01/70 00:00      
         Some sort of DAC is what you need!            01/01/70 00:00      
            Success !!            01/01/70 00:00      
               Picture posting            01/01/70 00:00      
                  Directory is enough            01/01/70 00:00      
   DAC            01/01/70 00:00      
   I to am working on CRO 1.0 for techfest            01/01/70 00:00      
      techfest?            01/01/70 00:00      
         Share the Prize?            01/01/70 00:00      
            Teamwork            01/01/70 00:00      
               ...aND            01/01/70 00:00      
                  Mmmmm TechFest!            01/01/70 00:00      
                     Atari            01/01/70 00:00      
               Re:            01/01/70 00:00      
                  This link has a vector clock display            01/01/70 00:00      
                     Great Enthusiasm            01/01/70 00:00      
                     Vector Clock English version            01/01/70 00:00      
                        German version            01/01/70 00:00      
                           Vektor klock            01/01/70 00:00      
                     'scope clocks, desert style            01/01/70 00:00      
               Explain Display Routine            01/01/70 00:00      
                  Please Explain!            01/01/70 00:00      
                  Display routine is not enough            01/01/70 00:00      
                  Display routine            01/01/70 00:00      
                     Z point            01/01/70 00:00      
                        Z point            01/01/70 00:00      
                        Concretize please            01/01/70 00:00      
                           How to do "Z"            01/01/70 00:00      
                              Integrators            01/01/70 00:00      
                        Small help            01/01/70 00:00      
   Programming Problems!!            01/01/70 00:00      
      nice to hear about you again            01/01/70 00:00      
          help ?            01/01/70 00:00      
            Why worry.            01/01/70 00:00      
            the logic of drawing lines            01/01/70 00:00      
      A slight misunderstanding            01/01/70 00:00      
         Isn't this process hidden for the user?            01/01/70 00:00      
            Re:            01/01/70 00:00      
            Sort of...            01/01/70 00:00      
   Apologies!            01/01/70 00:00      
      Answered in other Thread!            01/01/70 00:00      
      Optimise?            01/01/70 00:00      

Back to Subject List