![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
Unknown keyword #FUSES "BORV22" |
Posted: Wed Aug 30, 2023 7:57 am |
|
|
I only have this error in my code, I am not sure how to eliminate this error. When I hide BORV22, it shows no ROM available. Using PIC18F24k22
Can someone help me to figure out the problem? Thank you |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
Posted: Wed Aug 30, 2023 8:12 am |
|
|
What is the compiler version?
Also, post your lines of code starting from the first (device declaration) to the oscillator frequency (#use delay) line that includes the fuses. _________________ Google and Forum Search are some of your best tools!!!! |
|
![](templates/subSilver/images/spacer.gif) |
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
|
Posted: Wed Aug 30, 2023 8:16 am |
|
|
Compiler version 4.14
#include "18f24k22.h"
#include "globals.h"
//-----------------------------------------------
// Compiler Options
//-----------------------------------------------
#ifndef PROGRAMMICRO
#device icd=TRUE
#endif
#device ADC=8
#use delay(clock = 8000000)
#use fast_io(a)
#use fast_io(b)
#use fast_io(c)
//-----------------------------------------------
// Configuration Bits:
//-----------------------------------------------
#ifdef PROGRAMMICRO
#fuses NODEBUG
#fuses WDT
#fuses WDT1024
#fuses PUT
#else
#fuses DEBUG
#fuses NOWDT
#fuses NOPUT
#endif
// Fuses: LP,XT,HSH,HSM,ECH,ECH_IO,RC,RC_IO,INTRC_IO,INTRC,ECM,ECM_IO
// Fuses: ECL,ECL_IO,NOPLLEN,PLLEN,PRIMARY_SW,PRIMARY,NOFCMEN,FCMEN
// Fuses: NOIESO,IESO
#fuses INTRC,NOPLLEN,PRIMARY,NOFCMEN,NOIESO
// Fuses: PUT,NOPUT,NOBROWNOUT,BROWNOUT_SW,BROWNOUT_NOSL
// Fuses: BROWNOUT,BORV29,BORV25,BORV22,BORV19
#fuses BROWNOUT,BORV22
// Fuses: NOWDT,WDT_NOSLEEP
// Fuses: WDT_SW,WDT,WDT1,WDT2,WDT4,WDT8,WDT16,WDT32,WDT64,WDT128
// Fuses: WDT256,WDT512,WDT1024,WDT2048,WDT4096,WDT8192,WDT16384
// Fuses: WDT32768
// Fuses: CCP2B3,CCP2C1,NOPBADEN,PBADEN,CCP3C6,CCP3B5
// Fuses: NOHFOFST,HFOFST,TIMER3B5,TIMER3C0,CCP2C0,CCP2B5,NOMCLR,MCLR
#fuses NOPBADEN,CCP2C1,NOHFOFST,TIMER3C0,CCP2C0,MCLR
// Fuses: NOSTVREN,STVREN,NOLVP,LVP,NOXINST,XINST,DEBUG,NODEBUG
// Fuses: PROTECT,NOPROTECT,CPB,NOCPB,CPD,NOCPD,WRT,NOWRT,WRTC,NOWRTC
// Fuses: WRTB,NOWRTB,WRTD,NOWRTD,EBTR,NOEBTR,EBTRB,NOEBTRB
#fuses STVREN,NOLVP,NOXINST,NOPROTECT,NOCPB,NOCPD,NOWRT,NOWRTC,NOWRTB,NOWRTD
#fuses NOEBTR,NOEBTRB |
|
![](templates/subSilver/images/spacer.gif) |
gaugeguy
Joined: 05 Apr 2011 Posts: 296
|
|
Posted: Wed Aug 30, 2023 8:39 am |
|
|
The oldest compiler that I have kept is 4.132 from 2012. I doubt that version 4.14 would have had support for the PIC18F k22 series. |
|
![](templates/subSilver/images/spacer.gif) |
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
|
Posted: Wed Aug 30, 2023 8:44 am |
|
|
I think you are right.
PCD file is from 6/9/2011. Can you tell me what version I should use to make it work and where I can find it?
I have tried 5.015 version still had ROM issue. |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
Posted: Wed Aug 30, 2023 8:55 am |
|
|
BTW, fuses should always come close to or right after the device declaration
(first line). They can affect many things. _________________ Google and Forum Search are some of your best tools!!!! |
|
![](templates/subSilver/images/spacer.gif) |
gaugeguy
Joined: 05 Apr 2011 Posts: 296
|
|
Posted: Wed Aug 30, 2023 9:24 am |
|
|
Is this old code that you are trying to maintain or are you writing your own new code? |
|
![](templates/subSilver/images/spacer.gif) |
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
|
Posted: Wed Aug 30, 2023 10:25 am |
|
|
Yes, it is old code. I am trying to modify it to reduce work but doesn't work. I think I need to move everything to new version complier to rewrite again. Again I don't have a lot of knowledge of PIC, I only worked with Arduino. Declaring all those variables, pins for PIC and fuses again from the beginning would be tough job for me.
Is there any simple way I can input C source file to the new version of CCS and It would define its headers and necessary files by itself for a chosen PIC?
And do some easy modification to fix it. |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|