This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Turning on a LED on KL64Z

Having these addresses:

; - User data section -------------------------------------
AREA UserData, DATA, READONLY

LEDS EQU 0x4000703C ; access PD3-PD0
GPIO_PORTD_DOR EQU 0xF80FF0C0
GPIO_PORTD_PSOR EQU 0xF80FF0C4
GPIO_PORTD_PCOR EQU 0xF80FF0C8
GPIO_PORTD_PTOR EQU 0xF80FF0CC
GPIO_PORTD_PDIR EQU 0xF80FF0D0
GPIO_PORTD_PDDR EQU 0xF80FF0D4
GPIO_PORTD_PCR EQU 0x4004c004
SIM_BASE_SCG5 EQU 0x40048038
SYSCTL_RCGC2_GPIOD EQU 0x1000 ; port D Clock Gating Control
PORT_PCR_MUX EQU 0X100

How can I turn on a LED that it is on bit 5 of port D?

I have to do it with assembly code, not C.

Thanks in advantage.

Parents Reply Children