CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18LF4550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

18LF4550
PostPosted: Thu Jan 30, 2014 1:18 pm     Reply with quote

Hello! I have the following problem: Since I worked with 18F4550 I had no problem with usb_cdc transmit/receive data. But, the demand to connect my MCU to a 3.3V device forced me to change MCU. So the new chip (3.3V tolerant) has been chosen - 18LF4550. The problem with the new chip occurred at the very beginning. First problem is that the driver pic18_usb.c (which is invoked by usb_cdc.h) does not recognize PIC18LF4550.
Code:
#else
 #error Unknown PIC device, USB not supported in this library.

The only LF series supported chips are
Code:

#elif ((getenv("DEVICE")=="PIC18F45K50") ||  \
       (getenv("DEVICE")=="PIC18F25K50") ||  \
       (getenv("DEVICE")=="PIC18F24K50") || \
       (getenv("DEVICE")=="PIC18LF45K50") ||  \
       (getenv("DEVICE")=="PIC18LF25K50") ||  \
       (getenv("DEVICE")=="PIC18LF24K50"))

My compiler is a fairly new 5.015. Can I modify the header file, or there is easier way to set the usb_cdc up?
I know that the easiest way to solve my problem is to buy a chip compatible with the driver I have, but hey it is Bulgaria I had been waiting for 18LF4550 delivery for a week, so there must be solution not including exchange of devices.
Sorry about poor English!
10x in advance!
_________________
A person who never made a mistake never tried anything new.
Ttelmah



Joined: 11 Mar 2010
Posts: 19559

View user's profile Send private message

PostPosted: Thu Jan 30, 2014 4:21 pm     Reply with quote

The LF4550, _is_ a 4550....

It is just the low voltage version of the same chip.

Compile your code for the 4550. Remember that with this chip _you_ have to supply the USB Vref (the regulator doesn't run below 4.5v). Also maximum clock rate is limited to 18.7MHz at 3.3v.

As a further comment to this, look at the 46J50 instead. Pin compatible, has several extra peripherals (second re-mappable UART etc.), and goes to the full 48MHz at low voltages.

Best Wishes
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

PostPosted: Fri Jan 31, 2014 6:18 am     Reply with quote

Thank you for quick reply!
Ok, I have to use 18LF4550 because I already have plenty of them Laughing . How do I have to configure the fuses and oscillator so that the usb would work steady? It is obvious that this wouldn't work at 48MHz, but there must be way to set up the usb periferal.
_________________
A person who never made a mistake never tried anything new.
Ttelmah



Joined: 11 Mar 2010
Posts: 19559

View user's profile Send private message

PostPosted: Fri Jan 31, 2014 6:43 am     Reply with quote

I'd suggest you use a 16MHz crystal.
Then HS, PLL4, CPUDIV1, NOVREGEN, BORV27, PUT, NODEBUG, CPUDIV1, USBDIV, NOXINST, NOIESO, NOWDT
and CLOCK=16MHz

Gives a legal operating frequency at 16Mhz, and fast USB.

You need a well decoupled 3.3v connection to Vusb.

There are a _lot_ (emphasise _lot_...) of errata on these chips. One reason I prefer the 46J50 (only has a handful). If you are using many of the peripherals, 'beware'....

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group