PDA

View Full Version : CDlite to MicroCode Studio



grounded
- 29th January 2007, 13:28
I have to decided to migrate my simple hobby programing from CDLITE to MicroCode Studio
in doing so I ran into a little problem.
when I coped and pasted from CDLITE to MicCode
I get a trying to redefine error
after researching the problem here. I replace this
@ DEVICE pic12F629
@ DEVICE pic12F629, INTRC_OSC_NOCLKOUT
@ DEVICE pic12F629, WDT_ON
@ DEVICE pic12F629, MCLR_OFF
@ DEVICE pic12F629, CPD_OFF
@ DEVICE pic12F629, BOD_OFF
@ DEVICE pic12F629, PWRT_ON
@ DEVICE pic12F629, PROTECT_OFF

with this

pic12F629
_INTRC_OSC_NOCLKOUT
_WDT_ON
_MCLR_OFF
_CPD_OFF
_BOD_OFF
_PWRT_ON
_PROTECT_OFF

and it compiled but I'm not sure if this IS the currect way of doing it.
like I said I'm only a hobbyist doing simple programming (and having fun learning)

thank you for any and all help

mister_e
- 29th January 2007, 16:09
If i compile you first line and using PM, it's working here without any error. If you want to use MPASM to compile your code, you will have to change it a little bit.

Have a look at the following....
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543

grounded
- 29th January 2007, 18:41
Sorry but I get a little confused on this stuff. I'm just a hobbist trying to learn
I'm using MPLAB IDE v6.62 ,PICkit 1 flash starter kit & PBP
I've not changed anything other than going from Cdlite to microcode. using some code that I had written
with cd lite

mister_e
- 29th January 2007, 21:08
try

@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _PWRTE_ON & _BODEN_ON & _CPD_OFF & _CP_OFF

now maybe you'll get the Overwriting previous address contents(2007) warning, just open 12F629.INC file in the PBP folder and comment-out all default config fuses. it should looks like

;************************************************* ***************
;* 12F629.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2005 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 08/31/05 *
;* Version : 2.46a *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
include 'M12F629.INC' ; PM header
;device pic12F629, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
XALL
NOLIST
else
LIST
LIST p = 12F629, r = dec, w = -302
INCLUDE "P12F629.INC" ; MPASM Header
;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
NOLIST
endif
LIST

Recompile and TADA, no more error message... if you have selected MPASM to compile your code. If you're using MPLAB it should work. Unless, post your code here.

malc-c
- 30th January 2007, 10:09
It maybe worth downloading the current version of MPLAB (at least ver 7.50)

grounded
- 30th January 2007, 13:48
Ok mister_e I did just what you said and it did just what you said. So I guess
I'm good to go.
But this brings me to another ?. IF I had not config. fuses in my code would it then use these defaults fuses that are in the INC file. and if so could I goto the INC and change say _MCLRE_OFF save changes and not have to do it in code. just trying to learn and I also learned in this lesson that with CDlite I'm using PM and with MicroCode I'm using MPASM

malc-c good point
It's nice to have a place to come to for help
Thanks

mister_e
- 30th January 2007, 15:46
Yes you could just edit the .INC file and leave it like this. If you ALWAYS use the same config fuses... no problem.

I still prefer to set and see them in my code... but it's me ;)