- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having a problem reading a Digital pin after I issue a change drive mode command.
The pin is configured as Dig. HiZ in the configuration box, then set to one of the following, pull up, pull up/own or strong.
That part works and the pin is able to drive my output. When I issue the drive mode command to change to Dig HiZ the output signal is disable and the signal falls to zero, (OK to this point) But when I try to read the pin it reads zero even if jumpered to VDD_IO.
If I skip the out put section of the code and the change to dig_HiZ the pin will read the signal. Even if the pin is already in hiZ mode issuing the command will disable me from reading the pin.
The command I am using is
Thanks for your help.
WSensor_SetDriveMode(1); // set Dig_HiZ mode
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I understand it, HighZ digital disconnects outputs. So if You have pin configured as output You neither read notr write.
regards
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the pin configured as input and output. After outing the signal the mode is switched to HiZ so that I can read it. It does switch and the voltage at the output starts to drop but I cant read the pin after that. For now I am using two pins as a work around but it would be nice to get it on one pin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to check if the proper registers have been set after issuing command.
You must trace in- to output command (DriveMode).
Another possibility is to use bidirectional pin bufoe
regards
robert