Page 1 of 1

Old code does not work with 2016 version of BasicTools

Posted: Tue Sep 20, 2016 5:28 pm
by rajeevph
Hi,
My LPC210x code that worked when I designed our product back in Dec 2011. The same code with the current version of the BasicTool does not work.
1. It first complained that 210x.bas could not be located. I replaced it with 21xx.bas and that took care of the problem.
2. I had to recode parts of the code that contained statements like LOW (sigX) to sigX = 0. and HIGH (sigY) to sigY=1.

This fixed all the errors and the code was flashed in to the chip but it did not work as expected. We have an I2C alphanumeric display that displays the status and it seems to be dead.
Any thoughts on why? Would it be possible for me to download the 2011 version of BasicTools? It will save me lots of headaches.

Thanks

--Rajeev

Re: Old code does not work with 2016 version of BasicTools

Posted: Tue Sep 20, 2016 5:58 pm
by basicchip
LOW (sigX) to sigX = 0

That seems backward to me, in the very early PBASIC like version (before 2011, I thought)

the construct LOW pinnumber was OK

but since we added functions and floats. we force that syntax to be

LOW (pinnumber)

Maybe some samples of your code would help. sigX = 0, will just assign 0 to the variable sigX

Re: Old code does not work with 2016 version of BasicTools

Posted: Tue Sep 20, 2016 6:51 pm
by basicchip
The very old version of BASIC is still at

www.coridium.us/files/V6setup.zip

But if you use that you will lose the ability to use FUNCTION, SUB, any floating point operations, some string operations, and other features since added.

Also any new boards ordered will not have firmware support for that compiler.

Re: Old code does not work with 2016 version of BasicTools

Posted: Sat Sep 24, 2016 8:14 am
by rajeevph
Hi,
I downloaded the V6 version of the tool and it seems to be very old. I could not locate LPC210x.bas file to include. Do you have something that was released around Dec 2011?

Thanks

--Rajeev

Re: Old code does not work with 2016 version of BasicTools

Posted: Sat Sep 24, 2016 2:04 pm
by basicchip
LPC210x.bas was replaced by LPC21xx.bas when the ARMweb was introduced in 2007.

I scanned the archives here for LPC210x.bas, and I don't have a copy of it.

What is the date on that file that you have?

What firmware version and board are you using? It is reported in the Welcome Message.

Re: Old code does not work with 2016 version of BasicTools

Posted: Sun Sep 25, 2016 1:44 pm
by basicchip
I found a copy of LPC210x.bas dated Jan 2010, in a directory with tools from 2008. So I'm not sure we could build that version any more.

Again what board are you using? And what firmware version?

It would be much easier to bring your BASIC code up to the current rev than trying to build old tools. We can do that for a nominal fee.

Re: Old code does not work with 2016 version of BasicTools

Posted: Mon Sep 26, 2016 4:56 pm
by rajeevph
Hi,
I am not using one of your boards, but an LPC2103 chip in my design. We have the bought the code from Coridium.
Here is the snippet of the code that the tool is complaining about.

mask = 1
LOW lcdword(10)
for i=1 to 11
j = a AND mask

j = j >> (i-1)
if j = 1 then
HIGH lcdword(i-1)
else
LOW lcdword(i-1)
endif


mask = mask << 1
next i

LOW lcdword(10) 'wiggle enable low and then high and then low
WAIT(10)
HIGH lcdword(10)
WAIT(10)
LOW lcdword(10)

I changed to lcdword(10) = 0 it compiled alright but did not work as expected. BTW, I do have the 210x.bas file in my installation.

Thanks

--Rajeev

Re: Old code does not work with 2016 version of BasicTools

Posted: Mon Sep 26, 2016 7:12 pm
by basicchip
LOW lcdword(10)

needs to be

LOW(lcdword(10))

same for HIGH

Re: Old code does not work with 2016 version of BasicTools

Posted: Tue Sep 27, 2016 5:14 am
by rajeevph
Hi,

Thanks a lot. My code is working as expected now. I appreciate your help.

Regards

--Rajeev