why use pin signals?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

why use pin signals?

Jump to solution
770 Views
juliancox
Contributor V

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?

0 Kudos
1 Solution
581 Views
juliancox
Contributor V

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`!

View solution in original post

0 Kudos
2 Replies
582 Views
juliancox
Contributor V

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`!

0 Kudos
581 Views
BlackNight
NXP Employee
NXP Employee

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:

pastedImage_1.png

So you could name it 'Button1' and then you can use 'Button1_GetVal()' and so on.

I hope this helps,

Erich

0 Kudos