Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need Help to configure the USB in MLA

Status
Not open for further replies.

ep.hobbyiest

Full Member level 4
Full Member level 4
Joined
Jul 24, 2014
Messages
212
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Visit site
Activity points
1,487
i am using mla in that HID_custom code i am using. controller is 18f4550 and xc8 compiler.
i started to configure the code for my application but after commenting ADCON0 register usb doen't work. Why?
i saw analog pins are not multiplex with USB data pins.
Then also what is wrong with the code?
And also if i delete the code of keys and ADC then also code not working neatly.
 

are you using the MLA example
C:\microchip_solutions_v2013-06-15\USB\Device - HID - Custom Demos\Firmware\USB Device - HID - Simple Custom Demo - C18 - PICDEM FSUSB.mcp

if so the ADC is used in the ReadPOT() function
by changing ADCON0 you may have caused the ADC conversion to hang and hence the USB may also hang
 
yes sir.
This may be problem. I just removed all the ADC part it works fine now.
 

Now i am doing task of sending array of string when i m pressing button but i m getting half string only of 6 letters.
what could be the reason.
 

the HID custom test usually send/receive a 64byte array

are you sending to the PIC or receiving?

it the part of the data you receive correct ?
 

i m sending data from pc to PIC.

you check for received data so
Code:
    //Check if we have received an OUT data packet from the host
    if(!HIDRxHandleBusy(USBOutHandle))				
    {   
        //We just received a packet of data from the USB host.
        //Check the first byte of the packet to see what command the host 
        //application software wants us to fulfill.
        switch(ReceivedDataBuffer[0])				//Look at the data the host sent, to see what kind of application specific command it sent.
and the received data should be in ReceivedDataBuffer[1], ReceivedDataBuffer[2], etc
what else is in the ReceivedDataBuffer[] array apart from your characters, can you use printf() to print in hex the 64byte contents of ReceivedDataBuffer
you need to determine
1. is the PC end sending too little data
2. is the receiver not receiving all of it
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top