Guys
I am new to 8051 and keil. I bought a new MCB900 board version4 which has P89LPC935 chip. I already had an old keil version 2.31 . I tried to program the hello example program which came with the disk. I was able to program the Board using the Rs232 cable . But i am not getting the result( blinking LED) .
i have a attached a copy of the program
#include
#include
void main (void) {
P2 = 0x00;
while (1) {
P2 ^= 0x02;
}
}
The following is the copy of startup code.
IDATALEN EQU 80H ; the length of IDATA memory in bytes.
IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
IBPSTACKTOP EQU 07FH+1 ; set top of stack to highest location+1.
FOSC EQU 3
CLKR EQU 1
BOV EQU 1
PRHI EQU 1
RPD EQU 0
WDTE EQU 1
SB EQU 3
etc
I checked the option use DTR and RTS when in ISP mode and protect ISP code.
Version of flash magic 2.45 .
Can you help me please.
Thanks
Did you get any errors in Flash Magic? Are you able to read the signature, program, erase, etc? Have you moved the jumper to the Run position to execute your code?
If this all looks ok, then it might be an issue with the compiler. Try posting on 8052.com. Otherwise, tell us what errors you saw in Flash Magic.
Game,
does your code actually set up port2 to push-pull outputs? I am not convinced that including stdio does this for you, and they may be operating as inputs or open-collector, which would not feed current to your LEDs.
try adding the line:
P2M1 = 0;
before writing to the port
n