Page 1 of 1

RS232

Posted: Wed Sep 27, 2006 11:14 am
by ZONK
I have my fully fledged project up and running with my RS232 peripheral.
I have built a circuit incorporating PIC16f88 and MAX232 chips with extra components ie switches, crystal, resitors, capapicors, regulator etc.
I have tried programming my pic chip so that it would run on the internal oscilator but to no avail.
I have read lots of info including pulling up C code icon and inserting several types of instrucion such as osccon = 0X70; etc and setting intrc and setting for 8Mhz and even enabling Fail-safe clock monitor and internal external switch over mode but to no avail.
Could someone please tell me how to run this project without external osc
but not to disable the uart part of the chip bearing in mind I can only just understand flowcode and not much about C code or assembly code.
Thanks in anticipation

Posted: Wed Sep 27, 2006 11:51 am
by Steve
3 things are required:

1) A 'C' icon at the beginning of your program with "osccon = 0x70;" in it (this will set the internal oscillator to 8MHz).

2) The correct configuration data:
- oscillator = INTRC
- internal external switch over mode = enabled

3) Specify the appropriate clock frequency within FlowCode (in this case, 8MHz).

If you're still having problems, I suggest you create a small test app (e.g. a flasher flashing every second) to make sure your program is running at the correct frequency.

There is another thing to be aware of - the current RS232 component assumes the clock frequency is 19.6608MHz. This limitation will be corrected once the current work around the v3 release is complete.

Posted: Wed Sep 27, 2006 1:47 pm
by ZONK
Thanks Steve for your swift reply,
I have already tried this and the PIC16F88 does work ok with flashing LED program.
It is the same when PIC16F628 is used also
It is only when RS232 Macros and UART mode are involved in the programme that I can't get INTRC to work?

Posted: Wed Sep 27, 2006 3:04 pm
by Steve
This seems strange. I cannot see anything in the RS232 code that would alter the clock settings. If you are still having problems, please send your program to our support email and we'll have a quick look.