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

Port 5 on P8xC552

Can some one tell how to disable ADC on 8xc552 and use it as digital inputs, like 80c51 normal port. I am trying to read Keypad switches and get nothing, 10k pull ups resister are there.

Thanks,
Afzal

Parents
  • Hi Afzal!

    P5 is an input port only and it is not bit addressible. That means, you can only read the whole port as one byte (the addr. is C4 - it is defined in the reg552.h). After that you have to mask the single bits, if required. I usually mix the inputs of P5, since I usually don't need more than 1 or 2 ADCs, but I never have enoug ports.

    Take care
    Sven

Reply
  • Hi Afzal!

    P5 is an input port only and it is not bit addressible. That means, you can only read the whole port as one byte (the addr. is C4 - it is defined in the reg552.h). After that you have to mask the single bits, if required. I usually mix the inputs of P5, since I usually don't need more than 1 or 2 ADCs, but I never have enoug ports.

    Take care
    Sven

Children