Problem with VDrive2

MORA99

Senior Member
With all the threads about 64MB+ space on the PICAXE, I ordered a vdrive to try it out, but the documentation is poor at best :/

I have hooked up the vdrive, but it just flashes red/green alternating for 2secsm pause, repeat, in the manual this is done "until monitor connects".
The picaxe is connected with hserin/out and sende E to sync.

Could it be my flash disk is just not useable with the drive?
I would have guessed the vdrive still would answer picaxe on non disk commands, such as echo and "is disk present".

The disk is a 4gb fat32 formated noname from the local supermarket.

I have opened the plastic case and tried to move the jumper to upgrade firmware, then it dosent flash, but no action.
When I turn it back, same blink prosedure, and no action on the usb stick, so I dont think its updateing.

Any help please :)

(Update)
Got a little life out of it, by selecting the right mode on the jumper (default is spi).
Now it stops blinking when the picaxe sends data, wuhuu.
But still cant get an echo reply to sync with :/
 
Last edited:

MORA99

Senior Member
I got it working after some debugging.

Just for anyone finding this thread later.

1: The jumper should be pull-up for serial, on my version thats far from the cable, but use a DMM to check.
2: Drive formated as a single partition FAT32 (can be 16 and 12 too)
3: Wait for a second before starting comm, or it sometimes stalls.
4: E sync can take very long, up to a minute or so.
5: $0A is used to get a CR inside the file.


This code creates a log.txt file with 100lines
Code:
pause 1000
; Interfacing a VDRIVE module to PICAXE-28X1; Hardware Setup; VDRIVE PICAXE-28X1
; 1 Black GND - 0V
; 3 Red V+ - V+
; 4 Orange RXD - HTXD input6 C6
; 5 Yellow TXD - HRXD input7 C7
; 6 Green CTS - tie to 0V; Note RXD on VDRIVE2 connects to TXD on PICAXE etc.vdrive2sch.JPGsymbol first_byte = b0
symbol point = b1
symbol temp = b2

symbol first_byte = b6

#picaxe 28x1

; open terminal after download
; This is to view the ’sertxd’ debugging comments
#terminal 4800

setup:
; setup serial hardware
; at 9600 with background receive
hsersetup b9600_4,%01
low 0 ; ensure CTS is low

init:
; Send Es until the unit responds correctly
sertxd ("<Sent> E",CR,LF)
hserout 0,("E",CR)
pause 1000
gosub get_response
if first_byte <> "E" then init

main:

for b3 = 0 to 100
 gosub openfile:
 sertxd ("<Sent> write to file")

 bintoascii b3,b10,b11,b12 ; convert b4 byte to 3 ascii digits

 sertxd ("<Sent> ",#b3)
 hserout 0,("wrf ",$00,$00,$00,$04,CR,b10,b11,b12,$0A,CR)

 pause 30

 gosub closefile:

next

end



openfile:
; create a log file called &#8216;log.txt&#8217;
sertxd ("<Sent> Open file",CR,LF)
hserout 0,("opw log.txt",CR)
pause 500
gosub get_response
return

; Sub procedure to receive background bytes
get_response:
pause 50 ; wait a while
sertxd ("<Response> ")
point = 0 ; reset local pointer
get point,first_byte ; Save the first reply byte
do
get point,temp ; get returned byte
sertxd (temp) ; transmit it
inc point ; increment pointer
loop while temp <> CR ; if not CR loop

sertxd (LF) ; Add a LF to the received CR
sertxd (CR,LF) ; Do another blank line
hserptr = 0 ; reset the background receive pointer
return

checkdrive:
; check to see if a drive is actually inserted
; response will start D for yes and N for no
sertxd ("<Sent> Check Drive",CR,LF)
hserout 0,(CR)
pause 1000
gosub get_response
if first_byte <> "D" then checkdrive:
return

closefile:
sertxd (CR,LF)
sertxd ("<Sent> Close file",CR,LF)
hserout 0,("clf log.txt",CR)
pause 1000
gosub get_response
if first_byte <> "D" then closefile
return
 

benryves

Senior Member
It may be worth downloading the latest firmware as it appears the incredibly slow startup problem was fixed in v03.61 ("Removed initial scan of disk for determining free space. This means that disks can be used almost immediately after being detected by the firmware.").
 

Marcwolf

Senior Member
Vdrive with 18X

Hi
Just a couple of quick questions..
I am about to do some testing on my VDrive.

Can I chat with it using a standard PC serial interface for I can become familiar with its commands..

Also - I need to use it with an 18X - and was wondering if anyone had any more news on this.

Take Care

Dave
 

MORA99

Senior Member
I havent tried using it without the hardware serial, it depends if picaxe is fast enough to recieve the data after sending.
But I think you need X1 parts to get timeout on serial command ?

You can chat with the vdrive with a pc yes, but it will need a level converter (max232).
_Maybe_ resistors like picaxe is enough, but I have only tried with max232 and thats what the datasheet recommends.
 
Top