PIC18LF2450 USB Slave Warnings

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Hi Team.
I am using the USB slave component with a PIC18LF2450 and during compilation I get some warnings that the Data buffer is outside
available data space?

I am still not at the point where I can actually try to send or receive data however I am afraid when that time comes this warning is going to byte me
Can you please advise what is the seriousness of this warnings
P1.jpg
P1.jpg (36.54 KiB) Viewed 5112 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

HI Team.
Please help I am running into compilation errors with the USB slave on the PIC18(L)F2450 as you will see in the error screen print
some "," issue in the buffer.( It started already to warm me as I posted above with no response) :D
If I compile the same project for a PIC18F4455(same as MIAC) it compiles fine as well as for the P18F2550 and P18F4550.

Errors P18F2450
P3.jpg
P3.jpg (138.81 KiB) Viewed 5092 times
FC Project
USB_MC_LV_Board.rar
(142.36 KiB) Downloaded 207 times
Compilation with P18F4455
P2.jpg
P2.jpg (157.85 KiB) Viewed 5092 times
All help is appreciated

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Hi Team.
Just to mention the PIC18F4550 and the PIC18F2550 does not work with the ghost in EB006V9 and in Flowkit 2
I am really stuck as none is working at the moment ,Can not use the intended chip using an using an alternative to just progress with my customer
then the next non functioning issue pops out ! :D
The ghost issues are some old issue :D will it ever besolved

Just an question ,I recall somehow that you guys mentioned once that I can use the MIAC USB Driver for normal USB slave projects is this correct
or do I need to generate the Drive from FC component properties panel ? ,I am fine using the standard MIAC VID and PID as I already use the MIAC with this driver and labVIEW quite well.And the USB coms is only for my testing and usage not for the customer .
P4.jpg
P4.jpg (38.5 KiB) Viewed 5083 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Hi Team

In a deparate attemp to move forward I milled a PCB this weekend for the intended USB Slave chip PIC16F1455 it working fine
I can program and do what I want as long as I do not want to use the FLOWKIT2 it also does not work in this chip.

This one might be because it is internal OSC however on the P18F4550 and 2550 it is with 20MHZ OSC Chrystal ,I will check this one with an Chrystal clock.

In summary
(1) P18F2450 compilation issues with USB slave
(2) P18Fx550 chips no debugging with Ghost or ICD
(3) P16F1455 issue with ICD not variefied with chrystal
the bottom line is I am stuck and my project is stuck with an angry customer :D
P2.jpg
P2.jpg (31.88 KiB) Viewed 5056 times

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

Re: PIC18LF2450 USB Slave Warnings

Post by Benj »

Hi Peter,

Does your code include a C code icon to switch internal clock speed. This is known to be a problem with ICD and so the workaround is to edit the FCD file and include the code into the Inline.main.init code.

e.g.

Code: Select all

<inline >
    <defines code="#define MX_10F_TRIS\n\n" />
    <directives code="#include <xc.h>\n#include <math.h>\n\n" />
    <main >
        <start code='\nvoid main()\n{\n' />
        <end code='\tmainendloop: goto mainendloop;\n}\n\n' />
        <init code='!!!! ENTER YOUR C CODE HERE !!!!' />
    </main>

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Hi Ben-

Is this nessecrary for the P18 devices running on an External 20MHZ Crystal? I was always under the impression this is only necessray when running internal OSC? You did this once for me on a PIC18 with Internal OSC !
So far all the chips I used ICD with external Chrystal worked fine .my real issue here is getting the USB slave to compile for the18F2450 the attched project compiles fine if I use the 18F4455 ora 4550 etc .
The reason is my motorcontrol board that I develop the MotorControl code for my customer has the 2450 on board as communication link to labVIEW.

I would be greatfull if you guys canhelp me to get this working for now all other things happend as I was desperate .

Regards
Peter

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

Re: PIC18LF2450 USB Slave Warnings

Post by Benj »

Hi Peter,

No if your using a crystal then you don't need to add any C code or do any FCD magic.

The 2450 has half of the RAM of the 2455 and so there could be an issue here. I remember back in the BoostC days that the 2450 was special case in terms of the USB mapping. I'll have a quick look and see if I can work out what's going wrong.

edit. I'm getting the compiler errors here too so hopefully it's a quick fix.

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

Re: PIC18LF2450 USB Slave Warnings

Post by Benj »

I've uploaded a new version of the slave component. Hopefully it will solve the problem for you. :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Ben.

Thanks a million,
I am out of my lab tomorrow however on Thursday I will give the new componet a go
The Chart Compiles fine with me too know :D :D :D :D
I appreciate this . :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: PIC18LF2450 USB Slave Warnings

Post by QMESAR »

Hi Ben and Team.

Thanks Ben the P18F2450 USB Slave components now compile and is running fine :D

Thanks a million for helpingout on this

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

Re: PIC18LF2450 USB Slave Warnings

Post by Benj »

Hi Peter,

That's brilliant thanks for letting us know.

For some reason the 2450 mapping was missing from the component code so I just had to add it back in and so ended up being a very simple fix.

Post Reply