Greetings


MCU is pic18f452 & program is simple:

TRISA = %00000000 'set all PORTA to outputs

Start:

PORTA.0 = 1 'turn on led1
PAUSE 1000
PORTA.1 = 1 'turn on led2
PAUSE 1000
PORTA.2 = 1 'turn on led3
PAUSE 1000
PORTA.3 = 1 'turn ON led4
PAUSE 1000
PORTA = %00000000 'turn OFF all leds

goto Start

...but what really happens is not that i expected
all the leds wont be turned ON at the end,
when led2 turns ON the led 1 turns OFF
and when the led3 turns ON led 2 turns OFF and so on,
only 1 led is turned ON at time..

Why is it like this?

Has much as I understand the PORTA.x=1 must modify
only 1 bit in PORTA - not to set 1 bit and clear others.

Hawe I done something wrong or is there something i
dont know?

Best Regards
IFF.