| ??? 05/15/03 22:23 Read: times |
#45589 - RE: can not write to port(s) (89s8252) Responding to: ???'s previous message |
void main (void)
{
unsigned int k,l = 0; // k should be a char
unsigned char j = 0;
while(1)
{
for(j=0x00;j<0xff;j++) // the blink frequency will depend on which P3 pin is used
{
P3=j; // set P3
// the above blow all control signals and may -
// generate interrupts if enabled
for(k=0;k<4;k++) // make next wait *4
{
for(l=0;l<10000;l++); // wait a bit
}
}
}
};
besides the comments in the code above please answer 1) is anything else running 2) is your led connected Vcc - 1k - anode cathode - port pin? 3) will your LED light up at 5mA 4) are you sure the code is programmed into the chip, be it external or internal ROM/EPROM/FLASH Erik |



