No, I mean these.
http://www.picbasic.co.uk/forum/showthread.php?t=543
No, I mean these.
http://www.picbasic.co.uk/forum/showthread.php?t=543
Dave
Always wear safety glasses while programming.
No, I don't have anything nor have ever used anything like that before to my knowledge. I looked into the devices folder within my MPASM installation and I didn't see it in the list. Could that be why it isn't working?
Last edited by emerson; - 21st July 2012 at 07:36.
You have never set the configuration for any chip? Not even changed the type of oscillator used? The *.inc file that needs changed is in the PBP directory.
Read through the thread I linked you too, figure out where all f the files are, then we can go from there.
Dave
Always wear safety glasses while programming.
Alright. I was able to find the .INC file and found the config bits at the bottom of the page. I came up with this so far but it doesn't work yet. Whenever I compile my program in MCS it gives me an error message for the "&" symbols.
And no I've never used this method before. I guess I've always gotten away with what I showed you in the initial post (until now), although now it seems incorrect.Code:@__CONIG_OSC_IRCIO67_1H &_FCMEN_OFF_1H &_PWRT_OFF_2L &_BOREN_OFF_2L &_WDT_OFF_2H &_MCLRE_ON_3H &_LVP_OFF_4L
Last edited by emerson; - 21st July 2012 at 16:16.
Goto the *.inc file in the PBP directory and comment out the config lines so it looks like this:
Then in your code;Code:;**************************************************************** ;* 18F4685.INC * ;* * ;* By : Leonard Zerman, Jeff Schmoyer * ;* Notice : Copyright (c) 2008 microEngineering Labs, Inc. * ;* All Rights Reserved * ;* Date : 09/15/08 * ;* Version : 2.60 * ;* Notes : * ;**************************************************************** NOLIST ifdef PM_USED LIST "Error: PM does not support this device. Use MPASM." NOLIST else LIST LIST p = 18F4685, r = dec, w = -311, w = -230, f = inhx32 INCLUDE "P18F4685.INC" ; MPASM Header ; __CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H ; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H ; __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H ; __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_1024_4L & _XINST_OFF_4L NOLIST endif LIST EEPROM_START EQU 0F00000h BLOCK_SIZE EQU 64
Code:'18F4685 TEST @ __CONFIG _CONFIG1H, OSC_IRCIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H @ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H @ __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H @ __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_1024_4L & _XINST_OFF_4L
Dave
Always wear safety glasses while programming.
I'm sorry but that didn't seem to work either, but I have a few questions now. The WDT, was that set to 512 to somehow complement the 8MHz oscillation speed? Also this config line:
Does this let the chip change variable values while it's running or does it allow the chip to add code (a FOR...NEXT loop for example) to itself while in operation?Code:_BBSIZ_1024_4L
By the way, thanks for the time and help thus far
BBSIZ is the Boot Block Size.
Goto
C:\Program Files\Microchip\MPASM Suite
and find the file "P18F4685.INC"
That is where you will find all of the config options, near the end of the file. Do not modify this file.
So, you are saying that the code does not compile from post #9?
Dave
Always wear safety glasses while programming.
Bookmarks