How do I go about writing to a user defined pin?
Specifically - I want to write to the CE pin defined in a user component (but not from within the component)
- for example NRF24L01...
I'd like CE = HIGH (or 1), Delay(10us), CE = LOW
Looking at the C generated we have FCP_SET(B, B, 2, 4, 0) (for example) - but using this isn't portable since the Flowcode to C translator has already done it's magic and assigned the necessary values in the code.
I've tried a calculation box with nrf24l01::ce_pin as the variable. No joy..
The Output flowcode icon requires port and bit to be specified - can I do this programmatically? This only seems to allow hard-coded values (- how would I output a variable to a port rather than specifying the value at compile time (for example PortB = x)
Thanks for any pointers.
Martin
Output to a pin
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Output to a pin
Hi,
Please see attached example of copying a property on compiler start.
I think this should do what you want, if I understood the question correctly.
Leigh
Please see attached example of copying a property on compiler start.
I think this should do what you want, if I understood the question correctly.
Leigh
- Attachments
-
- Property copy on compile start.fcfx
- (11.59 KiB) Downloaded 226 times