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

LED problems

Hi i am using the nordic nrf24e1 with combined 8051. I am very new to embedded and am just trying to blink an LED. For some reason it only works on pin 0 of port 0?? and on no other pin from ports 1 and 0. any ideas as to why this could be? i am using the correct header file (reg24e1.h) and it works on every pin in simulation, someone mentioned setting tri-states or as an output?? but i do not know how to do this. Any help will be greatly appreciated.

leigh

Parents
  • From glancing at the datasheet, it seems as though the I/O ports on this variant are a bit non-standard.

    www.nordicsemi.no/.../Product_Specification_nRF24E1_1_3.pdf


    3 I/O PORTS
    The nRF24E1 have two IO ports located at the default locations for P0 and P1 in standard 8051, but the ports are fully bi-directional CMOS and the direction of each pin is controlled by a _DIR and an _ALT bit for each bit as shown in the table below.

    Since you say it works in simulation, presumably you've already carefully read the datasheet and written code that configurations the directions and alternate functions of the port port pins.

    If the code is correct, then the question is why that same code doesn't work on the actual target hardware. The clue there will lie in the difference between the simulated hardware and the real board. Are LEDs actually connected to all the right port pins? Are your pullup/down resistors correct? (It seems unlikely that you have 16 LEDs connected to every pin of P0 and P1; if there's only one, then is it actually connected to the pin you think that it is?

Reply
  • From glancing at the datasheet, it seems as though the I/O ports on this variant are a bit non-standard.

    www.nordicsemi.no/.../Product_Specification_nRF24E1_1_3.pdf


    3 I/O PORTS
    The nRF24E1 have two IO ports located at the default locations for P0 and P1 in standard 8051, but the ports are fully bi-directional CMOS and the direction of each pin is controlled by a _DIR and an _ALT bit for each bit as shown in the table below.

    Since you say it works in simulation, presumably you've already carefully read the datasheet and written code that configurations the directions and alternate functions of the port port pins.

    If the code is correct, then the question is why that same code doesn't work on the actual target hardware. The clue there will lie in the difference between the simulated hardware and the real board. Are LEDs actually connected to all the right port pins? Are your pullup/down resistors correct? (It seems unlikely that you have 16 LEDs connected to every pin of P0 and P1; if there's only one, then is it actually connected to the pin you think that it is?

Children