Log in

View Full Version : 18F2525 Int Osc settings?



Tom Gonser
- 24th March 2005, 00:57
I am moving from a 16F867/A to an 18F2525 - very similar pin-outs both 28 pins. The challenge is that I can't seem to get the INT OSC to work...

On the 16 part I was running a 4mz XT, on this one, I want to run 8Mhz INT. I have found the fuses for the 18F, and set the OSC, but I don't think it worked.

I really just need to turn off all the special stuff, and use the pins as digital I/O - no A/D, nothing.. Just read-in from serial data on RB4 at 9600b, and read data back out to two devices one on RC5 and one on RC4. As well, I have external I2C eeprom on RC3, RC4, saving to EEPROM, and reading out to serial data - and hopefully an LCD on RA0-RA5.. Also using an interrupt on RB0 and RB1..

This was working with the 16 part, but I need some pointers on how to set the 18F2525..

Ideas?

Thanks,
Tom

Tom Gonser
- 26th March 2005, 22:44
Fixed. I found via email that my issue internal OSC setting problems were because I needed to turn off MCLR, and use the OSCCON setting for 8 Mhz, and it works fine.

OSCCON=%01111000
DEFINE OSC 8

The 18 Parts have LOTS of switches. More difficult a switch than I thought it would be. Working now however.

My settings are:

@ __CONFIG _CONFIG1H, _OSC_INTIO67_1H
@ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
@ __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L & 0bfh ;_XINST_OFF_4L

Not sure if I have it all right yet, but at least I am moving forward!

Thanks.

Tom