| Author |
Message |
|
joy19861111
|
Post subject: PIC18F4550 USB AND EUSART Posted: Mon Dec 20, 2010 3:20 pm |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
can the USB and USART modules run at the same time??? because i read the datasheet that these 2 modules share the PORTC
|
|
 |
|
 |
|
Simon Inns
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Mon Dec 20, 2010 5:09 pm |
|
Joined: Thu Apr 01, 2010 6:23 am Posts: 893
|
|
They share the port but not the same pins. You can happily build a USB to serial converter using a PIC18F4550 or 2550. In fact there is even demo code, look for the CDC demo.
|
|
 |
|
 |
|
joy19861111
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Wed Dec 22, 2010 3:37 pm |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
 |
|
 |
|
joy19861111
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Thu Dec 23, 2010 4:07 pm |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
do u hv face the problem that obtained the undesired result such as in the program PORTB is declared as output, PORTB = 0b11111111, however, the LEDs light out with 0b11011111. I checked the connections for the LEDs there is no problem and i checked the PIC PORTB pin is 0b11011111. What going on to PIC?? is it the PIC is faulted?? or the intialize for PORTB is not complete?
|
|
 |
|
 |
|
Simon Inns
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Thu Dec 23, 2010 7:22 pm |
|
Joined: Thu Apr 01, 2010 6:23 am Posts: 893
|
|
Hi
Make sure your TRISB settings are right and that you have disabled the analogue ports. It's usually one or the other.
/Simon
|
|
 |
|
 |
|
joy19861111
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Sat Dec 25, 2010 2:47 am |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
mr simon, may u briefly explain how to config the PLL?
|
|
 |
|
 |
|
Simon Inns
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Sat Dec 25, 2010 9:08 am |
|
Joined: Thu Apr 01, 2010 6:23 am Posts: 893
|
|
That's hard to do since I don't know the chip you are using or the type of external clock; however you will find that it is well explained in the datasheet for your device.
|
|
 |
|
 |
|
joy19861111
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Sat Dec 25, 2010 11:13 am |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
the one u posted the open source USB HID generic PIC18F version 2.0.0.0., the PLL config for the PIC18F u boost it to 48Mhz. So the overall PIC18F frequency is 48Mhz or these 48Mhz only for the USB module only??
|
|
 |
|
 |
|
Simon Inns
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Sat Dec 25, 2010 2:16 pm |
|
Joined: Thu Apr 01, 2010 6:23 am Posts: 893
|
|
It's 48 Mhz for the overall Fosc so the PIC runs at that speed.
|
|
 |
|
 |
|
joy19861111
|
Post subject: Re: PIC18F4550 USB AND EUSART Posted: Sat Dec 25, 2010 3:18 pm |
|
Joined: Sat Jun 12, 2010 3:50 am Posts: 35
|
|
 |
|
 |
|