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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/11/03 01:24
Read: times


 
#45215 - RE: ADuC812 and ADC problem
Responding to: ???'s previous message
"1- why i have to end runing the program "

Otherwise the MCU will try to execute junk code in the rest of the code area after your written code and most times crash tryimg to do "impossible" and "illegal" code. Please remember that once Reset, the MCU has to keep executing code as long as the clock is there and it has not been commanded to an idle mode. Normally in large real time codes the processor will be busy doing something like updating a display, reading input status etc and hence this is not an issue. But small trial codes like what you have now, end it with a SJMP $. ( And the only way you can get out of this is by Reset!)

"2- isn't the DAC0L contain the lowest 8 bit "

Correct. But in a 12 bit ADC, it is always better to write the the code to read all 12 bits, even though you are using only the lower 8bits. Just imagine that your ADC has returned 0x0100. Reading only the lower 8 bits, you will read zero and will be trying to debug non-exsitent problems.

Also for continuous update of DAC from ADC you should be in a loop that repeats say once in 50 - 100mS. ( And in such an event you dont have to write the infinite loop SJMP $)

Raghu


List of 16 messages in thread
TopicAuthorDate
ADuC812 and ADC problem            01/01/70 00:00      
   RE: ADuC812 and ADC problem            01/01/70 00:00      
      RE: ADuC812 and ADC problem            01/01/70 00:00      
         RE: ADuC812 and ADC problem            01/01/70 00:00      
            RE: ADuC812 and ADC problem            01/01/70 00:00      
         RE: ADuC812 and ADC problem            01/01/70 00:00      
            RE: ADuC812 and ADC problem            01/01/70 00:00      
            RE: ADuC812 and ADC problem            01/01/70 00:00      
   RE: ADuC812 and ADC problem            01/01/70 00:00      
      RE: ADuC812 and ADC problem            01/01/70 00:00      
   RE: ADuC812 and ADC problem            01/01/70 00:00      
      RE: ADuC812 and ADC problem - Hans            01/01/70 00:00      
         RE: ADuC812 and ADC problem - Hans            01/01/70 00:00      
      RE: ADuC812 and, Raghu, Rami            01/01/70 00:00      
      RE: ADuC812 and, Raghu, Rami            01/01/70 00:00      
      RE: ADuC812 and, Raghu, Rami            01/01/70 00:00      

Back to Subject List