I'm using a MAX32664/MAXMAX30101 with 18F4550
This boards requires changing the direction of a pin from OUTPUT to INPUT during the program.
https://www.sparkfun.com/sparkfun-pulse-oximeter-and-heart-rate-sensor-max30101-max32664-qwiic.html
Can GCB support this? If so how.
Yes, just use dir port.pin In|Out
dir port.pin In|Out
I would use an alias for port.pin.
port.pin
But, this is a common practice.
Thanks
I have this in my code:
dir PortA.4 In|Out
When I compile I get this error message:
Oximeter_5.gcb (68): Error: Invalid pin direction, expected In or Out Oximeter_5.gcb (68): Error: Syntax Error
Did I do what you suggested, correctly?
In|Out means In or Out. You cannot use In|Out
In
Out
In|Out
I tried dir PortA.4 In OR Out but got the same error message.
Dir port.pin In
or on another line
Dir port.pin Out
Log in to post a comment.
I'm using a MAX32664/MAXMAX30101 with 18F4550
This boards requires changing the direction of a pin from OUTPUT to INPUT during the program.
https://www.sparkfun.com/sparkfun-pulse-oximeter-and-heart-rate-sensor-max30101-max32664-qwiic.html
Can GCB support this? If so how.
Yes, just use
dir port.pin In|OutI would use an alias for
port.pin.But, this is a common practice.
Thanks
I have this in my code:
define MFIO_Pin PortA.4
dir PortA.4 In|Out
When I compile I get this error message:
Oximeter_5.gcb (68): Error: Invalid pin direction, expected In or Out
Oximeter_5.gcb (68): Error: Syntax Error
Did I do what you suggested, correctly?
In|Out means
InorOut. You cannot useIn|OutI tried dir PortA.4 In OR Out but
got the same error message.
Dir port.pin In
or on another line
Dir port.pin Out