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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/16/08 05:03
Read: times


 
#159105 - where is main routine?
Responding to: ???'s previous message
Hello Danniel,
I understand You show whole program, so some questions:
1)Where is interrupt vector table?
2)where starts main program (i suppose at start of listing, but
there no label and no infinite loop)?
3)You call display subroutine from interrupt, which is
very bad practice.At least is too slow and maybe in continuous conversion mode there happens overflow (or overlap ) in result registers. Additionally- there is no need to pushing/poping R0,r6,r7. It will be usefull only two different interrupts use same bank. Just switch register bank. And - if You have i2c_interrupt , while other interrupt is handled (with switched register bank) this style of pushing/poping R0..R7 using addresses 0..7 is wrong. As rule - push/pop 0..7 is allowed only in main programm . And R0 has data address 0 only in bank 0.

As i see You have to make Your job and re-write program (prefferably-from scratch).
regards

List of 12 messages in thread
TopicAuthorDate
TWI and AD7745 with 5131            01/01/70 00:00      
   where is main routine?            01/01/70 00:00      
      Routines            01/01/70 00:00      
         lack ot time ????            01/01/70 00:00      
            License on I2C            01/01/70 00:00      
            Code            01/01/70 00:00      
               Slave?            01/01/70 00:00      
                  Master            01/01/70 00:00      
            TWI is a very common "generic" name for I2C-compat            01/01/70 00:00      
               I do not think so            01/01/70 00:00      
                  Oh yes it is! (with examples)            01/01/70 00:00      
                     Don't want to fight a lawyer            01/01/70 00:00      

Back to Subject List