VDRIVE and BasicChip

Questions on other types of hardware and getting it talking to the ARM CPU
ronr
Posts: 20
Joined: Tue Nov 05, 2013 8:17 pm

VDRIVE and BasicChip

Post by ronr »

I have used a Vdrive with an ArmMite successfully in the past. I modified code that I got from Coridium (but where??) years ago and everything works well.
Now I want to use a Vdrive with a BasicChip, and I find the conversion of code that will run is not as easy as I expected. I'm wondering if that has already been done by someone, and if it is available.
I already searched this forum but found nothing so far.
Thanks for any help or advice.



olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: VDRIVE and BasicChip

Post by olzeke51 »

I looked at my copy of Vdrive.bas and only found it uses the Serial.bas library.
Looks like you would need 4 pins (5?) for the serial - RTS & CTS are used by the Vdrive device
-
what kind of code conversion issues are you having??
'
Olzeke51

ronr
Posts: 20
Joined: Tue Nov 05, 2013 8:17 pm

Re: VDRIVE and BasicChip

Post by ronr »

I now got the syntax fixed, and hardware pin assignments correct. It just hangs-up here and there. I wasn't expecting that. I'm slowly working through the troubles. I will probably get it working before too much longer.
I just wondered if there was something already available for the BasicChip and I just couldn't find it. Guess not.
No problem.
(I got "Vdrive.bas" from somewhere long ago, but can't remember where and I could not find it anywhere again recently - which is why I asked in this forum.)

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: VDRIVE and BasicChip

Post by olzeke51 »

I got these off Coridium recently:

see below for an updated VDRIVE.bas
testVDRIVE.bas
(1.06 KiB) Downloaded 599 times

basicchip
Posts: 1028
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: VDRIVE and BasicChip

Post by basicchip »

We here at Coridium have not looked at that code in quite some time. At the time we wrote it is was the only way to talk to some sort of storage readable by a PC. I hope you do successfully port the code and post that here. Assuming it is using a hardware serial port it should port easily (I know that is easy to say, but I'd have to find one of the Vdrives buried in the office here to really help).

basicchip
Posts: 1028
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: VDRIVE and BasicChip

Post by basicchip »

I just looked at the code and like the LPC2103 the LPC1114 only has a single UART, so the serial is bit-banged. And that has the possibility of missing characters while the CPU is doing something else.

Parts with more than one UART would be easier to manage the VDRIVE.

ronr
Posts: 20
Joined: Tue Nov 05, 2013 8:17 pm

Re: VDRIVE and BasicChip

Post by ronr »

Alright, so I decided to try to load my old ArmMite program (from 2010, that works with a vdrive) and go from there. But, I cannot even get my old ArmMite code to load into the ArmMite without syntax errors now.
Maybe off the original subject, please, what is the version of Armbasic.exe that I need to load an ArmMite? Version 7.43 is the earliest I still have - I think it needs version 6.something, am I right? Is an older version available for download?

basicchip
Posts: 1028
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: VDRIVE and BasicChip

Post by basicchip »

What version firmware is the ARMmite running?

I just checked the above source and it is for an ancient pre-floating point, PBASIC style compiler.

I updated it to compile with the new compiler, which is not that hard

all IO functions must be used as if they were BASIC subroutines
so output x --> becomes output (x)

same for wait x --> becomes wait(x)
Vdrive.bas
(5.82 KiB) Downloaded 428 times

ronr
Posts: 20
Joined: Tue Nov 05, 2013 8:17 pm

Re: VDRIVE and BasicChip

Post by ronr »

I found my old install CD and found the right combination of versions to make my old ArmMite program, that uses Vdrive, to load and work on my old ArmMites. The ArmMite is version kernel 7.43, BASICtools is V4.6 and ARMbasic is V7.36.

At the beginning of this Vdrive-to-BasicChip project, I had made the obvious and trivial syntax changes to my program so it compiles with newer versions of everything for the BasicChip (kernel V8.43a with BASICtools V5.19 and ARMbasic V9.28c), but it still will not run - not correctly or not at all. Even just moving a Function from the main program to a file, which is "included" at the beginning of the main program, will compile to a shorter length and hang-up when started. My work-around is to keep most or all functions in the main program, defined at the beginning, of course. I have yet to figure-out what is going on with this.

And the old ArmMite with Vdrive works just great. It uses vdrive drivers that I modified from "Vdrive.bas". I'm running it at 38400 baud and never have a problem.
I remain mystified why the BasicChip (just running at 9600 to the vdrive) is giving me so much trouble. (Could I be doing something so block-headed to cause all this trouble? I'm open to suggestion.)
Would a current version ArmMite with program syntax corrections work at all? (As in, like the old one?)

I'll try attacking the problem from another direction - using "Vdrive.bas" as is and write my new routines around it.

Thanks for your attention.

ronr
Posts: 20
Joined: Tue Nov 05, 2013 8:17 pm

Re: VDRIVE and BasicChip

Post by ronr »

In experimenting with using "Vdrive.bas", I find that just removing comments at the top of Vdrive.bas will make the compiler produce "no new line at end of file" messages and compile to a much smaller executable, which will not run at all. This is by just removing comments at the top of "Vdrive.bas". This is the sort of weird problems I have been facing while trying to get vdrive to work with the BasicChip. Any insights? Please?

Post Reply