V Drive 2 for data logger

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

I did notice after I posted,

I was looking through settings and messages trying to find errors. I had a message from the compiler saying crystal too fast for baud rate or something to that effect

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve, I have modified the ROM of Vdrive2 to work at 9600 baud.
What you do is make sure there is no data going into Vdrive2.
Remove power from Vdrive2.
Extract FTRFB.FTD from the attached file on to usb flash drive.
Insert USB Flash drive into Vdrive2 then connect power.
Wait until LED goes to solid green before removing flash drive.
Remove flash drive and place in PC as you must delete FTRFB.FTD before re-inserting flash drive.
Remove and restore power to Vdrive2 as now it should work at 9600 instead of 2400.
Change baud rate of Basic Vdrive test1 - ecio40p.fcfx to 9600 then Recompile.
I did this to my ECIO and it did create a text file called

Code: Select all

VDRIVE1.TXT
With numbers on it.

Matin
Attachments
Vdrive Rom Update.zip
(25.25 KiB) Downloaded 324 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

cheers martin,

Will have a go later and get back to you

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

No problem.
As it works with My ECIO40p, if yours don't work, then we we need to look at hardware in closer detail.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin,

didn't get chance to have a play last night a mate turned up, drank my beer and then did one :cry:

Updated my vdrive as per instructions above

Still nowt :(

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

added an output to turn on C1 when going to write to vdrive, I can see that it is going looping round.

Don't have a scope lead at the moment haven't replaced it since I used it and forgot about the earth whilst scoping a welding machine :roll: :oops:

noticed if I put my led board in series D6 is constantly high so that the led is lit.
My vdrive LED stays green

Steve
Attachments
Basic Vdrive test1 9600 Baud - ecio40p.fcfx
(12.86 KiB) Downloaded 334 times
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

manage to scope the output there is something coming out of c6

Still not writing to my usb stick though
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Do you have one of these now?
Vdrives can also be fussy with what flashdrives are used with it.
It likes kingston one's

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

no I don't, didn't get one in the end

the one that seams to work and I flashed the vdrive with is a 1Gb one from collage

I have a 16 Gb integral - doesn't like this at all this is the one the led goes red straight away

I have a couple more but they have stuff on them I will have a go with those after I clear all stuff off them.

they are 4 gig + though
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

have tried most of my flash drives and not had any joy. I don't have any kingston ones though.

Most of mine are sandisk, danelec, toshiba, mymemory.com and a couple of unbranded items.

The sandisk are like the integral stick doesn't like them at all.

Have found some old microsd cards and have a usb adaptor might give those a try tomorrow one of those is a 512mb kingston

what did you have in mind with the Serial Converter lead ?
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Steve001 wrote:what did you have in mind with the Serial Converter lead ?
You can use it to communicate between PC and Vdrive.
You can check baud is correct and read the contents of flash drive.

As my Vdrive works when connected to ECIO40p, if you pm me your address, we can swap Vdrives then at least that can be removed for the equation.
I will also send you a flash drives that work.

Can you check that jumper next to 2mm connector of Vdrive is connected to the two end pins and the jumper inside Vdrive is connected on the two pins towards the front of the vdrive2

The other thing you can do is if you have any UART to USB bridges then you can use them to check data from TX on C6

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Medelec35 wrote:
The other thing you can do is if you have any UART to USB bridges then you can use them to check data from TX on C6
would this work as a test by creating a "dumb terminal" ?

http://www.matrixtsl.com/wikiv7/index.p ... e)#Receive


Edit:

Still no joy using Kingston microsd and an adaptor - didn't think it would work somehow.
This is what comes out of C6 - using above to monitor output.
Attachments
20170709_150727.jpg
20170709_150727.jpg (230.87 KiB) Viewed 17985 times
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Steve001 wrote:would this work as a test by creating a "dumb terminal" ?
The only thing you will be able to do is send DIR command to list what's on the flash drive.
Issue with LCD is chars are not displayed in the correct order.
E.g LCD is showing WRF 8,9,10, when it should be WRF 30
You can get UART to USB bridges for under £10 so maybe a good investment.

We can go as I suggested and will send Vdrive as signed for.
If they are swapped, I can check all the settings.

I have sent My Flowchart and hex file for you to load and try with.

Martin
Attachments
Basic Vdrive 9600 test1 - ecio40p.hex
(4.17 KiB) Downloaded 276 times
Basic Vdrive 9600 test1 - ecio40p.fcfx
(12.86 KiB) Downloaded 250 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

tried the hex file - didn't make file on usb stick
tested with dumb terminal program - the same result

tried the .fcfx - didn't make file on usb stick
tested with dumb terminal program - the same result

sent you a PM

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

medelec35 wrote: The other thing you can do is if you have any UART to USB bridges then you can use them to check data from TX on C6
This any good ?

http://www.hobbytronics.co.uk/cp2104-usb-serial

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
Steve001 wrote:This any good ?

http://www.hobbytronics.co.uk/cp2104-usb-serial
Yes it should work very well.
I find CP21xx series works better than FTDI .
I also use teraterm in debug mode as that will show non printable chars like ASCII 10 & 13 etc.
Its open source freeware.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

Trying to under stand why the information is incorrect on the lcd display.
Is it because the carriage return and line feed instructions not showing correctly ( screen is a 4 x 20 and i dont clear when it is full ) hence giving a false indication. or is that information correct and something else a miss ,

steve
Attachments
20170709_150727 edited.jpg
20170709_150727 edited.jpg (235.25 KiB) Viewed 17961 times
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve.
Package you sent arrived today.
Tested your:
Vdrive2, connector, ECIO40P (not reprogrammed) and flash drive.

The Text file (see attached) is correctly created on the flash drive.
Left running for a few cycles.
So you have updated ROM successfully.
I have also confirmed this is the case by connecting your Vdrive2 to the USB to ttl converter.
Note: If you connect an LED to D0 it should briefly flash when Vdrive is being updated.

Issue must be with your connections?

Connections are as follows:
Black & Green = 0V
Red = +5V
Orange = C6 of ECIO40P

I have added some addition coloured jumper wires to make connections easier.

I will send all back to you.

Martin
Attachments
VDRIVE1.TXT
(464 Bytes) Downloaded 211 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin thank you for looking at it for me.
Strange I have the same connections I will have a play when I get back but sure why I couldn't get it to work.

Thank you again

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

working now thanks for your help :D

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
As I have done nothing to it except attached new jumper leads, my assumption it was the connections of your hardware.
When you get use to how the vdrive works we can put together a more better and advance version.
We could even use Length$ to set WRF value automatically.

Thanks for letting us know.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

Trying to make a .csv i have changed the following

"OPW VDrive1.txt" & "CLF VDrive1.txt"

to

"OPW VDrive1.csv" & "CLF VDrive1.csv"

nothing on my usb stick - changed back to .txt and a file is created

Any ideas

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
Not tried myself but what about levaving as .txt and just importing text file into excel?
Which I know you can do.
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

sort of doing that, i just changed the extension in windows to .csv seems to work

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Morning

Playing with the second example

Have changed the target device to a PIC16F18875 and am getting the following errors

http://www.matrixtsl.com
Launching the compiler...
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

Basic Vdrive Test2.c: main()
908: PIE1bits.TMR2IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S986
Basic Vdrive Test2.c: myisr()
961: if ((PIR1bits.TMR2IF) && (PIE1bits.TMR2IE))
(199) logical type required ^
(199) logical type required ^
964: PIR1bits.TMR2IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S967
(908) exit status = 1
(908) exit status = 1

FINISHED

i know that i have had this working on an ECIO40 but a coupple of things have changed in my setup since then

1. programmer changed to pickit3 - via EB006 V9 jumpers on ICSP & OSC
2. target changed to PIC16F18875
3. ADC moved to AN32 (fixes have been applied )

Have i got my setting correct ?

I dont understand the error messages or why i have them

Steve
Attachments
Basic Vdrive Test2.01 - AN32.fcfx
(17.4 KiB) Downloaded 163 times
pik kit 3 settings.txt
(328 Bytes) Downloaded 160 times
Success always occurs in private and failure in full view.

Post Reply