Author Topic: PIC16F1459 and MPLAB X Code Configurator  (Read 3119 times)

0 Members and 1 Guest are viewing this topic.

Offline The Magic RabbitTopic starter

  • Regular Contributor
  • *
  • Posts: 108
PIC16F1459 and MPLAB X Code Configurator
« on: September 29, 2015, 11:26:11 am »
Does anyone know how to get the clock to the claimed 48MHz from the data sheet, and why there are no USB libraries for a chip advertised as targeted towards USB use!?

Sent from my XT1039 using Tapatalk

 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #1 on: September 29, 2015, 11:51:10 am »
What clock source are you using?

As for libraries, the 16F1459 usb port appears to have been borrowed from the PIC18F46Jxx/ 18F25xx family and bolted-on to the mid-range silicon. The libraries for the 18Fxxxxx should work - may be with a bit of fiddling. E.G.  http://www.signal11.us/oss/m-stack/
 

Offline The Magic RabbitTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #2 on: September 29, 2015, 11:53:54 am »
INTOSC which the datasheet says should get me to 48MHz by using a 16MHz clock and PLL x3

Sent from my XT1039 using Tapatalk

 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #3 on: September 29, 2015, 12:13:56 pm »
I''ve only used it with an external xtal. This thread might provide some inspiration.

https://www.eevblog.com/forum/microcontrollers/pic16f1459-problem/msg732903/#msg732903

Also, be sure to check out the errata-datasheets on Microchip's website - not everything on the silicon works as datashheet claims!
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #4 on: September 29, 2015, 12:16:58 pm »
The clock config module for the 1459 seems to be broken in the code configurator. So... do it the oldfashioned way: OSCCON = 0xFE; Note that the INTOSC is probably not going to be accurate enough for USB by default, you need to tune it.

As for USB libs: did you see MLA?
 

Offline The Magic RabbitTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #5 on: September 29, 2015, 12:23:17 pm »
Broken in code... so not just me.

Do I manually change the XTALFREQ declaration to 48 from 16 too?

What's MLA?

Sent from my XT1039 using Tapatalk

 

Offline The Magic RabbitTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #6 on: September 29, 2015, 12:36:57 pm »


This is as far as I've got so far... I'm sure I need to get rid of those blue/white crosses. I'm expecting something needs ticking, changing, etc somewhere but can't find the option and there are no clues in the interface.

Sent from my XT1039 using Tapatalk

 

Offline The Magic RabbitTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: PIC16F1459 and MPLAB X Code Configurator
« Reply #7 on: September 30, 2015, 11:04:32 pm »
Just updating; Found the MLA. Feel a bit of a donut not knowing about it from the start. There's an absolute mountain of stuff in there to learn from. TONS of example applications.

Thanks for pointing me to them. I've got lots of reading and learning to do! :-D



Sent from my XT1039 using Tapatalk

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf