Page 1 of 1

usb & pic24F

Posted: Fri Jul 01, 2016 3:19 pm
by regisD
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.

Re: usb & pic24F

Posted: Tue Jul 19, 2016 12:18 pm
by Steve
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.

Re: usb & pic24F

Posted: Wed Jul 20, 2016 3:26 pm
by Benj
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.

Re: usb & pic24F

Posted: Fri Jul 22, 2016 10:18 am
by regisD
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?)

Re: usb & pic24F

Posted: Mon Sep 19, 2016 11:12 am
by Benj
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 368 times
Let me know how you get on.

Re: usb & pic24F

Posted: Tue Sep 20, 2016 9:12 am
by regisD
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 :(

Re: usb & pic24F

Posted: Fri Oct 28, 2016 2:53 pm
by regisD
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.