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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/11/04 08:22
Read: times


 
#75733 - RE: Square wave generating help!
Responding to: ???'s previous message

START:
CPL P0.1
ACALL WAIT_1MS
SJMP START

You just need to come up with the timing. Just write the WAIT_1MS routine (and use the data sheet to count all the overhead cycles as to make the WAIT_1MS wait -shorter- than 1ms, so taken -together- with other commands it takes exactly 1ms) and you got it, not a pretty solution (the MPU can't do anything else meantime, just wasting time) but shortest I think... (Using timers is pretty, reliable, exact, requires less calculations and leaves all the free time for other tasks, but getting interrupts to work may be a bit tricky for a beginner)

Modify your WAIT_1MS routine so it waits i.e. n x 0.1ms - overhead units of time, where n is value of ACC, and you get output freq of 1/0.5ms to 1/0.002ms.


List of 19 messages in thread
TopicAuthorDate
Square wave generating help!            01/01/70 00:00      
   RE: Square wave generating help!            01/01/70 00:00      
   RE: Square wave generating help!            01/01/70 00:00      
      RE: Square wave generating help!            01/01/70 00:00      
         RE: Square wave generating help!            01/01/70 00:00      
            RE: Square wave generating help!            01/01/70 00:00      
         RE: Square wave generating help!            01/01/70 00:00      
            RE: Square wave generating help!            01/01/70 00:00      
               RE: Square wave generating help!            01/01/70 00:00      
               RE: Square wave generating help!            01/01/70 00:00      
   RE: Square wave generating help!            01/01/70 00:00      
      RE: Square wave generating help!            01/01/70 00:00      
         RE: Square wave generating help!            01/01/70 00:00      
            RE: Square wave generating help!            01/01/70 00:00      
               RE: Square wave generating help!            01/01/70 00:00      
   RE: Square wave generating help!            01/01/70 00:00      
   seek and ye shall find            01/01/70 00:00      
   RE: Square wave generating help!            01/01/70 00:00      
      RE: Square wave generating help!            01/01/70 00:00      

Back to Subject List