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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/30/04 07:50
Read: times


 
#82215 - missing code?
Responding to: ???'s previous message
hi,
I am using M95256 (ST make) EEPROM. My code is like this

please do not confuse people with incomplete code. Your code will fail if be compilated and run as it is. For example, by this:
EA = 1; 
ES = 1; 
SPCR = 0xD1; // <- it sets bit SPIE = SPI Interrupt Enable
you allow SPI interrupt. But where is the code of SPI interrupt service routine? If you do not use it then please mention the fact. From other side, if you have allowed the interrupt why do you use polling method then?

Yet another question, just for interest:
void SPI_out(int send,int l_add,int u_add) 
{ 
DPH = u_add; 
DPL = l_add; 
SPDR = send; 
while(SPSR != 0x80); 
}
What are DPTR registers loaded for?

Regards,
Oleg

List of 20 messages in thread
TopicAuthorDate
has anybody used SPI            01/01/70 00:00      
   more details please            01/01/70 00:00      
      details            01/01/70 00:00      
         missing code?            01/01/70 00:00      
         How to post code            01/01/70 00:00      
   The story so far?            01/01/70 00:00      
   no solution            01/01/70 00:00      
      all is replied above            01/01/70 00:00      
      So you want a solution?            01/01/70 00:00      
         code and schematic            01/01/70 00:00      
            unconnected reset?            01/01/70 00:00      
            How about some clocking ??            01/01/70 00:00      
            Code still illegible!            01/01/70 00:00      
            is it C-language?            01/01/70 00:00      
               reply of queries            01/01/70 00:00      
                  complaining            01/01/70 00:00      
                  Do you want to be helped?            01/01/70 00:00      
                     Watch window in Keil            01/01/70 00:00      
                        Registers window in Keil            01/01/70 00:00      
   EA            01/01/70 00:00      

Back to Subject List