Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic18f87j50 USB problems

Status
Not open for further replies.

Tim_B

New Member
Has anybody used one of the new 18f87j50 series of pics and got the USB to work?

We can get the pic running but cannot connect to the PC.

We have all the obvious stuff like connecting VUSB to 3.3v external.

Our config settings are.

Debug = OFF ; Background debugger disabled; RB6 and RB7 configured as general purpose I/O pins
XINST = OFF ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
STVREN = On ; Reset on stack overflow/underflow enabled
PLLDIV = 5 ; Divide by 5 (20 MHz oscillator input)
WDTEN = OFF ; WDT disabled (control is placed on SWDTEN bit)
CP0 = OFF ; Program memory is not code-protected
CPUDIV = OSC1 ; [No CPU System clock divide]
IESO = OFF ; Two-Speed Start-up disabled
FCMEN = OFF ; Fail-Safe Clock Monitor disabled
FOSC = HSPLL ; HS oscillator, PLL enabled, HSPLL used by USB

And we have a 20mhz xtal fitted


I have searched the internet but not found 1 post of some one using the USB side. I looked at purchasing demo boards but there not out yet.

If it can be confirmed that it works I will pull the chip from the board and solder another one on.

Obviously its a last step :(
 
I do hope you are referring to the PIM (Plug -In- Module). But as I suspect, "I looked at purchasing demo boards...", you are in for a big let down as I was an still am.

The USB supporting microcontrollers from Microchip must be loaded with USB Code in addition to your own code. This is known as USB Firmware. If Firmware sounds drastic as opposed to saying USB functions or include files, it is because it is drastic. The USB Firmware is large and complex. It Will most likely be more larger and complex than you own code. It will also consume a major part of the processing time because that is how USB is structured: constant interrupts even when data is not being transferred precluding the use of time sensitive main code inside the same USB handling chip. The PIC will only handle the shifting of differential Serial Data what is called a SIE (Serial Interface Engine).
 
Thank you donniedj

I am aware of how USB works in a pic. So back to the question. I presume the PIM module (which was one of the demo boards I was looking at) does work? You have tested it with USB?
 
Nop not a module kind of guy. Only tested 18F2455 and 18F4455.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top