Hi Chris
I had this problem on a 24k22, turned out to be the TxRD16 bit of TxCON being set for 16bit mode. Changing this to 8 bit mode solved it for me.
Hi Chris
I had this problem on a 24k22, turned out to be the TxRD16 bit of TxCON being set for 16bit mode. Changing this to 8 bit mode solved it for me.
Hi, thanks for that.
I did get around to suspecting that and tried changing between 16-bit and 8-bit modes but there was no difference - and I couldn't explain how it would make a difference because the 25k22 and 26k22, which use identical registers.
The only difference between the two timers seems to be that they use different interrupt registers, not between devices though, so I still can't quite explain how the fault occurs
Chris,
I am trying to make the leap from 16F’ to 18F’s. I want to start with the 18F25k22. Would you mind sharing some 25k22 code? I would be interested in what your config’s look like for your 25k22 clock project?
Thanks!
Wayne
Hello Wayne,
there is probably little point in using my configs, unless yoiu plan to set up your pic to mimic mine.
Your best way top approach it is to decide which peripherals you would like to use first of all, and then look in the MPASM directory for the 18F25k22.inc file. At the end of that file all of the correct mnemonics for the configs are listed.
I generally copy the ones I want to use from the Microchip include file and put them in the Picbasic 18f25k22.inc include file to enable them.
Chris
Hi,
Just a reminder that this has changed in PBP3, if that's what you have. There's no longer any need to edit .inc files etc, instead use #CONFIG/#ENDCONFIG to override the defaults. Also take a look a the DEVICE_REFERENCE folder of the PBP install folder, there you'll find a .INFO file for each supported PIC outlining the available configs etc. The .INFO is just a plain text file so you can open it Notepad or MCSP or whatever.
For example, here a config block for the 18F25K22 on a project of mine (requires PBP3)Obviously this doesn't contain ALL the CONFIGs - just the ones I was currently interested in. Again, very easy and flexible, no need to edit files etc.Code:#CONFIG CONFIG FOSC = HSMP CONFIG PLLCFG = ON CONFIG PBADEN = OFF CONFIG MCLRE = EXTMCLR CONFIG LVP = OFF CONFIG XINST = OFF #ENDCONFIG
/Henrik.
Thank you Chris and Henrik for your comments.
I am using MCSP, PBP 2.60c, and MPLAB8.83. When I compile from MCSP I get a statement “18F25K22.INC not found”, in addition to other errors. In PBP I have three files for 18F25K22. 18F25K22.INC, 18F25K22.Visual Basic Module, 18F25K22.BAL are in C:\PBP.
There is NO M18F25K22.INC in C:\PBP\INC.
If I understand what you are saying, I should copy the P18F25K22.INC from C:\Microchip\MPASM Suite into PBP\INC. Is that correct? If so, should I call it M18F25K22?
I also find in C:\Mecanique\MPASM has INC files. There is NO P18F25K22 in this folder. Should there also be a P18F25K22 file in this folder?
Thank you for your help. I’ve been working with this for several days, reloaded all my programs and updating from PBP2.60, 2.60a, 2.60c. My forehead feels like mister-e’s after banging the keyboard for hours!
Wayne
Hi,
There should be a 18F25K22.INC, a 18F25K22.BAS and a 18F25K22.BAL file in the PBP folder and there should be a P18F25K22.INC in the MPASMSuite folder. If you need to EDIT the configs (for PBP versions PRIOR to 3.0) the file you should edit is the 18F25K22.INC in the PBP folder. You should not copy and or rename any files.
My 18F25K22.INC file in C:\PBP looks like this (this is for v2.6):As you can see I've commented the default __CONFIG lines here so that I could have them in my program instead. You can do that OR edit the the file to match your needs but DO back it up before changing.Code:;**************************************************************** ;* 18F25K22.INC * ;* * ;* By : Leonard Zerman, Jeff Schmoyer * ;* Notice : Copyright (c) 2010 microEngineering Labs, Inc. * ;* All Rights Reserved * ;* Date : 05/11/10 * ;* Version : 2.60a * ;* Notes : * ;**************************************************************** ;Edited 2011-03-02 //Henrik ;Commented out configs in order to set in code NOLIST ifdef PM_USED LIST "Error: PM does not support this device. Use MPASM." NOLIST else LIST LIST p = 18F25K22, r = dec, w = -311, w = -230, f = inhx32 INCLUDE "P18F25K22.INC" ; MPASM Header ; __CONFIG _CONFIG1H, _FOSC_INTIO67_1H ; __CONFIG _CONFIG3H, _PBADEN_OFF_3H ; __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L NOLIST endif LIST EEPROM_START EQU 0F00000h BLOCK_SIZE EQU 64
I don't know why it says it can't find your 18F25K22.INC if it's there. If you happen to have multiple versions of the compiler make sure you're executing the correct one. Also make sure that MCS is indeed pointing to the correct MPASMSuite folder (if you have multiple versions installed), it's usually something like C:\Program Files\Microchip\MPASMSuite\
/Henrik.
Bookmarks