Output to a pin

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Valued Contributor
Valued Contributor
Posts: 853
Joined: Wed May 31, 2017 11:57 am

Output to a pin

Post by mnf »

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.


User avatar
Matrix Staff
Posts: 2083
Joined: Tue Jan 17, 2012 10:07 am

Re: Output to a pin

Post by LeighM »

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.
Property copy on compile start.fcfx
(11.59 KiB) Downloaded 99 times

Post Reply