Hi, Just to give some feedback, here is my original question: > > How can I set and clear each LED individually? That is, what C > > function or ASM mnemonic can I use to achieve > > "SETBIT" CNTL1, USERLED2 or > > "CLRBIT" CNTL1, USERLED2 I found that there are some macros (eg. SET_REG_BIT, RESET_REG_BIT) defined in regs54xx.h which show how to address the bits using a bit mask and AND or OR. It is not possible to set a bit directly as with some microcontrollers (eg. AVR has BCF and BSF (bit clear and bit set respectively) - you have to operate on the entire register. I also saw that the CPLD registers are accessible as predefined i/o ports (port0 through port7). These are defined in board.h . So I can make the led blink as follows: while (1) { SET_REG_BIT(port0, 0) /* turn LED0 on */ brd_delay_msec(500) /* delay 1/2 sec */ RESET_REG_BIT(port0, 0) /* turn LED0 off */ brd_delay_msec(500) /* delay 1/2 sec */ } Thanks to all who responded. -- Johan |