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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/07/08 15:57
Read: times


 
#152002 - this might be the problem
Responding to: ???'s previous message
Aquib Fateh said:
The LEDs are connected to turn ON when the port pins are high.</quote>
Do you mean, anode of LED on the port pin and cathode on ground?
This can't work. Standard '51 ports can't source enough current to turn a LED on. You shall use either an additional buffer (e.g. a 74HCxx gate), or connect the LED the other way round: cathode to port pin, anode throug series resistor to VCC - standard '51 can sink around 1.5 mA, that's enough to light up a modern LED (through a cca 2kohm series resistor) (but don't attempt to draw too much current, 10mA is way too much).

Aquib Fateh said:
For troubleshooting I have turn LED1 ON as soon as the SPIF flag is set indicating a successful data transfer.
The LED1 does not turn ON at all, hence i came to the conclusion that the while statement to check for SPIF flag stalls the code execution.


Have you tested whether you can turn the LED on at all? You could try it the other way round: to switch it on at the start, and then turn off after the statement in question?




JW


List of 25 messages in thread
TopicAuthorDate
Problem with P89V51RD2 to AT93C46A (SERIAL EEPROM)            01/01/70 00:00      
   Dummy Bit            01/01/70 00:00      
      RE: Dummy Bit & Code Update            01/01/70 00:00      
         asm?            01/01/70 00:00      
            ASM            01/01/70 00:00      
               disassemble            01/01/70 00:00      
                  Re: ASM            01/01/70 00:00      
                     options            01/01/70 00:00      
                        that is silly            01/01/70 00:00      
                           that's a +-10 lines C source...            01/01/70 00:00      
                              CODE compiler directive            01/01/70 00:00      
                                 #code ?            01/01/70 00:00      
                                    Sorry.... here            01/01/70 00:00      
                              I believe in doing it right, even when ...            01/01/70 00:00      
                                 10 lines maximum            01/01/70 00:00      
                                    Thanks Jon Ledbetter            01/01/70 00:00      
               .lst            01/01/70 00:00      
         "1" preceeding instructions and "0" for data            01/01/70 00:00      
   The ASM lst file            01/01/70 00:00      
      Jan, would you not ...            01/01/70 00:00      
         to be absolutely honest...            01/01/70 00:00      
            LEDs            01/01/70 00:00      
               Re: LEDs            01/01/70 00:00      
                  this might be the problem            01/01/70 00:00      
                     LED Test            01/01/70 00:00      

Back to Subject List