View previous topic :: View next topic |
Author |
Message |
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sun Nov 16, 2014 4:22 pm Post subject: MISO internal name |
|
|
I try to use Din pin (MISO) in SPISOFT as "BUSY" like this:
But "MISO" name in this case not valid. Is there an internal BASCOM name of this pin?
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Mon Nov 17, 2014 9:31 am Post subject: Re: MISO internal name |
|
|
Mrshilov wrote: | But "MISO" name in this case not valid. |
... nor in any other case. Since when do you expect Bascom to know all the pin-names of the controller?
But even it would, what do you expect that the name MISO is linked with, the input Pin-, or the output Port-Register?
If you want to configure MISO in one place of your code for the sake of maintainability, you may try an Alias. |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Mon Nov 17, 2014 2:02 pm Post subject: |
|
|
I need to know internal name of "MISO" ("Din") maked with this string:
Code: | Config Spi = Soft , Din = Pind.2 , Dout = Portd.4 , Ss = None , Clock = Portd.1 |
Of course I can use "Alias" or "Pind.2", but it will be better to do it once. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Mon Nov 17, 2014 2:46 pm Post subject: |
|
|
Mrshilov wrote: | I need to know internal name of "MISO" ("Din") maked with this string:
Code: | Config Spi = Soft , Din = Pind.2 , Dout = Portd.4 , Ss = None , Clock = Portd.1 |
|
Did you try?:
Code: | Miso Alias Pind.2
Config Spi = Soft , Din = Miso , Dout = Portd.4 , Ss = None , Clock = Portd.1 |
Quote: | Of course I can use "Alias" or "Pind.2", but it will be better to do it once. |
That would be done then only one time.
If you want to see Bascom's internal variables, check its compiler options. As far I saw, there is no one for "Din" |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5914 Location: Holland
|
Posted: Wed Nov 19, 2014 12:20 am Post subject: |
|
|
I will add _MISO. If you want a beta you know where to find me _________________ Mark |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Nov 19, 2014 12:58 am Post subject: |
|
|
This is good.
As I understand, in current version there is no name for MISO in SPISOFT. May be it present for HW SPI? Or may be it can be read from def-file? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5914 Location: Holland
|
Posted: Wed Nov 19, 2014 10:08 am Post subject: |
|
|
it is not present for hardware either. the compiler uses info from the dat file. _________________ Mark |
|
Back to top |
|
|
|