CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

10MHz -> 20MHz

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

10MHz -> 20MHz
PostPosted: Thu May 26, 2011 11:59 am     Reply with quote

Hi,

My hardware changed from 18F87K22 to 18F86K22 and from 10MHz to 20MHz clock speed.
I have altered my fuses like this:
Code:

#include <18F86K22.h>
#case
#device adc=16 HIGH_INTS=TRUE

#fuses WDT1024,WDT_SW                //Watch Dog Timer uses 1:65536 Postscale
#fuses HSH                          //Hi-Speed crystal oscillator
#fuses NOBROWNOUT                  //No brownout reset
#fuses NOPLLEN                  //No PLL enabled
#fuses BBSIZ1K                     //1K words Boot Block size
#fuses NOXINST                     //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#fuses PROTECT
#define MCU1_RX PIN_C7
#define MCU1_TX PIN_C6
#define PC_RX PIN_G2
#define PC_TX PIN_G1
#define BAUDRATE 9600

#use delay(clock=20000000)

But I keep getting weird/wrong characters in my serial terminal, why would that be?
In my *.lst I got this
Code:

Configuration Fuses:
   Word  1: C21D   VREGSLEEP INTRC_HP SOSC_HIGH NOXINST HSH NOPLLEN FCMEN IESO
   Word  2: 2A78   PUT NOBROWNOUT BORV18 ZPBORM WDT_SW WDT1024
   Word  3: 8BF9   RTCOSC_T1 EXTADDRSFT ABW20 BW16 NOWAIT CCP2C1 ECCPE MSSPMSK7 MCLR
   Word  4: 0081   STVREN BBSIZ1K NODEBUG
   Word  5: C000   PROTECT NOCPB NOCPD
   Word  6: E00F   NOWRT NOWRTC NOWRTB NOWRTD
   Word  7: 400F   NOEBTR NOEBTRB


Thanks for hints and suggestions!
Ron
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

[SOLVED] 10MHz -> 20MHz
PostPosted: Thu May 26, 2011 3:20 pm     Reply with quote

Figured it out, just had USART1 & 2 confused in my #use rs232 lines where i force it to use the hardware USARTs. All good now. Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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