Almost all of the pins on my MC9s08 CPU are associated with a component (Processor Expert) and in the component properties I have given each one a pin signal. e.g. for Bit1.BitIO the pin signal is Button_1. How can I use the Pin Signal to make my code more readable? For example: - can I use "if (Button_1)....." instead of "if (Bit1.GetVal()).....". If the answer is no, what is the purpose of Pin Signals?
已解决! 转到解答。
Thanks Erich, I did not realise that I could change the component name, so now I will change all of the names. I have 15 BitIO components and I keep forgetting which one does what - so problem solved`!
Thanks Erich, I did not realise that I could change the component name, so now I will change all of the names. I have 15 BitIO components and I keep forgetting which one does what - so problem solved`!
Hi Julian,
the signal name is used for documentation purpose only, see the signals text file inside the generated Documentation folder.
But you can give the component any name you want:
So you could name it 'Button1' and then you can use 'Button1_GetVal()' and so on.
I hope this helps,
Erich