usb & pic24F

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

regisD
Flowcode V4 User
Posts: 16
Joined: Wed Apr 07, 2010 7:48 am
Location: France, Troyes
Contact:

usb & pic24F

Postby regisD » Fri Jul 01, 2016 3:19 pm

Hi Benj, I think you have a lot of work, but can you give me advice for my usb problem (I use FC mainly for its usb easiness and with a legal license...). With de FC4 version i had could solve the problem because i had access to the usb code, but with FC6 i can't change anything.
Tell me if you have a solution or not (do I have thought about changing software?)
Regards.

User avatar
Steve
Matrix Staff
Posts: 3071
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Re: usb & pic24F

Postby Steve » Tue Jul 19, 2016 12:18 pm

We're quite busy at the moment since the launch of FC7, but we'll try to look into this problem. I see from earlier posts that you fixed the issue in FC4 by editing the C code directly. It's a bit more difficult to do this in FC6, but you can...

In FC6, you could try editing the code in the following location: ...Flowcode 6\CAL\PIC16BIT\USB

I'll also pass this post on to Ben so he can have a look when he is back from his holiday.

User avatar
Benj
Matrix Staff
Posts: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: usb & pic24F

Postby Benj » Wed Jul 20, 2016 3:26 pm

Hello Regis,

Do you know the code that you changed for the v4 component to function correctly? Also please can you post your Flowcode v6 project file (and maybe your v4 project file too) and I will investigate. You can send the files to me via a PM if they are commercially sensitive and I will ensure they remain private.

regisD
Flowcode V4 User
Posts: 16
Joined: Wed Apr 07, 2010 7:48 am
Location: France, Troyes
Contact:

Re: usb & pic24F

Postby regisD » Fri Jul 22, 2016 10:18 am

Hi Benj,
happy to read you, I allready posted file on the french forum (it's not sensitive), but if you want i can send it again. Few years ago (apr 2012), under FC4 I changed C code of the usb Send_Byte and Send_String procedure, I just removed a comment at the beginning of the line "USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&OUTPacket,USBGEN_EP_SIZE);" (end of the procedure) and it works (but I can't do it with FC6).
Another thing, with FC6 the programm works with a 18F2550...
thanks a lot and excuse me if I am insistent (perhaps it's not a good idea to use the slave mode?)

User avatar
Benj
Matrix Staff
Posts: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: usb & pic24F

Postby Benj » Mon Sep 19, 2016 11:12 am

Hello,

This line of code is called as part of the CheckRx macro.

USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&OUTPacket,USBGEN_EP_SIZE);


Here is your program re-jigged slightly to use the slave macro.

test_v6.fcfx
(11.57 KiB) Downloaded 119 times


Let me know how you get on.

regisD
Flowcode V4 User
Posts: 16
Joined: Wed Apr 07, 2010 7:48 am
Location: France, Troyes
Contact:

Re: usb & pic24F

Postby regisD » Tue Sep 20, 2016 9:12 am

Hi Benj,
thanks again for your help, I tried your solution but without success (same problem, the transmission works randomly)
and when I was looking for this bug I remember that I already had checked this method... what a pity
Why it's different between FC6 for pic18F and 24F? because this works with pic18 :(

regisD
Flowcode V4 User
Posts: 16
Joined: Wed Apr 07, 2010 7:48 am
Location: France, Troyes
Contact:

Re: usb & pic24F

Postby regisD » Fri Oct 28, 2016 2:53 pm

Hi ben,
can i edit the source code of the usb functions (send_byte, check_Rx...)? I think it's in a binary file, no? and can I juste compile the c file? because fc6 always re-write the c file and i can't modify it as i want.
Another think: there is a bug with FC5 and the config registers (24F), in the fc5 file config1 is save as config4 (and reverse), config2 as config3 (and reverse).
thanks.

Benj wrote:Hello,

This line of code is called as part of the CheckRx macro.

USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&OUTPacket,USBGEN_EP_SIZE);


Here is your program re-jigged slightly to use the slave macro.

test_v6.fcfx


Let me know how you get on.