To look into SDCC mcs51 performance, I wanted to run Whetstone,
Dhrystone, Coremark on an C8051. The C8051F120 is one of the few that
has enough RAM.
For getting started with the C8051F120 I tried to switch on / off an LED
on a C8051F120 board with this program (and the same with P3 = 0x00;).

#include <stdbool.h>

__sfr __at(0xb0) P3;
__sfr __at(0xa7) P3MDOUT;
__sfr __at(0xe3) XBR2;
__sfr __at(0xff) WDTCN;

unsigned char _sdcc_external_startup(void)
{
        // Disable watchdog timer
        WDTCN = 0xde;
        WDTCN = 0xad;

        return 0; // perform normal initialization
}

void main(void)
{
        // Enable port output
        XBR2 = 0x40;
        P3MDOUT = 0x08;

        P3 = 0xff;

        for(;;);
}

But I always get a dimly lit LED; it is never fully on or off. When I
first plugged in the board, it had the LED blinking (with whatever demo
was on the board then), so the hardware seems to be ok.

The board is the same as this one:
http://www.colecovision.eu/mcs51/C8051F%20V2.1%20LED.shtml
except that is has an C8051F120 instead of the C8051F020.

The same cables and U-EC6 debug adapter clone work fine with the
C8051F020 board.

Philipp

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to