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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/14/05 20:13
Modified:
  11/14/05 20:13

Read: times


 
#103705 - Beginner Needs Help with AT89S52
Hello, I am brand new to microcontrollers and I am trying to todo a small project for my electronics class. I using a AT89S52 which I program with this programmer.
As far as I can tell I have correctly programmed the device. The software for the programmer is able to program read and verify it. However when I take reset low for the chip to start running nothing happens. For simplicity of this post I have put on the following example program from the keil website (though I actually compiled it with SDCC).


/*-----------------------------------------------------------------------------
Definitions for P1.0, and P1.1.
-----------------------------------------------------------------------------*/

sbit P1_0 = 0x90^0; /* SFR for P1.0 */
sbit P1_1 = 0x90^1; /* SFR for P1.1 */

/*-----------------------------------------------------------------------------
MAIN C function
-----------------------------------------------------------------------------*/
void main (void)
{
P1_0 = 1; /* Configure P1.0 as an input */

/*-----------------------------------------------
This loop reads P1.0 and writes the value read
to P1.1.
-----------------------------------------------*/
while (1)
{
P1_1 = P1_0; /* Copy P1.0 to P1.1 */
}
}
/*---------------------------------------------------------------------------*/

Now two things....

1) If I examine the voltages on the output of all ports (P0,P1,P2,P3). I find that the P0 pins are all zero (while it says the reset value should be high = +5V). The other ports have the correct value of high = +5V.

2) Now if I take P1_0 and place it low by grounding it, I find that P1_1 does not change.

Thanks in advance for all your help,
Michael A. Balazs
Dept of Physics
University of Virginia




List of 12 messages in thread
TopicAuthorDate
Beginner Needs Help with AT89S52            01/01/70 00:00      
   your are trying to walk before you can c            01/01/70 00:00      
      the puzzle            01/01/70 00:00      
         It can be expanded by stating the follow            01/01/70 00:00      
            what is not in the "bible" nor in datash            01/01/70 00:00      
               the clock is described in "the bible"            01/01/70 00:00      
                  I understand...            01/01/70 00:00      
                     Install a prpoer supervisor chip for res            01/01/70 00:00      
                  lack of clock            01/01/70 00:00      
   hmm            01/01/70 00:00      
      THANKS!            01/01/70 00:00      
      sbit in SDCC            01/01/70 00:00      

Back to Subject List