We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
It's been a long time, but I seem to remember that the databook was quite clear on it. It was pretty simple as I recall. - Mark
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
A simple rule on bit addressable SFR's: If the address of the SFR is on an 8 byte boundary (e.g. 0xA8) it is bit addressable. - Mark