EB-063 connection RF-macro

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

EB-063 connection RF-macro

Post by saschech@gmx.de »

Hello Team

In the ext properti.. thera are software and hardware connection.
in software-conn. i can set all io-pins to ports i want.

in hardware-conn. i can set only the cs-pin and the fsel-pin to all ports.
Question:
Use the rf-macro the sck2,sdi2,sdo2 pins ? >> 30F5013
because many chip`s have also sck1,sdi1,sdo1 pins.>>30F6012A

Regards Wolfgang
Attachments
RF-macro-software.gif
(46.23 KiB) Downloaded 634 times
RF-macro-hardware.gif
RF-macro-hardware.gif (35.19 KiB) Viewed 2902 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB-063 connection RF-macro

Post by Benj »

Hi Wolfgang,

When the component is in hardware mode it will default to SPI peripheral number 1.

E.g. sck1,sdi1,sdo1 pins

You can re-assign the SPI peripheral if you wish by using the custom code feature to change the following definition.

#define MX_RF_SPI_HW %a //SPI Hardware or Bitbanged Port Control

to

#define MX_RF_SPI_HW 2 //SPI Hardware Peripheral 2

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: EB-063 connection RF-macro

Post by saschech@gmx.de »

Hello Benj

I have understand your answer and i now the costum-code-macro
but i have a big problem to use it in praxis
is there a example for rename the 3 spi1 pins to spi2 because i use the int0 (is the sck1-pin)?

regards Wolfgang

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB-063 connection RF-macro

Post by Benj »

Hello Wolfgang,

Yes as I seaid before switching between peripherals is fairly straightforward.

Select the RF component on the panel and click the custom code button in the panel properties pane.

Then select the defines function and click edit.

Find the line near the top of the defines.

#define MX_RF_SPI_HW %a //SPI Hardware or Bitbanged Port Control

and change it to match this.

#define MX_RF_SPI_HW 2 //SPI Hardware Peripheral 2

Click Ok and hopefully that's job done.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: EB-063 connection RF-macro

Post by saschech@gmx.de »

Hello Benj
Thank you again!!
I was thinking a complete other one..... "custom" in the Misc-tab ..... oh,oh
it is fairly straightforward to change!

Is these change only for the project or for ever in a file?

Regards Wolfgang

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB-063 connection RF-macro

Post by Benj »

Hi Wolfgang,

The change is only on a project basis. If you need a more permanent solution for other programs then you can either export the customized component and then import into programs that need the mod, (this can be done via the customise window) or you can manually edit the component C file to make the change permanent.

Post Reply