View Full Version : Early Feb has come and gone
cncmachineguy
- 4th March 2011, 16:35
Just wondering if there is any news on the "B" update?
Darrel Taylor
- 4th March 2011, 22:21
It's here Bert ...
http://melabs.com/support/patches.htm
cncmachineguy
- 4th March 2011, 22:35
Cool!!! I must have been out of the loop: LOL Thank you!
ScaleRobotics
- 5th March 2011, 00:56
Ok, I have not tried at home yet, just from work. But I get errors trying to compile for the new chips. I tried three of the new J's, and pretty much get the same errors. I have checked to make sure that MPLAB had the chips and their P18F47J53.INC files as well.
Is it just me? I will try from home in a couple hours.
5252
And Darrel, I thought it was 2.60B
;************************************************* ***************
;* 18F27J53.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2010 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 09/13/10 *
;* Version : 2.60b *
;* Notes : *
;************************************************* ***************
:D
cncmachineguy
- 5th March 2011, 03:08
YEAH!!! I haven't tried it yet, but the patch says it has fixed the 2 UART on the 16F1's so now we can use HSEROUT2/IN2. Very cool! :)
Darrel Taylor
- 5th March 2011, 03:39
Walter,
You just need to update your MPLAB. Those chips are a recent addition.
I'm not sure which version they were added, but they are in MPASM 5.37.
The .LST file indicates they weren't in 5.31.
ScaleRobotics
- 5th March 2011, 04:24
Thanks Darrel, sorry for the trouble. I must have had a weird MPLAB/MPASM install issue at work. Mpasm showed the include file, but MPLAB 8.33 I couldn't see the chip in the drop down box. Definitely missing something. Anyway, it worked fine at home, but it didn't like my slightly altered .inc files. I had to delete a few to make the update install.
Thanks again.
kenif
- 21st July 2011, 19:39
At last got to the stage where it programs, but as we all know, that's just the start.
I think it's the dreaded INC config stuff.
Using HSPPL I get a slow clock out, doesn't run program. I've read the datasheet many times but nowhere does it really explain options.
There is next to nothing on the forums about this 18F27J53 device.
Many flags do not appear to be in the INC file.
Tried @ _CONFIG using many of the switches but I'm only shotgunning.
I want to run USB using internal clock; CPU speed not important.
Any idea about INC file or @ _CONFIG settings? Thanks for your help in anticipation.
mackrackit
- 22nd July 2011, 00:57
Goto the MPASM SUITE directory under C:\Program Files\Microchip\MPASM Suite
There you will find MicroChips *.inc file for the chip. At the end of the file all of the configs are listed.
I did not see what you are planning to use for an OSC. Post a little bit more about your setup, MCLR and stuff and we can help with the configs.
kenif
- 22nd July 2011, 05:31
Dave, thanks for coming back.
My setup is whatever someone else has working. Don't care about CPU speed for now.
The program works fine on 16Fxxx.
I've tried 4, 8 and 20meg crystals/resonators, changed divider in INC and set DEFINE OSC n to clock speed.
Currently 4 divided by 1.
All result in the same low clock out as if the crystal is not doing anything.
Tried HS and HSPLL. Have a 20MHz oscillator so will try that next using EC.
But I suspect it's nothing to do with the clock settings (as they don't make any difference), it's another switch somewhere.
'setup:
' @ __CONFIG _CONFIG1H _HSPLL_OSC_1H
' @ __CONFIG _CONFIG1H _XINST = OFF
' @ __CONFIG _CONFIG1H _PLLDIV = 5
' @ __CONFIG _CONFIG1H _WDTPS = 512
' @ __CONFIG _CONFIG1H _ADCSEL = BIT12
DEFINE OSC 4 ' set the clock speed
DEFINE DEBUG_REG PORTC ' Set Debug pin port
DEFINE DEBUG_BIT 2 ' Set Debug pin bit
DEFINE DEBUG_BAUD 9600 ' Set Debug baud rate
DEFINE DEBUG_MODE 1 ' Set Debug mode: 0=true (for drivers), 1=inverted
DEFINE LCD_LINES 4 ' Using a 4 lines LCD
; Oscillator:
; OSC = INTOSC INTOSC
; OSC = INTOSCO INTOSCO (CLKO-RA6)
; OSC = INTOSCPLL INTOSCPLL
; OSC = INTOSCPLLO INTOSCPLLO (CLKO-RA6)
; OSC = HS HS, USB-HS
; OSC = HSPLL HS+PLL, USB-HS+PLL
; OSC = EC EC (CLKO-RA6), USB-EC
; OSC = ECPLL EC+PLL (CLKO-RA6), USB-EC+PLL
; PLL Prescaler Selection:
; PLLDIV = 12 Divide by 12 (48 MHz oscillator input)
; PLLDIV = 10 Divide by 10 (40 MHz oscillator input)
; PLLDIV = 6 Divide by 6 (24 MHz oscillator input)
; PLLDIV = 5 Divide by 5 (20 MHz oscillator input)
; PLLDIV = 4 Divide by 4 (16 MHz oscillator input)
; PLLDIV = 3 Divide by 3 (12 MHz oscillator input)
; PLLDIV = 2 Divide by 2 (8 MHz oscillator input)
; PLLDIV = 1 No prescale (4 MHz oscillator input drives PLL directly)
mackrackit
- 22nd July 2011, 09:17
I do not have that chip to actually test this, but try this using the internal OSC.
'Set the *.inc OSC configs to..
CONFIG PLLDIV = 2
CONFIG OSC = INTOSCPLL
CPUDIV = OSC1
Then in your code
DEFINE OSC 48
That should have the chip set to run at USB speeds using the built in OSC.
kenif
- 22nd July 2011, 22:39
Thanks Dave.
Tried INTOSCPLL and INTOSCPLLO
Whatever I do produces 1 meg clock out.
Going to order some more and see if I've blown up this guy :)
Let you know...
LIST
LIST p = 18F27J53, r = dec, w = -311, f = inhx32
INCLUDE "P18F27J53.INC" ; MPASM Header
CONFIG XINST = OFF
CONFIG WDTPS = 512
CONFIG PLLDIV = 2 ; CONFIG PLLDIV = 5
CONFIG OSC = INTOSCPLLO ; CONFIG OSC = HSPLL
CPUDIV = OSC1
CONFIG ADCSEL = BIT12
NOLIST
cncmachineguy
- 23rd July 2011, 01:18
Check the OSCTUNE.6 bit. It may need to be set to actually turn on the PLL
ScaleRobotics
- 23rd July 2011, 04:26
Or you can turn the PLL on in configs, with:
CONFIG CFGPLLEN = ON ;Turns on PLL enable
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.