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 12:41
Read: times


 
#84644 - Display routine
Responding to: ???'s previous message
Amey said:
However,as I am new to 8051(learning for the first time),I would be oblidged to learn more about how to write the display routine.

From the reaction of some forum members you can see that the solution must be really simple. And it is!
For drawing lines on a scope providing 'x', 'y' and 'z' inputs you must have two DACs, one for producing control voltage for 'x' input and another for control voltage for 'y' input. And there must be a port pin, which controls 'z' input, which makes the beam to be switched-on or off. Sometimes you can neglect the 'z' input, if you draw the line to the starting point very fast, at least much faster than you draw the lines which are to be seen.

From above you see, that speed of line drawing is one issue of the problem. To achieve that the line can be seen with good contrast you should draw it rather slowly, but fast enough, that you will not see any flickering resulting from too low actualization rate.

Assume you have connected an 8bit DAC at port1 for 'x' input and an 8bit DAC at port2 for 'y' input. Further assume, that for both DACs #'00000000' output signal means -5V and #'11111111' means 5V. If you now want to draw a line from 'x' = 0V to 'x' = 1V, while 'y' is kept at 'y' = 0V, then you simply must output #'10000000' at port2, while you output all values between #'10000000' and #'10011001' at port1, one after the other.
So, you actually draw points, not lines! After having drawn a point, wait a period of time, so that each point becomes bright enough. If you output all values between #'10000000' and #'10011001', one after other, each with the same duration, then you get a series of bright points smearing to a line.

So, your display routine for drawing a line from point (0,0) to (1,0) can look like the following:

Activate 'z', means 'turn-on beam'
output #'10000000' at port2
output #'10000000' at port1
wait a period of time
output #'10000001' at port1
wait a period of time
output #'10000010' at port1
wait a period of time
.
.
.
.
output #'10011001' at port1
wait a period of time
deactivate 'z', means 'turn-off beam'

Kai

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