Hello all,
I've found the import wizard. I select the mB7.2 *.pbp project file, but only the main code is imported, all the modules are not imported. How can I import a full project with all its components?
Thanks
Leo
Importing mB 7.2 projects
-
- Posts: 573
- Joined: 25 Apr 2006 15:39
- Location: Cape Town, South Africa
auch.... (dho!)
being myself the autor, I'll keep playing with the pro version, but I believe I'll go on with the 7.2 version. It's out of my mind to re-write huge codes I have "under construction"!!!
I believe some compatibility must be provided, how can someone migrate to the new version if some of the codes are still in progress? On the other hand, is not worth to complete old codes with 7.2 and start new codes with Pro!
any comment from the forum & mE folk?
Leo
being myself the autor, I'll keep playing with the pro version, but I believe I'll go on with the 7.2 version. It's out of my mind to re-write huge codes I have "under construction"!!!
I believe some compatibility must be provided, how can someone migrate to the new version if some of the codes are still in progress? On the other hand, is not worth to complete old codes with 7.2 and start new codes with Pro!
any comment from the forum & mE folk?
Leo
-
- Posts: 573
- Joined: 25 Apr 2006 15:39
- Location: Cape Town, South Africa
Ouch
A thousand years from now I too might just be an "Author"
I must admit, the new way of setting up libraries, for lcd, keypad, and spi, the few projects that I'm starting to convert from old code, are a bit tedious, almost like Proton Basic, with its "declares"
Then, once you have your code sorted, nothing a bit of "Copy"nPaste" can't fix
And the support from mE, well, does the phrase "runs circles around the opposition", ring a bell?
A thousand years from now I too might just be an "Author"
I must admit, the new way of setting up libraries, for lcd, keypad, and spi, the few projects that I'm starting to convert from old code, are a bit tedious, almost like Proton Basic, with its "declares"
Then, once you have your code sorted, nothing a bit of "Copy"nPaste" can't fix
And the support from mE, well, does the phrase "runs circles around the opposition", ring a bell?
"Copy'nPaste"
Leo and Copy and Paste,
Here is what I did to get my Modules to work in the new Pro Compiler.
First copy your module and place it the directory where you imported your project to.
There are two things to change:
1. Change the extension of the module to mbas
EX. from MY_SPI_Write.pbas
to MY_SPI_Write.mbas
2. Edit the file (Module) to put "prototypes" of the routines in the interface section above the keyword inplements.
EX. from
To
This is what I did to get it to work for me.
Hope this helps,
Durango
Here is what I did to get my Modules to work in the new Pro Compiler.
First copy your module and place it the directory where you imported your project to.
There are two things to change:
1. Change the extension of the module to mbas
EX. from MY_SPI_Write.pbas
to MY_SPI_Write.mbas
2. Edit the file (Module) to put "prototypes" of the routines in the interface section above the keyword inplements.
EX. from
Code: Select all
module MY_SPI_Write
symbol SDO = 0 ' GPIO bit # for SDO
symbol SCK = 1 ' GPIO bit # for SCK
implements
dim count as byte
sub procedure MY_SPI_Write(dim temp as byte)
for count = 7 to 0 step -1
Delay_4us
if testbit(temp,7) = 1 then Setbit (GPIO,SDO)
else ClearBit (GPIO,SDO)
end if
Delay_4us
SetBit (GPIO,SCK)
Delay_10us
ClearBit (GPIO,SCK)
temp = temp<< 1
next count
end sub
sub procedure MY_SPI_Write_Word(dim state as word)
MY_SPI_Write(Hi(state))
MY_SPI_Write(Lo(state))
end sub
end.
Code: Select all
module MY_SPI_Write
symbol SDO = 0 ' GPIO bit # for SDO
symbol SCK = 1 ' GPIO bit # for SCK
sub procedure MY_SPI_Write_Word(dim state as word) ' *** Added these
sub procedure MY_SPI_Write(dim temp as byte) ' *** Added these
implements
dim count as byte
sub procedure MY_SPI_Write(dim temp as byte)
for count = 7 to 0 step -1
Delay_4us
if testbit(temp,7) = 1 then Setbit (GPIO,SDO)
else ClearBit (GPIO,SDO)
end if
Delay_4us
SetBit (GPIO,SCK)
Delay_10us
ClearBit (GPIO,SCK)
temp = temp<< 1
next count
end sub
sub procedure MY_SPI_Write_Word(dim state as word)
MY_SPI_Write(Hi(state))
MY_SPI_Write(Lo(state))
end sub
end.
Hope this helps,
Durango
Hi folk,
thanks to Durango, I can import now my old projects. In any case, for thoes who want to understand why we need to do what Durango explained, please have a look at the Module structures on the Help!!
now my here is my new issue: all my goto statements give the "identifier label_name not declared"
I checked the sintax, and seem correct. Also I verified if the PRO version has some differencies with respect to the 7 version, but none found. Any suggestion??? did someone experienced the same problem?
Leo
thanks to Durango, I can import now my old projects. In any case, for thoes who want to understand why we need to do what Durango explained, please have a look at the Module structures on the Help!!
now my here is my new issue: all my goto statements give the "identifier label_name not declared"
I checked the sintax, and seem correct. Also I verified if the PRO version has some differencies with respect to the 7 version, but none found. Any suggestion??? did someone experienced the same problem?
Leo
-
- mikroElektronika team
- Posts: 265
- Joined: 25 Nov 2008 09:09