Other Parts Discussed in Thread: CC2530
Hi,
I'm trying to implement an application which detects if there is any external device/MCU connected to the P0 pins. If there is a device it is quite easy cuz there will be a certain voltage level on connected pins.
But what in case if there is no device connected and pin is in "floating" state? Is there any way to detect it directly on CC2530 mcu? I tried to:
1. Set port as GPIO
2. Configure pulldown for pins (using P0INP register).
3. Used ADC to read voltage level. (As I assumed 0x00 will be considered as no device connected).
However ADC gives some random values (seems like pulldown is not configured when ADC is running - is that correct?).
Could you tell me how to detect floating pins? Is it possible without having an external resistor connected as a pulldown? If not then 1M Ohm would be good for pulldown?
Thanks for any help.
Best regards,
Lukasz Spas